python-mcp-starter

python-mcp-starter

3.4

A template repository for creating Python applications using the Model Context Protocol (MCP) and the MCP Python SDK.

The Python MCP Server Starter Template is designed to help developers quickly set up a Python application that utilizes the Model Context Protocol (MCP). This template leverages the MCP Python SDK to implement an MCP server, providing a clean and modular architecture that facilitates easy registration of tools and resources. It includes a command-line interface with customizable options, making it ready for production deployment. The template also supports debugging with VS Code integration and offers Docker support for containerized deployment. It is equipped with development tools configured using 'uv' for environment and package management, ensuring a streamlined development process.

Features

  • Implements an MCP server using the 'mcp' Python SDK ('FastMCP').
  • Exposes MCP Tools and Resources for interaction with LLMs.
  • Clean, modular architecture for easy tool and resource registration.
  • Command-line interface with customizable options.
  • Docker support for containerized deployment.

MCP Tools

  • {'my_new_tool': 'A tool that processes input parameters and returns a result.'}

MCP Resources

  • {'your_resource_func': 'Returns application settings such as theme and language.'}

Usage with Different Platforms

stdio_mode

{'uv_run': 'powershell\nuv run your-script-name\n', 'mcp_cli_tool': 'powershell\nmcp dev ./your_package_name/server.py\n'}

sse_mode

{'default': 'powershell\nuv run your-script-name --sse\n', 'custom_host_port': 'powershell\nuv run your-script-name --sse --host 127.0.0.1 --port 9000\n'}

docker_deployment

{'docker_compose': 'bash\ndocker-compose up -d\n', 'docker_direct': 'bash\ndocker build -t your-image-name .\ndocker run -p 8000:8000 your-image-name\n'}