Back to Home
bercianor icon

mcp-forge-python

Verified Safe

by bercianor

Overview

A production-ready MCP (Model Context Protocol) server template for building AI-powered applications with OAuth 2.0 authentication and JWT validation.

Installation

Run Command
uv run http

Environment Variables

  • MCP_CLIENT_ID
  • MCP_CLIENT_SECRET

Security Notes

The server employs several strong security measures, including: careful avoidance of `eval` in JWT condition checks, configurable CORS, redaction of sensitive headers in access logs, basic rate limiting for JWT validation, and whitelisting of OAuth/JWKS URIs to prevent SSRF attacks. Secrets (`client_id`, `client_secret`) are expected to be provided via environment variables (`MCP_CLIENT_ID`, `MCP_CLIENT_SECRET`) or Kubernetes secrets, not hardcoded. The `jwt_exposed_claims` configuration allows control over which JWT claims are accessible to tools, mitigating PII leakage. The default host is `127.0.0.1` to prevent accidental exposure, with clear warnings for changing to `0.0.0.0`. Environment variable expansion in configuration (`safe_expandvars`) is also whitelisted. The system encourages an 'external' JWT strategy, offloading validation to an upstream proxy, which is a robust security pattern.

Similar Servers

Stats

Interest Score30
Security Score9
Cost ClassLow
Stars1
Forks0
Last Update2025-11-29

Tags

MCPPythonFastAPIOAuth2JWTAITemplate