Back to Home
datalayer icon

mcp-compose

Verified Safe

by 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

Run Command
python -m mcp_oauth_example server

Environment 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

Stats

Interest Score35
Security Score6
Cost ClassLow
Stars5
Forks2
Last Update2025-12-02

Tags

MCPOAuth2API GatewayAI Agent ToolsAuthenticationFastAPITool OrchestrationSecurity