Skip to content
IsoKron

No credential, payment card or government ID inputs

OpenAI lists credentials (passwords, API keys, MFA/OTP codes), payment card data and government identifiers as restricted data a plugin must not collect, so a tool argument for any of them blocks review; take credentials through OAuth.

Check openai-restricted-input · OpenAI plugin directory · default severity: blocking (or attention, depending on the case) · rubric 2.1.0

What fails

OpenAI lists these under Restricted Data that plugins must not collect, solicit or process, next to payment card data and government identifiers. An argument named password, api_key, otp, card_number or ssn asks the model to pass one through the chat. Boolean flags such as hide_secret or withCredentials are not inputs of this kind. A bare "token" argument is marked for attention, since it may be a pagination token.

The rule

Access credentials and authentication secrets (such as API keys, MFA/OTP codes, or passwords).

Source: OpenAI plugin guidelines, section 4.2

How to fix it

Take credentials through the server's own authorization (OAuth) instead of tool arguments, and remove the field.

  1. Remove password, api_key, secret, otp, card_number, cvv and ssn arguments.
  2. Authenticate through the server’s OAuth flow and read the token from the request, not from tool arguments.
  3. Rename a pagination "token" argument to cursor or page_token so it is not mistaken for a credential.

TypeScript SDK

TypeScript
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';

const server = new McpServer({ name: 'issues', version: '1.0.0' });

server.registerTool(
  'list_repositories',
  {
    title: 'List repositories',
    description: 'List repositories the signed-in user can access; authentication comes from the connection, not an argument. Use when the user asks which repositories exist.',
    inputSchema: z.strictObject({
      cursor: z.string().optional().describe('next_cursor from the previous page'),
    }),
    annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
  },
  async ({ cursor }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);

Python SDK

Python
from typing import Annotated

from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations

server = MCPServer("issues")

@server.tool(
    title="List repositories",
    annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
)
def list_repositories(
    cursor: Annotated[str | None, Field(description="next_cursor from the previous page")] = None,
) -> str:
    """List repositories the signed-in user can access; authentication comes from the connection, not an argument. Use when the user asks which repositories exist."""
    return "Done"

Run against @modelcontextprotocol/server 2.4.0, mcp 2.3.0 and fastmcp 4.2.2 on 2026-11-18; the checker confirms this check passes on the tool list each snippet produces.

Questions

How should an MCP server get the user’s API key then?

Through authorization: OAuth for remote servers, or configuration for local ones. The model should never see or pass the secret.

Are boolean flags like include_secrets flagged?

No. Flags such as hide_secret or withCredentials are not inputs of a secret and are skipped.

How this check is graded

It counts toward: OpenAI plugin directory, Poisoning and hidden text. See the rubric.

Last verified against OpenAI plugin guidelines, section 4.2 on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.

Check your tool list: paste your tools/list, nothing is sent anywhere