npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@grantex/mcp

v0.1.9

Published

MCP server for AI agent authorization — register agents, issue scoped tokens, verify grants, audit actions, revoke access

Readme

@grantex/mcp

MCP server for AI agent authorization. 17 tools for managing agents, scoped tokens, grants, audit trails, and principal sessions — works with Claude Desktop, Cursor, and Windsurf.

What is Grantex? An open authorization protocol for AI agents (OAuth 2.0 for agents). Scoped delegation tokens, real-time revocation, and immutable audit trails. Learn more

Homepage | Docs | Sign Up Free | GitHub | Discord

Quick Start

npm install -g @grantex/mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "grantex": {
      "command": "grantex-mcp",
      "env": {
        "GRANTEX_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "grantex": {
      "command": "grantex-mcp",
      "env": {
        "GRANTEX_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "grantex": {
      "command": "grantex-mcp",
      "env": {
        "GRANTEX_API_KEY": "your-api-key"
      }
    }
  }
}

Environment Variables

| Variable | Required | Description | |---|---|---| | GRANTEX_API_KEY | Yes | Your Grantex API key (get one free) | | GRANTEX_BASE_URL | No | Override API base URL (default: https://api.grantex.dev) |

Tools (17)

Agent Management (5)

| Tool | Description | |---|---| | grantex_agent_register | Register a new AI agent with name, description, and declared scopes | | grantex_agent_get | Get agent details by ID | | grantex_agent_list | List all registered agents | | grantex_agent_update | Update agent name, description, or scopes | | grantex_agent_delete | Delete an agent |

Authorization Flow (1)

| Tool | Description | |---|---| | grantex_authorize | Create an authorization request — returns consent URL for user approval |

Token Operations (4)

| Tool | Description | |---|---| | grantex_token_exchange | Exchange authorization code for a signed grant token (RS256 JWT) | | grantex_token_verify | Verify a grant token — check scopes, expiry, and revocation status | | grantex_token_refresh | Refresh a grant token using a refresh token | | grantex_token_revoke | Revoke a grant token by JTI |

Grant Management (4)

| Tool | Description | |---|---| | grantex_grant_get | Get grant details by ID | | grantex_grant_list | List grants with optional filters (agent, principal, status) | | grantex_grant_revoke | Revoke a grant — cascades to all sub-agent grants | | grantex_grant_delegate | Delegate a grant to a sub-agent with scope narrowing |

Audit Trail (2)

| Tool | Description | |---|---| | grantex_audit_list | List audit entries with filters | | grantex_audit_get | Get a specific audit entry by ID |

Principal Sessions (1)

| Tool | Description | |---|---| | grantex_principal_session_create | Create a session token for end-user grant management |

Use Cases

  • Register agents from Claude Desktop and manage their permissions conversationally
  • Authorize agents with specific scopes through the consent UI flow
  • Inspect grants to see what permissions an agent has and when they expire
  • Revoke access instantly when an agent misbehaves — cascades to all sub-agents
  • Audit what agents did — every action recorded with hash-chained integrity
  • Delegate from one agent to another with automatic scope narrowing

What Makes This Different

Unlike API key or password-based MCP servers, Grantex provides:

  • Scoped permissions — agents get exactly the access they need, no more
  • Human consent — users approve what agents can do via a consent UI
  • Real-time revocation — revoke any agent's access in milliseconds
  • Delegation chains — agent A can delegate to agent B with narrower scopes
  • Audit trail — every action logged with cryptographic integrity
  • Offline verification — any service can verify tokens via JWKS, no network call

Grantex Ecosystem

| Package | Description | |---|---| | @grantex/sdk | TypeScript SDK | | grantex | Python SDK | | grantex-go | Go SDK | | @grantex/mcp-auth | OAuth 2.1 + PKCE for any MCP server | | @grantex/langchain | LangChain scope-enforced tools | | @grantex/anthropic | Anthropic SDK integration | | @grantex/cli | Command-line tool |

License

Apache-2.0