mcp_server
Provides configuration examples and management for MCP servers supporting stdio, SSE, and streamable HTTP transport modes.
README
使用uv管理python环境
- uv启动mcp服务的python脚本
uv run --with mcp[cli] mcp run path/to/mcp.py
- uvx启动mcp服务的python脚本
uvx --with pillow --with mcp[cli] fastmcp run path/to/mcp.py
启动单个mcp服务 sse和streamable-http两种模式的URL路径
# sse 模式
http://127.0.0.1:8000/sse # 默认8000端口
http://host.docker.internal:8000/sse # docker容器内访问
# streamable-http 模式
http://127.0.0.1:8000/mcp # 默认8000端口
http://host.docker.internal:8000/mcp # docker容器内访问
使用mcp工具的多种基本配置示例参考:
// 涉及3种模式:stdio,sse,streamable_http
{
// streamable_http模式
"mcpServers": {
"math": {
"transport": "streamable_http",
"url": "http://127.0.0.1:8000/mcp"
},
// sse模式
"weather": {
"transport": "sse",
"url": "http://127.0.0.1:8000/sse"
},
"12306-mcp": {
"type": "sse",
"url": "https://mcp.api-inference.modelscope.cn/sse/76ee2dbba8d74f"
},
"sequentialthinking": {
"headers": {
"Accept": "application/json, text/event-stream",
"Authorization": "Bearer 0e51a8cd-e77f-072ec3f3d161"
},
"url": "https://mcp.api-inference.modelscope.cn/sse/bb19488b5bc049"
},
// 本地服务 stdio模式
"quickchart-server": {
"isActive": true,
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@gongrzhe/quickchart-mcp-server"
],
"name": "quickchart-server"
},
"excel-mcp-server": {
"isActive": true,
"command": "cmd",
"args": [
"/c",
"npx",
"--yes",
"@zhiweixu/excel-mcp-server"
],
"env": {
"LOG_PATH": "C:\\Users\\username\\Desktop\\temp",
"CACHE_MAX_AGE": "1",
"CACHE_CLEANUP_INTERVAL": "4",
"LOG_RETENTION_DAYS": "7",
"LOG_CLEANUP_INTERVAL": "24"
},
"name": "excel-mcp-server"
}
}
}
STDIO 模式启动说明
如果需要在客户端以 stdio 模式启动本项目:
- 环境准备: 在项目根目录下运行以下命令,安装 MCP 命令行工具:
uv add "mcp[cli]"
- 启动配置:
在配置客户端时,使用
uv作为命令,并配合--directory参数指定项目路径。- 命令:
uv - 参数:
["--directory", "/Users/hfhfn/charmProjects/mcp_server/", "run", "main.py"]
- 命令:
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.