Authentication
MCP Rank uses API keys for authentication.API Keys
Include your API key in theX-API-Key header:
Getting an API Key
- Sign up at mcprank.com
- Go to Dashboard > API Keys
- Click “Create New Key”
- Copy and store the key securely
Key Format
API keys follow this format:sk_mcp_rank_a1b2c3d4e5f6789012345678abcdef01
MCP Identity Tokens
For proxy requests, you also need an MCP Identity token (JWT) in theAuthorization header:
Token Structure
MCP Identity tokens are JWTs with these claims:Getting Tokens
Tokens are returned when a user completes the OAuth flow:Refreshing Tokens
Access tokens expire after 1 hour. Use the refresh token to get new ones:Security Best Practices
Keep Keys Secret
Never commit API keys to version control or expose them in client-side code.
Use Environment Variables
Store keys in environment variables, not in code.
Rotate Keys Regularly
Rotate API keys periodically, especially if compromised.
Use Minimal Scopes
Only request the permissions your app needs.