Skip to content
Back to search

mcp-issuer-check

See which OAuth server your MCP servers send your login to, verify it isn't impersonated, and get alerted when it changes. Zero deps.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/garag0l--mcp-issuer-check/badge.svg)](/listings/garag0l--mcp-issuer-check)

HTML

<a href="/listings/garag0l--mcp-issuer-check"><img src="/api/listings/garag0l--mcp-issuer-check/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pipx install mcp-issuer-check

Python 3.11+, no third-party dependencies.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 134 lines
  1. # mcp-issuer-check
  2. **See which OAuth server your MCP servers send your login to, verify it isn't being impersonated, and get alerted if it changes.**
  3. [![CI](https://github.com/garag0l/mcp-issuer-check/actions/workflows/ci.yml/badge.svg)](https://github.com/garag0l/mcp-issuer-check/actions/workflows/ci.yml)
  4. [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
  5. ![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)
  6. ![Zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
  7. When you connect Claude, Cursor, VS Code or another client to a remote MCP server, **the server tells the client which authorization server to log you in with**. The client then sends your authorization code, PKCE verifier, client secret or refresh token there.
  8. `mcp-issuer-check` reads your MCP client configs, finds each remote server's login server the same way a client does, and:
  9. - **verifies the metadata**: the RFC 8414 `issuer` must match the authorization server URL, the RFC 9728 `resource` must match the server you configured, and everything must use HTTPS;
  10. - **pins** the login servers you've approved (trust on first use) and flags any later change (`PIN-CHANGED`);
  11. - **guards against SSRF**: it won't follow an authorization server that points at a private or internal address.
  12. It sends no credentials and reads no secrets from your configs, only server names and URLs.
  13. ![mcp-issuer-check output](docs/demo.svg)
  14. ## Why this exists
  15. In 2026 the official MCP SDKs shipped fixes for OAuth clients that **sent credentials to whichever authorization server the MCP server named** ([GHSA-6qxp-vccf-f47h](https://github.com/advisories/GHSA-6qxp-vccf-f47h), [GHSA-qx49-fqc8-xw99](https://github.com/advisories/GHSA-qx49-fqc8-xw99)). A malicious or compromised MCP server could name its own authorization server. Or it could publish no metadata and serve some that presents your real provider as the `issuer`.
  16. The SDK fixes bind *stored* credentials to an issuer. Everything else rests on the client trusting what the server advertises the first time. The Cloud Security Alliance's [November 2026 note](https://labs.cloudsecurityalliance.org/research/csa-research-note-mcp-transport-trust-gap-20261109-csa-style/) recommends keeping an allowlist that maps each MCP server to the authorization servers it may name. No tool did that, so this one does, from your existing client configs.
  17. ## Install
  18. ```bash
  19. pipx install mcp-issuer-check
  20. ```
  21. Python 3.11+, no third-party dependencies.
  22. ## Usage
  23. ```bash
  24. mcp-issuer-check # discover servers in your client configs and check them
  25. mcp-issuer-check list # just show which remote MCP servers were found, and where
  26. mcp-issuer-check pin # approve the current login servers (refuses servers with bad metadata)
  27. mcp-issuer-check --url https://mcp.example.com/mcp # check specific servers
  28. mcp-issuer-check --project path/to/repo # include .mcp.json / .cursor / .vscode configs there
  29. mcp-issuer-check -f json # machine-readable
  30. mcp-issuer-check --fail-on high # exit 1 only on high (default: medium)
  31. ```
  32. Typical flow: run it once, review the `login via` lines, run `pin`, then run it again whenever you like (or on a schedule). A change is reported as `PIN-CHANGED`: don't sign in until the provider confirms it.
  33. Exit codes: `0` nothing at or above `--fail-on`, `1` findings (or `pin` refused a server).
  34. ### Configs it reads
  35. | Client | Files |
  36. |---|---|
  37. | Claude Code | `~/.claude.json` (user and per-project), `~/.claude/settings.json`, `.mcp.json` |
  38. | Claude Desktop | `claude_desktop_config.json` (Windows, macOS, Linux paths) |
  39. | Cursor | `~/.cursor/mcp.json`, `.cursor/mcp.json` |
  40. | VS Code | user `mcp.json` and `settings.json` (JSONC), `.vscode/mcp.json` |
  41. | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
  42. | Gemini CLI | `~/.gemini/settings.json`, `.gemini/settings.json` |
  43. | Codex | `~/.codex/config.toml` |
  44. Local (stdio) servers are skipped because they don't use OAuth discovery.
  45. ### Findings
  46. | Code | Severity | Meaning |
  47. |---|---|---|
  48. | `ISSUER-MISMATCH` | high | Authorization server metadata claims a different `issuer` than its URL (RFC 8414 §3.3). This is the impersonation shape. |
  49. | `PIN-CHANGED` / `ISSUER-CHANGED` | high | Login server differs from the one you pinned. |
  50. | `INSECURE-TRANSPORT` | high | Server, metadata or endpoint over plain HTTP (allowed only on loopback). |
  51. | `AS-PRIVATE-ADDRESS` | high | Authorization server on a private/internal address; not fetched. |
  52. | `RESOURCE-MISMATCH` | medium | Metadata describes a different resource than the configured URL (RFC 9728 §3.3). |
  53. | `PRM-CROSS-ORIGIN` | medium | The 401 points to resource metadata on another origin. |
  54. | `NO-METADATA` | medium | Requires auth but publishes no RFC 9728 metadata, so clients fall back to legacy discovery. |
  55. | `ENDPOINT-GONE` | medium | Configured URL returns 404/410. |
  56. | `AS-NO-METADATA` | medium | No RFC 8414/OIDC metadata for a listed authorization server. |
  57. | `ENDPOINT-OTHER-HOST` | low | Token/authorization/registration endpoint on a different host than the issuer. Usually fine; confirm it. |
  58. | `NOT-PINNED`, `PIN-UNVERIFIED`, `UNREACHABLE` | low | Review or retry. |
  59. | `AS-OTHER-HOST`, `NO-OAUTH` | info | Login is hosted elsewhere (common: GitHub, Stripe), or the server is public. |
  60. ### GitHub Action: alert when a provider changes its login server
  61. ```yaml
  62. name: mcp-issuer-check
  63. on:
  64. schedule: [{cron: "23 7 * * *"}]
  65. workflow_dispatch:
  66. jobs:
  67. check:
  68. runs-on: ubuntu-latest
  69. steps:
  70. - uses: actions/checkout@v7
  71. - uses: garag0l/mcp-issuer-check@v0.1.1
  72. with:
  73. urls: |
  74. https://mcp.notion.com/mcp
  75. https://api.githubcopilot.com/mcp/
  76. pins: .github/mcp-pins.json # create with: mcp-issuer-check pin --url ... --pins .github/mcp-pins.json
  77. fail-on: high
  78. ```
  79. ### TLS errors
  80. If a server works in your browser but shows `TLS verification failed`, your Python CA store is probably missing a root. Some Windows setups lack the newer Let's Encrypt roots, for example. Use `--ca-bundle /path/to/cacert.pem` (e.g. from `certifi`) or set `SSL_CERT_FILE`. Verification is never turned off.
  81. ## How it discovers (same order as the MCP spec)
  82. 1. Unauthenticated `initialize` POST, read `WWW-Authenticate: Bearer resource_metadata="…"`.
  83. 2. RFC 9728 metadata: the URL from step 1, then `/.well-known/oauth-protected-resource/<path>`, then the root.
  84. 3. For each `authorization_servers` entry: RFC 8414 `/.well-known/oauth-authorization-server/<path>`, then the OpenID Connect variants.
  85. Redirects are not followed. Responses are capped at 512 KB.
  86. Tested against 20 public MCP server endpoints from 19 providers (Notion, Linear, Sentry, GitHub, Atlassian, Stripe, Asana, Cloudflare, PayPal, Square, Intercom, Vercel, Supabase, Hugging Face, Context7, DeepWiki, monday.com, HubSpot, Webflow) and a mock server covering every finding.
  87. ## Scope and responsible use
  88. This is a defensive tool for checking the MCP servers *you* use or are authorized to assess. It only fetches public discovery metadata, the same requests any MCP client makes before you sign in.
  89. ## Contributing
  90. Issues and PRs are welcome, especially config locations for more clients, and real-world metadata quirks (with the server URL).
  91. ```bash
  92. python -m venv .venv && . .venv/bin/activate
  93. pip install -e ".[dev]"
  94. pytest && ruff check . && ruff format --check .
  95. ```
  96. ## License
  97. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.