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:
Run the MCP server:
https://gofastmcp.com/deployment/http
https://github.com/jlowin/fastmcp/issues/840
Docker
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:
π 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