MCP Server Authorization: Options and Limits
Use the MCP authorization specification for HTTP transport access, then add Grantex when tools must verify agent-specific delegated authority.
MCP authorization is optional and transport-specific. The current MCP authorization specification defines an OAuth-based flow for HTTP transports, including protected-resource metadata and authorization-server discovery. Stdio deployments use their host environment rather than that HTTP flow.
Two distinct Grantex packages
@grantex/mcp: manage Grantex through MCP tools
This MCP server exposes Grantex management operations to a configured MCP client. It uses a Grantex API key supplied by the host environment. It does not by itself turn every third-party MCP server into an authorized resource server.
{
"mcpServers": {
"grantex": {
"command": "npx",
"args": ["@grantex/mcp"],
"env": { "GRANTEX_API_KEY": "set-in-the-host-environment" }
}
}
}
@grantex/mcp-auth@2.0.2: endpoint evaluation package
This package can be used to evaluate OAuth 2.1-style authorization endpoints and middleware. Version 2.0.2 is not the recommended production integration path.
| Version 2.0.2 boundary | Current behavior | Required response |
|---|---|---|
| Authorization-code storage | Non-configurable, process-local store | Use one process for evaluation; do not horizontally scale |
| Consent UI | consentUi is discovery metadata only | Provide and validate a host-owned consent experience |
| Code handoff | The Grantex code is not persisted for the token handler | Use a primary SDK flow until a corrected release is published |
| Revocation enforcement | Signature and claim checks do not query live grant state | Perform an online check or synchronize revocation data |
Recommended production pattern today
- Implement the current MCP authorization specification with an established authorization server and maintained MCP SDK.
- Use
@grantex/sdk@0.3.13or direct JWKS validation for the Grantex agent grant. - Validate issuer, audience, signature, expiry, principal, and required tool scope at the MCP resource server.
- Check or synchronize current grant state where revocation must take effect before token expiry.
- Log tool execution separately when you need an audit record; token verification alone is not an execution log.
npm install @grantex/sdk@0.3.13
// At the MCP tool boundary:
// 1. verify the signed grant token
// 2. require the tool's exact scope
// 3. check current state when revocation matters
// 4. invoke the tool only after authorization succeeds
Do not describe @grantex/mcp-auth@2.0.2 as drop-in, horizontally scalable, production-ready, or a complete hosted consent system.
Review the package boundary before choosing an MCP path
The release page is the source of truth for versions, runtimes, limitations, and workarounds.
MCP Auth limitations Release statusTechnical review updated 12 July 2026.