mcp-server icon indicating copy to clipboard operation
mcp-server copied to clipboard

Security: make token preview in openapi_server_info fully disableable

Open francescobianco opened this issue 7 months ago • 0 comments

Summary

openapi_server_info currently returns a masked preview of the active token. In shared demos, screenshots, support threads, or copied logs, even partial token disclosure may be undesirable.

Reproduction

  1. Call openapi_server_info with a configured token.
  2. Inspect the response payload.
  3. Notice that a masked token preview is included.

Expected

A safe-by-default mode should allow operators to disable token previews entirely.

Actual

The token preview is always part of the diagnostics payload when available.

Suggested direction

A small env flag such as MCP_REDACT_TOKENS=full would likely be enough.

francescobianco avatar Apr 14 '26 09:04 francescobianco