MCP + Grantex

Grantex for MCP Applications and Servers

Use Grantex management tools from an MCP client, or verify an agent-specific Grantex grant at an MCP tool boundary.

How MCP authorization and Grantex fit together

MCP transport authorization

The current MCP specification defines optional OAuth-based authorization for HTTP transports. Stdio deployments obtain credentials from the host environment. This authenticates access to the MCP resource, but it does not by itself model an internal agent or delegated sub-agent chain.

Agent-specific authority

After MCP transport access succeeds, a tool can verify a Grantex grant to identify the acting agent and principal, require a narrow scope, and enforce delegation or grant-state policy before execution.

Choose the correct Grantex path

Management tools: @grantex/mcp

Expose Grantex agent, grant, token, budget, and audit-management operations to a host-configured MCP client.

Production tool enforcement: primary SDK or JWKS

Use @grantex/sdk@0.3.13 or direct JWKS validation at the MCP tool boundary and require the exact agent scope.

MCP Auth 2.0.2: evaluation only

@grantex/mcp-auth@2.0.2 has process-local code storage, metadata-only consent, incomplete code handoff, and no live revocation lookup. Do not use it as the production path today.

Current MCP authorization

For HTTP transports, use an established authorization server and maintained MCP SDK that implement the current protected-resource discovery and token validation requirements.

Audit tool execution separately

Record the agent, principal, grant, tool, outcome, and timestamp at the execution boundary; a valid token is not an execution record.

Run Grantex management tools from an MCP client

npm install @grantex/mcp
{
  "mcpServers": {
    "grantex": {
      "command": "npx",
      "args": ["@grantex/mcp"],
      "env": {
        "GRANTEX_API_KEY": "set-in-the-host-environment"
      }
    }
  }
}

This configuration gives the selected MCP client access to Grantex management operations. Review the client, host, and tool permissions before exposing administrative functions.

Security boundaries to test

Issuer and audience

Reject tokens from an unexpected issuer or intended for another MCP resource.

Per-tool scopes

Require the exact scope at each protected tool, not only at session creation.

Current grant state

Use online or synchronized state when revocation must take effect before JWT expiry.

Session separation

Never use an MCP session identifier as authentication or authorization evidence.

Secret handling

Keep API keys and grant tokens in trusted host storage and redact them from logs.

Evaluation limits

Track the documented MCP Auth 2.0.2 limitations until a corrected release is verified.

Verification, revocation, and audit boundary

This integration enforces authorization only where its wrapper or middleware is installed. Local JWT verification checks signatures and claims after JWKS retrieval; it does not prove current revocation unless the verifier performs an online state check or synchronizes revocation data.

Token verification does not create a consent record or prove that a tool executed. Use the configured authorization flow for grant decisions and add an audit integration at the execution boundary when action records are required.

Evaluate the right MCP authorization layer

Start with the current MCP transport requirements, then add agent-specific grant enforcement where the tool needs it.