Python MCP Template
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Python MCP Template build and run the Docker container for local testing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A DevOps-friendly template with CI/CD, Docker, and Documentation-as-Code (DaC) for building MCP server
🚀 Core Idea
This template leverages fastmcp and FastAPI to seamlessly integrate MCP functionality while inheriting the original OpenAPI specifications.
🌟 Features
CI/CD Integration: Automate your workflows with GitHub Actions.
Dockerized Environment: Consistent and portable development and production environments.
Documentation-as-Code: Automatically generate and deploy documentation using MkDocs. This process also utilizes the
openapi.jsonfile to ensure API documentation is up-to-date.FastAPI Integration: Build robust APIs with OpenAPI support.
🛠️ Getting Started
Local Development
Install dependencies:
uv syncRun the MCP server:
# stdio
uv run fastmcp run mcp_tools/main.py# HTTP (Due to CORS middleware conflicts, additional setup is required)
uv run uvicorn mcp_tools.main_http:starlette_app --host 127.0.0.1 --port 8000Docker
Build the Docker image:
docker build -t python-mcp-template:latest .Run the container:
docker run -i --rm -p 8000:8000 python-mcp-template:latestRun MCP Server:
{
"mcpServers": {
"python-mcp-template": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-p",
"8000:8000",
"python-mcp-template:latest"
]
}
}
}📚 Documentation
Documentation is built using MkDocs and deployed to GitHub Pages.
To build the documentation locally:
chmod +x scripts/build_docs.sh scripts/build_docs.sh mkdocs build
Available Tools
1 toolnew_endpointD
New Endpoint
Responses:
200 (Success): Successful Response
Content-Type:
application/jsonResponse Properties:
message: A welcome message.
Example:
{
"message": "Hello, world!"
}422: Validation Error
Content-Type:
application/jsonResponse Properties:
Example:
{
"detail": [
"unknown_type"
]
}Inputs: name (required). Returns: message
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'new_endpoint' stands alone with a distinct purpose, so an agent cannot misselect between multiple options.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns. The name 'new_endpoint' follows a clear verb_noun structure, but consistency cannot be assessed across a set of one.
A server with only one tool feels thin and under-scoped for most purposes, especially given the generic 'Python MCP Template' name that suggests broader functionality. One tool is typically insufficient for meaningful agent interactions, indicating a mismatch with the apparent scope.
The tool surface is severely incomplete, as a single 'new_endpoint' tool does not cover any domain meaningfully. There are obvious gaps in CRUD operations, lifecycle management, or any coherent workflow, making it impossible for agents to perform useful tasks beyond a trivial response.
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
Create, deploy, and operate MCP servers directly from your GitHub repositories.
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform