About MCP Knowledge Base
MCP Knowledge Base is a personal and public learning repository for people exploring how MCP works. It combines protocol-flow explanations, diagrams, references, and planned Python simulations of host, server, LLM, and tool interactions.
Key features
- 01Explain the MCP communication flow
- 02Diagram host, server, LLM, and tool interactions
- 03Collect notes and references
- 04Explore toolchains, caching, and state management
Use cases
- 01Learn the roles in an MCP interaction
- 02Trace tool discovery and invocation
- 03Review ideas for MCP state handling
MCP support
The repository documents MCP concepts and interactions; it does not describe an MCP server interface or tools exposed to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Knowledge Base
📌 Why This Repository?
Purpose:
This repository is a personal and public knowledge base around the Model Context Protocol (MCP) — an emerging standard for enabling LLMs to call tools via structured interactions.
It is being developed as I deepen my own understanding, and may contain conceptual gaps or early interpretations that will be updated as MCP evolves.
This repo will include:
- Explanations of MCP communication flow
- Diagrams to show interactions between host, server, LLM, and tools
- Sample Python code that simulates the MCP pipeline
- Notes and references to papers or discussions
- A place to explore new ideas like toolchains, caching, and state management in MCP
🔁 How Model Context Protocol Works
Below is a simplified explanation of the MCP lifecycle based on early experimentation:
- 💬 User Input: A user provides a query (e.g., in VS Code, or a browser IDE — this acts as the MCP host).
- 📡 Tool Discovery: The host sends a request to the MCP server to discover available tools or plugins.
- 📤 Query Dispatch: The host passes both the user query and tool metadata to the LLM.
- 🧠 Tool Selection: The LLM chooses one or more tools to fulfill the query (e.g., a weather API or calculator).
- 🛠️ Tool Execution: The host executes the tool(s) by calling the MCP server.
- 📥 Result Handling: The tool returns its result; the host supplies it back to the LLM.
- ✅ Final Output: The LLM responds with a completed answer that includes all the necessary context.
🧪 Examples and Simulations
In the examples/ folder:
basic_mcp_demo.py: WILL add a minimal mock of how MCP-host and server communicatetool_plugin_example.py: WILL demonstrates tool registry and invocationmcp_host_server_flow.py: WILL demonstrate full lifecycle from user input to LLM response
🧱 Concepts and Building Blocks
- Tools: External services (APIs, databases, functions) that LLMs can call to extend their capabilities.
- Host: The interface environment where the LLM operates and displays results.
- Server: Middleware that brokers tools and handles invocation logistics.
- Schemas: JSON schemas or data formats used to structure requests and responses.
- Context Handling: Ensuring the LLM has access to prior tool calls for coherent responses.
✅ Suggested Repo Structure
mcp-knowledge-base/
│
├── README.md
├── diagrams/
│ └── # Any visual explanations
├── examples/
│ ├── # Minimal working example
│ └──
├── notes/
│ ├── # Raw notes, links, ideas
│ └──
├── schemas/
│ └── # Schemas like Pydantic models
├── utils/
│ └── # Simulated tools or services
└── LICENSE
---
## 🗂️ Related Projects and References
- LangChain's tool calling: https://docs.langchain.com
- OpenAI's Function Calling: https://platform.openai.com/docs/guides/function-calling
- Future MCP Spec links (to be added)
- Community discussions, notes in `notes/` folder
---
Stay tuned — this repo will evolve as I learn more and MCP matures!
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.