A Chinese MCP getting-started guide demonstrating MCP server/client setup, tooling, sampling, and Claude integration with code examples and shell commands.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Model Context Protocol (MCP) guide and examples for building an MCP server and client, focusing on using the stdio transport, with Python examples and integration steps for debugging and Claude Desktop.
How it works
Introduces MCP components (Resources, Prompts, Tools, Sampling, Roots, Transports) and shows using FastMCP and @mcp.tool() to expose tools. Demonstrates stdio transport, uv-based project initialization, and a client workflow using StdioServerParameters and ClientSession. Includes an example that calls an external web-search tool and handles tool_calls flow when integrating with a language model.
Getting started
"uv init mcp_getting_started" and following steps are shown to initialize the project, create a virtual environment, install dependencies, and run a Python MCP server using FastMCP and the @mcp.tool() decorator. Key shell snippets are quoted exactly as in the README:
# 初始化项目
uv init mcp_getting_started
cd mcp_getting_started
# 创建虚拟环境并进入虚拟环境
uv venv
.venv\Scripts\activate.bat
# 安装依赖
uv add "mcp[cli]" httpx openai
@app.tool()
async def web_search(query: str) -> str:
"""
搜索互联网内容
Args:
query: 要搜索内容
Returns:
搜索结果的总结
"""
async with httpx.AsyncClient() as client:
response = await client.post(
'https://open.bigmodel.cn/api/paas/v4/tools',
headers={'Authorization': '换成你自己的API KEY'},
json={
'tool': 'web-search-pro',
'messages': [
{'role': 'user', 'content': query}
],
'stream': False
}
)
res_data = []
for choice in response.json()['choices']:
for message in choice['message']['tool_calls']:
search_results = message.get('search_result')
if not search_results:
continue
for result in search_results:
res_data.append(result['content'])
return '\n\n\n'.join(res_data)
if __name__ == "__main__":
app.run(transport='stdio')
Recent releases
- none
Traction
3555 stars, 220 forks, 6 open_issues
Behind the repo
Linked project/organization is a Chinese Getting Started guide for MCP; repository is liaison to Model Context Protocol community tooling.
Caveats
- license: none listed
- created: 2025-03-01
- last_push: 2025-04-23
- language: -






