Grantd MCP server: let your AI agent act on a user's behalf across third-party APIs via OAuth.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
OAuth-for-agents: a dead-simple, MCP-native OAuth token broker that lets AI agents securely act on a user's behalf across third-party APIs (Gmail, Slack, GitHub, Notionβ¦). Tokens are vaulted server-side and never touch the LLM.
Stack: TypeScript Β· Hono Β· Postgres Β· generic OAuth2 driven by a declarative provider registry Β· envelope encryption (AES-256-GCM, key-versioned) Β· Postgres advisory locks for refresh concurrency (no Redis). Security model and how to report issues: SECURITY.md.
Grantd vaults users' OAuth tokens, so security is the product, not a feature. The fundamentals:
sk_ key is shown once.postgres.js tagged template.state + session tokens; PKCE (S256) where the provider supports it.This is open-source infrastructure you run yourself. Self-hosting responsibilities (key custody, TLS, an edge/WAF for volumetric DoS) and known limitations are documented honestly in SECURITY.md. If you intend to run a hosted, multi-tenant deployment that holds other people's tokens, work through HOSTED-CHECKLIST.md first.
| Provider | Status |
|---|---|
| Google (Gmail, Calendar, β¦) | β Verified end-to-end, including token refresh |
| GitHub | β Verified end-to-end |
| Slack | π§ͺ Experimental β config present, not yet verified against live OAuth |
| Notion | π§ͺ Experimental β config present, not yet verified against live OAuth |
Adding a provider is data, not code (see src/providers.ts). Help verifying Slack/Notion is welcome.
Exposes the broker to an AI agent (Claude Code / Cursor / Claude Desktop) as tools:
list_providers, check_connection, create_connect_link, and call_provider. The
auth-gating wedge: if the agent calls call_provider for a user who isn't connected, it
returns an authorization_required result with a connect link instead of failing.
The MCP server is published to npm as grantd-mcp, so
you don't need to clone this repo to use it β just point an MCP client at it (you do need a running
broker and a secret key). For local development: npm run mcp (needs the broker running); smoke
test: npm run mcp:test.
Add to Claude Code:
Or in a Cursor / Claude Desktop mcpServers config:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/grantd)<a href="https://allmcps.com/mcp/grantd"><img src="https://allmcps.com/api/badge/grantd?style=directory" alt="Grantd on AllMCPs" /></a>