Deutsch | English | EspaΓ±ol | franΓ§ais | ζ₯ζ¬θͺ | νκ΅μ΄ | PortuguΓͺs | Π ΡΡΡΠΊΠΈΠΉ | δΈζ
ArgoMCP demonstrates how Model Context Protocol (MCP) can be combined with intelligent agents to extend their capabilities beyond the core language model. By connecting agents to tools such as file systems, web fetchers, and memory modules, the project showcases how agents can retrieve, process, and generate knowledge in a modular and context-aware way.
MCP-Centric Design: The system is built around the Model Context Protocol (MCP), ensuring standardized communication and interoperability.
.
βββ LICENSE
βββ README.md
βββ examples
β βββ demo1.py
β βββ demo2.py
β βββ demo3.py
βββ knowledge
β βββ user_1.md
β βββ user_10.md
β βββ user_2.md
β βββ user_3.md
β βββ user_4.md
β βββ user_5.md
β βββ user_6.md
β βββ user_7.md
β βββ user_8.md
β βββ user_9.md
βββ logs
βββ output
β βββ antonette.md
βββ requirements.txt
βββ pyproject.toml
βββ run.sh
βββ src
β βββ argomcp
β β βββ agent
β β β βββ Agent.py
β β βββ llm
β β β βββ ChatDoubao.py
β β β ββ ChatOpenAI.py
β β βββ mcp
β β β ββββ MCPClient.py
β β βββ rag
β β β βββ EmbeddingRetriver.py
β β β ββ VectorStore.py
β β βββ utils
β β βββ logTitle.py
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
Clone the Repository
git clone https://github.com/BV003/ArgoMCP.git
cd ArgoMCP
Create and Activate Virtual Environment. We recommend using conda for dependency management.
conda create -n argomcp python=3.10 -y
conda activate argomcp
Install Dependencies
pip install -r requirements.txt
pip install -e .
Create a .env file in the project root directory and add your API Keys (e.g., OpenAI or other LLM providers) You can also use other models, as long as you implement the corresponding class under /llm.
OPENAI_API_KEY=your_api_key_here //openai
ARK_API_KEY=your_api_key_here //doubao
EMBEDDING_MODEL=all-MiniLM-L6-v2
githubtoken=your_api_key_here //for demo2
NOTION_API_KEY=your_api_key_here //for demo3
NOTION_PAGE_ID=your_page_id_here
Use fileMCP to search the local knowledge/ directory (contains 10 .md user files), retrieve the content related to Chelsey Dietrich, generate a short bio + story, and save the result back to the repository as a Markdown file.
./run.sh
# or
python examples/demo1.py
The result will be placed at output/antonette.md
- A web application interface for the GitHub MCP Agent has been implemented, allowing users to query GitHub repository information via natural language.
Make sure you have installed and started Docker before running.
streamlit run examples/demo2.py
- A terminal-based interactive Notion assistant that directly manipulates Notion pages through MCP tools while using GPT to understand natural language commands and generate corresponding actions.
python examples/demo3.py
Result
Notion MCP Agent is ready! Start chatting with your Notion pages.
Type 'exit' or 'quit' to end the conversation.
π€ You : what can you do
INFO Successfully created table 'agno_sessions'
ββ Message βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β what can you do β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Response (5.9s) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β I can help you interact with your Notion pages in various ways. Here are some of the things I can do: β
β β
β 1 Read Page Content: Retrieve and display the content of your Notion pages. β
β 2 Search Information: Search for specific information within your Notion workspace. β
β 3 Add or Update Content: Insert new content or update existing content, including creating lists, tables, and other Notion blocks. β
β 4 Page Management: Create new pages, update page properties, and manage page icons and covers. β
β 5 Block Management: Retrieve, update, or delete specific blocks within a page. β
β 6 Database Management: Query, update, or retrieve database information. β
β 7 Commenting: Add comments to specific blocks or pages and retrieve existing comments. β
β 8 Explain Page Structure: Provide information on how your page is structured. β
β β
β If you have any specific tasks you'd like assistance with, feel free to ask! β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π€ You : Explain Page Structure
ββ Message βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Explain Page Structure β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Tool Calls ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β β’ API-retrieve-a-page(page_id=200fe1fbb5e7800a93d8fdea8c4013c6) β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Response (9.8s) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β The structure of a Notion page involves several elements that help organize and display content effectively. Here's a breakdown of the page structure based on the current β
β page with ID 2: β
β β
β 1 Basic Information: β
β β’ Page ID: Unique identifier for the page. β
β β’ Created Time: When the page was created. β
β β’ Last Edited Time: The most recent time the page was modified. β
β 2 User Information: β
β β’ Created By: The user who created the page. β
β β’ Last Edited By: The user who last edited the page. β
β 3 Visual Elements: β
β β’ Icon: An emoji used as an icon, in this case, "π₯". β
β β’ Cover Image: No cover image has been set for this page. β
β β’ Parent Type: This page is part of the overall workspace. β
β 4 Properties: β
β β’ Title: The title of the page, which is "θΊ«δ½". β
β 5 URLs: β
β β’ Page URL: The direct link to access the page is here. β
β β
β Each page can include content blocks like text, images, tables, lists, and more. These blocks can be arranged and customized to suit the needs and preferences of the user. β
β You can further append, update, and delete content as needed to organize your information effectively. β
β β
β Is there anything specific you would like to explore or modify in this page? β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
We welcome contributions! Whether it's:
- Bug fixes
- New features
- Documentation improvements
- Translations
Please:
- Check existing issues first
- Open an issue to discuss major changes
- Submit PRs with clear descriptions
This is an independent educational project, designed for learning and practice.
If you are new to open source:
- Donβt worry! This project is meant to be beginner-friendly
- You can start small (update README, add comments, fix small bugs)
- You can build on top of this project, customize it, and even use it as part of your course assignments or personal practice projects.π€ͺ
This project is licensed under the MIT License - see the LICENSE file for details.