Server data from the Official MCP Registry
Grantd MCP server: let your AI agent act on a user's behalf across third-party APIs via OAuth.
Grantd MCP server: let your AI agent act on a user's behalf across third-party APIs via OAuth.
Grantd is a well-architected OAuth token broker with strong security fundamentals: tokens are encrypted at rest (AES-256-GCM), never exposed to the LLM, stored server-side, and protected by tenant isolation and row-level security. The codebase demonstrates mature security practices including parameterized SQL queries, PKCE support, and proper credential handling. Minor code quality issues (broad exception handling, some missing input validation edge cases) do not materially impact the security posture. Supply chain analysis found 7 known vulnerabilities in dependencies (0 critical, 1 high severity). Package verification found 1 issue (1 critical, 0 high severity).
7 files analyzed · 15 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Unverified package source
We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.
Set these up before or after installing:
Environment variable: GRANTD_API_KEY
Environment variable: GRANTD_BASE_URL
Environment variable: GRANTD_END_USER
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-rafavecchi-grantd": {
"env": {
"GRANTD_API_KEY": "your-grantd-api-key-here",
"GRANTD_BASE_URL": "your-grantd-base-url-here",
"GRANTD_END_USER": "your-grantd-end-user-here"
},
"args": [
"-y",
"grantd"
],
"command": "npx"
}
}
}From the project's GitHub README.
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.
npm install
npm run keygen # prints an ENCRYPTION_KEYRING + API_KEY_SALT
cp .env.example .env # then paste keygen output + your DATABASE_URL
npm run migrate # apply SQL migrations
npm run dev # start the broker on :8787
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:
claude mcp add grantd \
--env GRANTD_API_KEY=sk_... \
--env GRANTD_BASE_URL=https://your-broker.example.com \
--env GRANTD_END_USER=user-123 \
-- npx -y grantd-mcp
Or in a Cursor / Claude Desktop mcpServers config:
{
"mcpServers": {
"grantd": {
"command": "npx",
"args": ["-y", "grantd-mcp"],
"env": {
"GRANTD_API_KEY": "sk_...",
"GRANTD_BASE_URL": "https://your-broker.example.com",
"GRANTD_END_USER": "user-123"
}
}
}
}
migrations/ SQL schema (Supabase/Postgres compatible)
scripts/ keygen + migrate helpers
src/
config.ts env loading + validation + keyring parse
crypto.ts envelope encryption + API-key hashing
db.ts postgres.js client
providers.ts declarative provider registry (Google, GitHub, Slack, Notion)
oauth.ts generic OAuth2 client (authorize / exchange / refresh) driven by the registry
server.ts Hono app + routes (WIP)
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.