ChatGPT rejects MCP tool with api_key or password parameter: how to fix
Tools must not collect credentials, payment data or government IDs as parameters. Remove api_key, password, token params and use OAuth instead.
Remove any tool parameter named like a credential, such as api_key, password, token, secret, ssn, card_number or otp, and authenticate through OAuth or an Authorization header instead. The rule cites ChatGPT guideline 4.2b, which forbids collecting credentials, payment data and government IDs through tools.
What you see
- A scan reports
schema.secret-param: "Credential-like parameters: api_key". It is a blocker. - A ChatGPT review rejection citing credential collection. The exact reviewer text is not verified here.
Why it happens
The easy way to give a tool access to a third-party service is a parameter that the user (or the model) fills with a key. That means secrets pass through the model, the conversation log and the client UI. The checker matches parameter names against: api_key, apikey, password, passwd, pwd, secret, client_secret, access_token, auth_token, bearer, ssn, social_security*, card_number, credit_card, cvv, cvc, otp, mfa_code, private_key.
Check it yourself
curl -s -X POST https://mcp.acme.example/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
| jq -r '.result.tools[] | .name as $n | (.inputSchema.properties // {}) | keys[] | select(test("key|pass|secret|token|ssn|card|cvv|cvc|otp|mfa";"i")) | "\($n): \(.)"'
Fix
Before:
{ "name": "sync_crm", "inputSchema": { "type": "object", "properties": { "api_key": { "type": "string" } }, "required": ["api_key"] } }
After: drop the parameter and read the caller's identity from the token the client sends:
server.registerTool("sync_crm", { description: "Sync contacts from the connected CRM." }, async (_args, extra) => {
const userId = extra.authInfo?.clientId; // from your OAuth validation
const crmKey = await vault.getKeyFor(userId);
return runSync(crmKey);
});
If a tool needs a third-party credential, send the user through your OAuth flow (or a link-out connection page you host) once, store it server-side, and refer to it by user. For a payment or identity step, return a link to your own hosted page rather than asking for the number in chat.
A parameter that is only a name collision, such as token meaning a pagination token, should be renamed (page_cursor).
Verify
Re-run the jq command with no output. Re-scan and resubmit.
Which clients care
The rule is tagged ChatGPT and Claude. The cited policy is OpenAI's (4.2b); the Claude basis is not stated in the rule text.
Source
OpenAI plugin guidelines: https://developers.openai.com/plugins/plugin-guidelines
Run a free scan at https://mcpshipyard.com/scan to check every rule at once.
Check every rule at once
A free scan runs this check and the other 152 against your live URL.