Back to Home
jpinsonneau icon

mcp-shield

by jpinsonneau

Overview

Provides an OAuth proxy for Model Context Protocol (MCP) servers on OpenShift, handling OAuth 2.0 discovery, client registration, token exchange, and enhancing security with a proxy token system.

Installation

Run Command
docker run -p 8080:8080 -e OAUTH_AUTHORIZATION_SERVERS=https://your-mcp-server.apps.example.com -e INSPECTOR_ORIGIN=https://mcp-inspector.apps.example.com quay.io/<MY_USER>/mcp-shield:dev

Environment Variables

  • OAUTH_AUTHORIZATION_SERVERS
  • INSPECTOR_ORIGIN
  • OAUTH_CLIENT_ID
  • OAUTH_REDIRECT_URIS
  • OPENSHIFT_OAUTH_TOKEN_URL
  • MCP_BACKEND_URL
  • MCP_BACKEND_PATH
  • PROXY_TOKEN_TTL

Security Notes

The server's HTTP client (`internal/handlers/oauth_token.go`) explicitly disables SSL certificate verification (`InsecureSkipVerify: true`) when communicating with the OpenShift OAuth token endpoint. This critically exposes the system to man-in-the-middle attacks, even if intended for environments with self-signed certificates. Additionally, the `INSPECTOR_ORIGIN` environment variable, used for CORS headers, defaults to '*' (allowing all origins) if not explicitly set. While convenient for development, this is a significant security risk in production, potentially exposing sensitive information or allowing unauthorized cross-origin requests.

Similar Servers

Stats

Interest Score58
Security Score3
Cost ClassLow
Stars3
Forks0
Last Update2025-12-01

Tags

OAuthProxyOpenShiftSecurityMCP