
llm-mcp-rag
LLM + MCP + RAG = Magic
1
Github Watches
7
Github Forks
71
Github Stars
LLM + MCP + RAG
目标
- Augmented LLM (Chat + MCP + RAG)
- 不依赖框架
- LangChain, LlamaIndex, CrewAI, AutoGen
-
MCP
- 支持配置多个MCP Serves
-
RAG 极度简化板
- 从知识中检索出有关信息,注入到上下文
-
任务
- 阅读网页 → 整理一份总结 → 保存到文件
- 本地文档 → 查询相关资料 → 注入上下文
The augmented LLM
classDiagram
class Agent {
+init()
+close()
+invoke(prompt: string)
-mcpClients: MCPClient[]
-llm: ChatOpenAI
-model: string
-systemPrompt: string
-context: string
}
class ChatOpenAI {
+chat(prompt?: string)
+appendToolResult(toolCallId: string, toolOutput: string)
-llm: OpenAI
-model: string
-messages: OpenAI.Chat.ChatCompletionMessageParam[]
-tools: Tool[]
}
class EmbeddingRetriever {
+embedDocument(document: string)
+embedQuery(query: string)
+retrieve(query: string, topK: number)
-embeddingModel: string
-vectorStore: VectorStore
}
class MCPClient {
+init()
+close()
+getTools()
+callTool(name: string, params: Record<string, any>)
-mcp: Client
-command: string
-args: string[]
-transport: StdioClientTransport
-tools: Tool[]
}
class VectorStore {
+addEmbedding(embedding: number[], document: string)
+search(queryEmbedding: number[], topK: number)
-vectorStore: VectorStoreItem[]
}
class VectorStoreItem {
-embedding: number[]
-document: string
}
Agent --> MCPClient : uses
Agent --> ChatOpenAI : interacts with
ChatOpenAI --> ToolCall : manages
EmbeddingRetriever --> VectorStore : uses
VectorStore --> VectorStoreItem : contains
依赖
git clone git@github.com:KelvinQiu802/ts-node-esm-template.git
pnpm install
pnpm add dotenv openai @modelcontextprotocol/sdk chalk**
LLM
MCP
RAG
- Retrieval Augmented Generation
- 各种Loaders: https://python.langchain.com/docs/integrations/document_loaders/
-
硅基流动
- 邀请码: x771DtAF
- json数据
向量
- 维度
- 模长
- 点乘 Dot Product
- 对应位置元素的积,求和
- 余弦相似度 cos
- 1 → 方向完全一致
- 0 → 垂直
- -1 → 完全想法
相关推荐
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Take an adjectivised noun, and create images making it progressively more adjective!
Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease
Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
🧑🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.
Reviews

user_YLaG8lCT
As a dedicated user of MCP applications, I've found the llm-mcp-rag by KelvinQiu802 to be remarkable. Its seamless integration and intuitive functionality have greatly enhanced my workflow. The comprehensive documentation and support from the developer are commendable. I highly recommend checking out this project on GitHub: https://github.com/KelvinQiu802/llm-mcp-rag.