Provides dynamic tool generation from GitHub's REST API OpenAPI specification, enabling programmatic interaction with GitHub resources through the Model Context Protocol.
Provides tools for interacting with Trello's API, including helper tools for managing boards, cards, and lists with custom validation and risk-based policies.
MCP OpenAPI Template
A template for building MCP (Model Context Protocol) servers from OpenAPI specifications.
This template provides a production-ready foundation for creating MCP servers that expose any REST API with an OpenAPI specification to LLM-powered tools.
Features
Dynamic Tool Generation: Automatically creates MCP tools from OpenAPI specs
Auth Gateway Integration: Centralized authentication via Auth Gateway
Dual Transport: Supports both
stdio(local) andsse(remote) transportsConfigurable Validation: Customizable ID patterns and input validation
Tool Policies: Risk-based policies for blocking/logging operations
Docker Ready: Production-ready Dockerfile and docker-compose
Quick Start
1. Clone/Use Template
2. Initialize Your Service
3. Configure Auth Gateway
Edit .env with your Auth Gateway credentials:
4. Download OpenAPI Spec
5. Run the Server
Project Structure
Configuration
service.yaml
The main configuration file (config/service.yaml) defines:
Environment Variables
Variable | Required | Description |
| Yes | Auth Gateway URL |
| Yes | API Key for Auth Gateway |
| No | Override API base URL |
| No |
(default) or
|
| No | Port for SSE mode (default: 8000) |
Authentication Flow
User obtains JWT from Auth Gateway (login)
User calls
set_auth_token(jwt)in the MCPMCP fetches API credentials from Auth Gateway
Credentials are cached for the session
User can now use all available tools
Adding Custom Helper Tools
See examples/trello/helpers.py for a complete example of adding user-friendly wrapper tools.
Docker Deployment
Examples
See the examples/ directory for complete configurations:
Trello: Full configuration with helper tools, validation, and policies
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.