Learn how to secure your MCP tools with API keys, rate limiting, and audit logs.
Use the demo key to test the API:
mcp_demo_key_123
Add the API key to your requests:
curl -H "Authorization: Bearer mcp_demo_key_123" \
https://mcp-gateway-two.vercel.app/api/me
{
"user": {
"id": "demo",
"email": "demo@mcp.dev",
"name": "Demo"
},
"key": "mcp_demo"
}
/
Health check endpoint. Returns gateway status.
Response:
{
"name": "MCP Gateway",
"status": "ok",
"version": "0.1.0"
}
/api/demo
Get demo credentials and usage info.
Response:
{
"demoKey": "mcp_demo_key_123",
"usage": "Bearer mcp_demo_key_123"
}
/api/tools
List all registered MCP tools.
Response:
{
"tools": [
{ "id": "weather", "name": "Weather API" },
{ "id": "time", "name": "World Time" }
]
}
/api/me
Auth Required
Get current user profile and API key info.
Headers:
Authorization: Bearer mcp_demo_key_123
Response:
{
"user": { "id": "demo", "email": "demo@mcp.dev", "name": "Demo" },
"key": "mcp_demo"
}
/api/keys
Auth Required
List all your API keys.
/api/keys
Auth Required
Create a new API key.
Request body:
{ "name": "My New Key" }
Response:
{
"key": "mcp_a1b2c3d4e5f6...", // Save this! Only shown once
"prefix": "mcp_a1b2c3d4"
}
Add MCP Gateway to your Claude Desktop config:
{
"mcpServers": {
"my-secure-tool": {
"url": "https://mcp-gateway-two.vercel.app/mcp/my-tool",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
https://mcp-gateway-two.vercel.app
All API endpoints are relative to this base URL.
Questions? Join the waitlist for early access and priority support.