Content
# llm-mcp-server-template
Template project for LLM-MCP server development
- The server provides the capability to compare numbers.
- The client includes various models and calling methods.
## MCP
- https://modelcontextprotocol.io/introduction
- In simple terms,
- The model (client) is the brain, responsible for planning and executing text-based tasks, such as writing code in the first step, executing it in the second step, and analyzing it in the third step.
- MCP (Server) is the tool that provides additional capabilities needed by the model, such as mathematical calculations, file reading and writing, network requests, etc.
### MCP-Server
- Primarily responsible for implementing MCP capabilities, such as mathematical calculations, file reading and writing, network requests, etc.
- https://modelcontextprotocol.io/quickstart/server
- During development, you can use the mcp-server-inspector tool to assist with debugging.
- Types of servers:
- 1. Local Stdio, where the client directly calls the local server file.
- 2. Remote aggregation platforms using SSE, such as Glama.ai, MCP.so, etc.
### MCP-Client
- Mainly responsible for coordinating the model and the MCP server, ultimately achieving "the model calls MCP capabilities."
- Types of clients:
- 1. Directly use existing client software, such as Cursor, MCP Inspector, etc.
- 2. Various intelligent agents on cloud platforms, such as Alibaba Cloud's Bai Lian application management.
- 3. Write your own scripts to support:
- 3.1. The model's SDK already supports MCP, making it easy to call using scripts.
- For example, Claude, https://modelcontextprotocol.io/quickstart/client
- For example, OpenAI, https://openai.github.io/openai-agents-python/mcp/
- 3.2. The model's SDK does not support MCP, requiring custom implementation.
- 3.2.1. Use frameworks, such as langchain-mcp-adapter (https://github.com/langchain-ai/langchain-mcp-adapters)
- 3.2.2. Fully native, specifically including multi-round requests:
- a. Use a prompt to request the model, informing it of the task and introducing the MCP servers, and the model returns the interface and parameters to call the server.
- b. Use the information returned from the previous round to request tools and obtain results.
- c. Use the information returned from the previous round to request the model and obtain results.
- d. Repeat b and c until the model returns the final result.
## Project Related
### Environment Preparation
```
# Install the uv package management tool, skip if already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env
uv --version
# Install Python 3.10, skip if already installed
uv python list
uv python install 3.10
cd server
# In the server directory, create a virtual environment, skip if already created
uv venv --python 3.10
source .venv/bin/activate
uv add "mcp[cli]" httpx
# In the server directory, use mcp-server-inspect for debugging during development
mcp dev math.py
cd client
# In the client directory, create a virtual environment, skip if already created
uv venv --python 3.10
source .venv/bin/activate
uv add openai-agents socksio
touch .env # In the .env file, set OPENAI_API_KEY, etc.
# In the client directory, run normally
source .venv/bin/activate
python openai_client.py
```
### Project Results
MCP Server, mcp-server-inspect debugging page:

MCP Client, ...
## TODO
~~1. mcp-server, local development and debugging~~
2. mcp-server, publish remote hosting platform
3. mcp-client, use openai-agent-sdk to call the server
4. mcp-client, use anthropic-sdk to call the local server
5. mcp-client, use langchain-mcp-adapter to call the server
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.