mcp-compose
Verified Safeby datalayer
Overview
A secure MCP (Model Context Protocol) server that orchestrates calculator and string manipulation tools, offering OAuth2 authentication with GitHub. It implements advanced OAuth features like PKCE, resource indicators, and dynamic client registration, making it suitable for protected AI agent integrations and enterprise API management.
Installation
python -m mcp_oauth_example serverEnvironment Variables
- JWT_SIGN_KEY
- OAUTH_CLIENT_ID
- OAUTH_CLIENT_SECRET
Security Notes
The server implements robust OAuth2 features including PKCE, state parameters for CSRF protection, and resource indicators (RFC 8707) for token binding. It performs token validation by calling the GitHub API for external tokens or verifying its own issued JWTs. However, the JWT signing key (`JWT_SIGN_KEY`) is hardcoded as 'dev_sign_key_change_in_production' in `server.py`, which is a critical vulnerability if used in production. CORS is set to `allow_origins=["*"]` in development, which should be restricted for production deployment. While the configuration file `config.json` is intended for local credentials, sensitive information can be loaded from environment variables in a production context, but this is a manual step for the user. SSL/HTTPS support via `mkcert` is provided. No `eval` or obfuscation was found.
Similar Servers
mcphub
A hub for managing, orchestrating, and providing a unified API for various Model Context Protocol (MCP) servers and their tools, including user management, OAuth services, and discovery of external servers.
mcp-router
A desktop application for managing Model Context Protocol (MCP) servers, supporting local and remote connections, context management, and integration with AI tools.
mcpm.sh
This server provides a command-line interface to manage Model Context Protocol (MCP) servers, allowing users to discover, install, configure, run, share, and monitor them.
tmcp
Build Model Context Protocol (MCP) servers for AI agents, providing schema-agnostic tools, resources, and prompts, with optional OAuth 2.1 authentication and distributed session management.