Skip to content

Latest commit

 

History

122 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

authgent

Did your MCP server ship EMA correctly?

Enterprise-Managed Authorization (EMA) shipped 2026-06-18 with launch partners Asana, Atlassian, Canva, Figma, Granola, Linear, and Supabase. Three ship the new id-jag profile in their OAuth metadata; two ship it alongside the OAuth-2.1-forbidden plain PKCE method. authgent is the open-source scanner that catches both — plus 10 more RFC-mapped checks (RFC 7591, 7636, 8414, 8707, 9207, 9449, 9728) plus the MCP 2025-11-25 authorization spec and MCP-EMA-001..004 ID-JAG readiness.

If you fail the scanner, you can run pip install authgent-server to fix what it found — a reference OAuth 2.1 server implementing draft-ietf-oauth-identity-chaining and draft-ietf-oauth-transaction-tokens.

Apache 2.0 · 541 tests · 3 published packages · IETF Internet-Draft on datatracker.

MCP OAuth Grade CI OpenSSF Scorecard PyPI - Server PyPI - SDK npm PyPI Downloads IETF Draft License Cite

Home · Scanner · Registry · PKCE Advertise-Drift · Standards Report · MCP Quickstart · Architecture


Audit any MCP server in 10 seconds

pip install authgent-server
authgent-server lint https://your-mcp-server.example.com
[CRITICAL] MCP-PRM-001: Missing Protected Resource Metadata
[ERROR]    MCP-PKCE-002: PKCE method not enforced at /authorize (advertise-vs-enforce drift)
[ERROR]    MCP-AUD-001: RFC 8707 resource indicators not supported

Or paste a URL into the hosted scanner, embed an SVG badge in your README, or wire the GitHub Action CI gate into pull requests.

The same code path runs in all three places. The methodology documents every check, the calibration set pins the expected grades for known-good and known-bad shapes (asserted in CI), and the disclosure policy governs the registry's 14-day responsible-disclosure window.


Who this is for

Persona What you get Where to start
MCP-server developer"is my OAuth right?" A 10-check audit + an embeddable A–F grade badge. Run in CI on every PR. authgent-server lint
Security engineer"how does the MCP ecosystem grade against the RFCs?" Public registry of how named MCP vendors score. Named-finding catalog with prior-art citations. Registry · PKCE Advertise-Drift
MCP-server operator who failed the scan"how do I fix this?" A drop-in OAuth 2.1 AS designed not to fail its own scanner. Run the server
IETF / spec implementer"a free reference impl to test against." Apache-2.0 implementation of identity-chaining + transaction-tokens, section-by-section conformance map. Standards Report

What the scanner checks

Each check ID is a stable identifier you can suppress in CI, link to in a PR comment, or cite in a disclosure email. Findings are tiered: spec_required findings drive the letter grade; advisory findings are informational.

Check ID What it flags Spec
MCP-PRM-001 RFC 9728 Protected Resource Metadata missing or malformed RFC 9728
MCP-AS-001 RFC 8414 Authorization Server Metadata missing RFC 8414
MCP-PKCE-001 code_challenge_methods_supported lacks S256 or includes plain RFC 7636
MCP-PKCE-002 PKCE advertise-driftS256-only in metadata, plain accepted at /authorize (sub-variant of PKCE downgrade) pkce-drift.md
MCP-AUD-001 RFC 8707 resource indicators not supported RFC 8707
MCP-DCR-001 Dynamic Client Registration not advertised (advisory — DCR is OPTIONAL since MCP 2025-11-25, not grade-affecting) RFC 7591
MCP-DCR-MIRROR-001 DCR returns identical client_id for distinct registrations (Obsidian Jan 2026) Obsidian disclosure
MCP-CSRF-001 Implicit grant advertised (response_type=token) OAuth 2.1
MCP-ISS-001 RFC 9207 iss parameter not advertised (advisory) RFC 9207
MCP-REFRESH-001 Refresh tokens issued without DPoP support (advisory) RFC 9449
MCP-PASSTHROUGH-001 Tool endpoints answer 200 unauthenticated (heuristic, advisory) MCP 2025-11-25

Run the server

If you failed the scanner — or you're starting fresh and want OAuth 2.1 that ships RFC 8707, RFC 9207, RFC 9449, and identity-chaining out of the box — install authgent-server:

pip install authgent-server
authgent-server run     # auto-init, listens on http://localhost:8000

That's it. Auto-generates .env + ES256 signing keys on first run. SQLite by default; set AUTHGENT_DATABASE_URL=postgresql+asyncpg://… for production. Docker / Helm / Render / Fly templates in server/.

Bridge an existing IdP

# Exchange an Auth0 / Clerk / Okta id_token to start a delegation chain
curl -X POST http://localhost:8000/token \
  -d "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
  -d "subject_token=$AUTH0_ID_TOKEN" \
  -d "subject_token_type=urn:ietf:params:oauth:token-type:id_token"

Keep Auth0/Okta for human SSO, social login, compliance. Bridge into authgent for the agent-delegation layer via RFC 8693 token exchange.


Specifications implemented

Spec Status
draft-ietf-oauth-identity-chaining Reference impl — §2.1–§2.5, §3, §5.1–5.5 (map)
draft-ietf-oauth-transaction-tokens Reference impl — §3, §7, §11, §13.6, §13.14 (map)
OAuth 2.1 (draft) + RFC 6749 Authorization Code + PKCE (S256), Client Credentials, Refresh, Device Auth
RFC 8693 Token Exchange with nested act claims
RFC 9449 DPoP — sender-constrained access tokens (opt-in via AUTHGENT_REQUIRE_DPOP=true)
RFC 9728 Protected Resource Metadata
RFC 8414 OAuth 2.0 Authorization Server Metadata
RFC 7591 Dynamic Client Registration
RFC 7662 Token Introspection
RFC 7009 Token Revocation (with ownership check)
RFC 8628 Device Authorization Grant
RFC 8707 Resource Indicators
RFC 9207 iss parameter on /authorize redirect
RFC 9457 Problem Details for HTTP APIs
MCP 2026-07-28 OAuth discovery + RFC 8414 well-known suffix + RFC 9207 iss

Section-by-section spec → file:func mapping in STANDARDS.md.


SDKs

pip install authgent     # Python — middleware for FastAPI/Flask, MCP adapter
npm install authgent     # TypeScript — middleware for Express/Hono, MCP adapter

Both verify tokens, walk delegation chains, validate DPoP, and ship MCP adapters. Full docs: Python SDK · TypeScript SDK.


Deeper reading


Contributing

git clone https://github.com/authgent/authgent.git
cd authgent/server
pip install -e ".[dev]"
pytest -v   # 541 tests

See CONTRIBUTING.md. Apache 2.0.

About

Open-source MCP-OAuth conformance scanner + IETF reference implementation of draft-ietf-oauth-identity-chaining-14 and draft-ietf-oauth-transaction-tokens-08. CLI + GitHub Action + hosted scanner + public registry. Apache 2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages