Python MCP Server Template
A template repository for Python MCP Servers
Overview
Python MCP Server Template is a minimal template designed for creating a Model Context Protocol (MCP) server using the Python SDK. It provides a foundational structure for developers to build and deploy their own MCP servers.
To use this template, create a new repository using the provided template link, set up your Python environment, and run the server using Visual Studio Code or directly through the command line.
- Minimal setup for creating MCP servers - Compatibility with Python 3.13+ - Pre-configured settings for Visual Studio Code - Easy testing and debugging with MCP Inspector
- Developing custom MCP servers for AI applications.
- Testing and debugging server functionalities in a local environment.
- Learning and experimenting with the Model Context Protocol.
Add to your AI client
Use these steps to connect Python MCP Server Template in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"python-mcp-server-template-fidelusaleksander": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"python-mcp-server-template-fidelusaleksander": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"python-mcp-server-template-fidelusaleksander": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"python-mcp-server-template-fidelusaleksander": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"python-mcp-server-template-fidelusaleksander": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"python-mcp-server-template-fidelusaleksander": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-python-mcp-server-template-fidelusaleksander"
]
}
}
}FAQ
What is the Model Context Protocol (MCP)?
MCP is a protocol designed to facilitate the interaction between models and applications in a standardized way.
Is there a specific Python version required?
Yes, Python 3.13 or higher is required to run this template.
Can I use this template for production servers?
Yes, this template can be customized and extended for production use.