Register your first MCP server
ModGate sits in front of your existing MCP server and enforces OAuth 2.1 automatically. You keep hosting your server wherever it is — no code changes required.
Create a free ModGate account
Go to app.modgate.io/sign-up and create an account. The Free plan includes 500 agent authentications per month — no credit card required.
Register your MCP server
In your dashboard, go to MCP Servers → Register server. Enter a name and the HTTPS URL of your MCP server endpoint.
ModGate will save your server and assign it a unique server ID (e.g. srv_abc123). You'll use this to route agent traffic.
Point your MCP client at the ModGate proxy
Instead of having AI agents connect directly to your MCP server, point them at your ModGate proxy URL:
# Direct connection (before ModGate)
https://your-mcp-server.workers.dev/mcp
# Through ModGate proxy (after)
https://api.modgate.io/mcp/{tenantId}/{serverId}Your tenantId and serverId are visible in your dashboard on the server detail page.
Discover the OAuth 2.1 endpoints
Any compliant MCP client (Claude Desktop, custom agents) will auto-discover ModGate's auth endpoints via the standard /.well-known endpoint:
curl https://api.modgate.io/.well-known/oauth-authorization-serverThis returns the full OAuth 2.1 server metadata including:
authorization_endpoint— where agents initiate authtoken_endpoint— where agents exchange codes for tokensregistration_endpoint— Dynamic Client Registration
Test with your first agent
Send a request to your ModGate proxy URL without a token to confirm the gate is enforcing auth:
curl https://api.modgate.io/mcp/{tenantId}/{serverId}/tools/list
# Expected response:
# HTTP 401 Unauthorized
# {"error":"unauthorized","error_description":"Bearer token required."}Now register a client and complete the OAuth 2.1 flow. See the OAuth 2.1 setup guide for the full flow, or use an existing MCP client that supports OAuth — it will handle registration and auth automatically.
Check the audit log
After a successful authentication, go to Audit Log in your dashboard. You'll see the event logged with agent identity, tool name, timestamp, and outcome.
Every tool call, token issuance, and access decision is logged automatically — no additional configuration required.