Audit an MCP server for OAuth 2.1 and security gaps
audit_mcp_serverScans remote or local MCP servers for OAuth 2.1, audience validation, redirect, metadata, secret, and prompt-injection gaps, returning a letter grade, numeric score, and findings.
Instructions
Scan a remote MCP server URL (or a local MCP connector directory) for OAuth 2.1, RFC 8707 audience validation, RFC 8252 loopback redirects, OAuth metadata, scope posture, secret surface, tool manifest drift, and tool-description prompt injection patterns. Returns a letter grade, numeric score and the full findings list. Runs zero-auth probing by default (metadata-level checks only). Pass "authToken" to probe behind authentication. Pass "probeAudienceToken" to enable AUDIENCE-001 (cross-audience token check, RFC 8707). Pass "probeMissingAudToken" to enable AUDIENCE-002 (missing-aud-claim check, catches the if (aud && aud !== me) reject early-exit bug). Pass "probeDcrLoopback: true" to enable AUTH-006 (writes a throw-away client registration to the authorization server). The scanner never calls any of the server's tools.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>"
},
"name": "audit_mcp_server"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | MCP server URL (https://...) or absolute path to a local connector directory. | |
| authToken | No | Bearer token to send on every probe request. Use for servers that require authentication beyond initialize. | |
| timeoutMs | No | Per-request timeout in milliseconds. Default 8000. | |
| probeDcrLoopback | No | Opt into AUTH-006 active Dynamic Client Registration loopback probe (RFC 8252 Section 7.3). Writes a throw-away client to the authorization server; off by default. | |
| probeAudienceToken | No | Bearer token minted for a DIFFERENT resource on the same authorization server. Enables AUDIENCE-001 (RFC 8707 cross-audience check). | |
| probeMissingAudToken | No | Bearer token whose JWT payload has NO aud claim at all. Enables AUDIENCE-002 (catches `if (aud && aud !== me) reject` early-exit bug per RFC 9068 Section 4). |