New:Socket for Asana Is Now Available.Learn more
Get Started

@grantex/mcp

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grantex/mcp

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

Source
npmnpm
Version
0.1.9
Version published
Weekly downloads
59
-3.28%
Maintainers
1
Weekly downloads
 
Created
Source

@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

VariableRequiredDescription
GRANTEX_API_KEYYesYour Grantex API key (get one free)
GRANTEX_BASE_URLNoOverride API base URL (default: https://api.grantex.dev)

Tools (17)

Agent Management (5)

ToolDescription
grantex_agent_registerRegister a new AI agent with name, description, and declared scopes
grantex_agent_getGet agent details by ID
grantex_agent_listList all registered agents
grantex_agent_updateUpdate agent name, description, or scopes
grantex_agent_deleteDelete an agent

Authorization Flow (1)

ToolDescription
grantex_authorizeCreate an authorization request — returns consent URL for user approval

Token Operations (4)

ToolDescription
grantex_token_exchangeExchange authorization code for a signed grant token (RS256 JWT)
grantex_token_verifyVerify a grant token — check scopes, expiry, and revocation status
grantex_token_refreshRefresh a grant token using a refresh token
grantex_token_revokeRevoke a grant token by JTI

Grant Management (4)

ToolDescription
grantex_grant_getGet grant details by ID
grantex_grant_listList grants with optional filters (agent, principal, status)
grantex_grant_revokeRevoke a grant — cascades to all sub-agent grants
grantex_grant_delegateDelegate a grant to a sub-agent with scope narrowing

Audit Trail (2)

ToolDescription
grantex_audit_listList audit entries with filters
grantex_audit_getGet a specific audit entry by ID

Principal Sessions (1)

ToolDescription
grantex_principal_session_createCreate 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

PackageDescription
@grantex/sdkTypeScript SDK
grantexPython SDK
grantex-goGo SDK
@grantex/mcp-authOAuth 2.1 + PKCE for any MCP server
@grantex/langchainLangChain scope-enforced tools
@grantex/anthropicAnthropic SDK integration
@grantex/cliCommand-line tool

License

Apache-2.0

Keywords

mcp

FAQs

Package last updated on 08 Apr 2026

Related posts