# 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. Last verified against OpenAI plugin guidelines, section 4.2 on 2026-11-18.

## 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](https://developers.openai.com/plugins/plugin-guidelines)

## 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

```ts
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"
```

## 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.

## Related checks

- [No x-mcp-header on secrets or personal data](https://isokron.ai/mcp-check/checks/spec-x-mcp-header-sensitive)
- [Metadata does not seek secrets or local files](https://isokron.ai/mcp-check/checks/sec-secret-seeking)
- [No inputs for memory, chat history or conversation data](https://isokron.ai/mcp-check/checks/anthropic-conversation-data)
- [Directory review rules for MCP tools](https://isokron.ai/mcp-check/checks/directories)

Counts toward: OpenAI plugin directory, Poisoning and hidden text.

Rubric: https://isokron.ai/mcp-check/rubric

Check your tool list: https://isokron.ai/mcp-check
