MCP Server Template (Python)
@Nisarg38
关于 MCP Server Template (Python)
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-server-template-nisarg38": {
"command": "python",
"args": [
"-m",
"src.main"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Server Template (Python)?
A ready‑to‑use template for building Model Context Protocol (MCP) servers in Python. It helps developers quickly create servers that register and expose tools and prompts for AI models to use.
How to use MCP Server Template (Python)?
Install with pip install -e ".[dev]" inside a cloned copy of the repository, then start the server with python -m src.main or the mcp-server-template CLI. Command‑line options let you change the port (--port), enable debug mode (--debug), switch transport (--transport stdio), or set the logging level (--log-level).
Key features of MCP Server Template (Python)
- Ready‑to‑use template for building MCP servers in Python.
- Create tools and prompts with simple Python decorators.
- Command‑line interface with port, debug, and transport options.
- HTTP (default port 8080) and stdio transport support.
- Docker‑ready with a provided
Dockerfile. - Includes development tools (tests, linting, formatting).
Use cases of MCP Server Template (Python)
- Prototyping a custom MCP server that exposes domain‑specific tools.
- Developing and testing tools and prompts for AI model integration.
- Containerising an MCP server for deployment on cloud platforms (AWS, GCP, Azure).
- Using as a starting point for hackathons or internal microservices.
FAQ from MCP Server Template (Python)
What is the Model Context Protocol (MCP)?
MCP is a protocol that allows AI models to access external tools and prompts. The template provides an easy way to build an MCP‑compliant server.
What Python version is required?
Python 3.10 or newer.
How do I add a new tool?
Define a function in src/main.py and decorate it with @mcp.tool(). The function’s docstring serves as the description shown to the AI.
How can I deploy the server?
Build a Docker image with docker build -t my-mcp-server . and run it, or deploy the container to any cloud platform that supports containerised apps.
What transport options are available?
The server supports HTTP (default on port 8080) and stdio. Use --transport stdio to switch to the stdio transport.
开发工具 分类下的更多 MCP 服务器
Stakpak Agent CLI
stakpakShip your code, on autopilot. An open source agent that lives on your machines 24/7 and keeps your apps running. 🦀
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.
test
harlancA simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
nuxt-mcp / vite-plugin-mcp
antfuMCP server helping models to understand your Vite/Nuxt app better.
评论