authmcp-gateway
🔐 Secure authentication proxy for MCP servers with JWT auth, real-time monitoring, and admin dashboard. Production-ready Docker deployment.
claude mcp add --transport stdio loglux-authmcp-gateway python -m authmcp_gateway \ --env GATEWAY_PORT="9105" \ --env AUTH_REQUIRED="true" \ --env ADMIN_PASSWORD="secure-password" \ --env ADMIN_USERNAME="admin" \ --env JWT_SECRET_KEY="your-jwt-secret-key"
How to use
AuthMCP Gateway acts as a full MCP protocol proxy that sits in front of one or more backend MCP servers. It handles authentication, authorization, and monitoring, exposing a single authenticated endpoint while transparently forwarding all MCP capabilities—tools, resources, prompts, and completions—to the connected backends. With support for OAuth 2.0 and Dynamic Client Registration (DCR), MCP clients can self-register and obtain access tokens, simplifying client provisioning. Administrators can manage users, view security events, and monitor real-time MCP activity from a unified admin dashboard. To use it, configure your MCP backends in the gateway (via the admin panel or API), start the gateway, and authenticate to obtain a JWT token which you then present to access MCP endpoints through the gateway's proxy.
The gateway supports a full MCP feature set, including:
- Tools: list, call with intelligent routing and mappings across multiple backends
- Resources: list, read, and templates for resources across providers
- Prompts: list and get for reusable prompts
- Completions: complete with ref-based routing to the appropriate backend
- Dynamic capabilities discovery: only advertise capabilities supported by each backend
- Real-time monitoring and security logging: live activity feed, performance metrics, and security events
- Admin dashboard: user management, server configuration, token health, and security auditing
To start using it, obtain an access token via the OAuth flow or the gateway’s login endpoint, then include the token in requests to the MCP endpoints exposed by the gateway. The gateway will route requests to the appropriate backend MCP server and return results back to the client.
How to install
Prerequisites
- Python 3.11+ installed on your system
- Network access to download dependencies
Option A: Install from PyPI (recommended)
- Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows use venv\Scripts\activate
- Install the package from PyPI
pip install authmcp-gateway
- Start the gateway (examples assume running as a module)
authmcp-gateway start
Option B: Run directly from source (if cloning the repo)
- Ensure dependencies are installed from pyproject.toml
pip install -e .
- Run the gateway
python -m authmcp_gateway
Option C: Docker (if available)
- Build and run using Docker (adjust environment as needed)
docker run -p 9105:8000 -e JWT_SECRET_KEY=your-secret-key -e AUTH_REQUIRED=true --name authmcp-gateway authmcp-gateway:latest
Configuration
- Create or edit the environment file (.env) or use command line overrides to customize port, admin credentials, and JWT key. See the README under Environment Variables for the exact options.
Additional notes
Tips and common issues:
- Ensure JWT_SECRET_KEY is set; otherwise tokens cannot be signed and requests will fail auth.
- If you enable AUTH_REQUIRED, clients must present a valid token obtained via the OAuth flow or login endpoint.
- When running behind a reverse proxy, map the gateway port to your public interface and adjust GATEWAY_PORT if needed.
- For Docker deployments, expose the gateway port (default 9105) and configure .env or environment variables accordingly.
- If you encounter startup errors related to missing dependencies, ensure your Python environment matches the required version (Python 3.11+).
Related MCP Servers
mcp
Official MCP Servers for AWS
mcp-router
A Unified MCP Server Management App (MCP Manager).
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
mcp -memos-py
A Python package enabling LLM models to interact with the Memos server via the MCP interface for searching, creating, retrieving, and managing memos.
lmstudio-toolpack
A MCP stdio toolpack for local LLMs