Grantd MCP server
io.github.rafavecchi/grantd·v0.1.0·1 starsGrantd MCP server: let your AI agent act on a user's behalf across third-party APIs via OAuth.
1 stars33 downloads/wk
Reviews
Write oneNobody has reviewed Grantd yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Grantd tools (4, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
call_providerMake an authorized API call to a provider on behalf of an end-user. The user's OAuth token is injected server-side and never exposed to you. If the user isn't connected, returns an authorization_required result with a connect link \u2014 share it with the user, then retry.
check_connectionCheck whether an end-user has an active connection to a provider. If not, returns a connect_url to share with them.
create_connect_linkwrite actionCreate an authorization URL an end-user visits to connect a provider account.
list_providersList the third-party providers Grantd can connect on a user's behalf (e.g. google, github).
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan2 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 109 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- mediumeval / new Function used
exec.evaldist/index.cjs: …ode, sch); const makeValidate = new Function(`${names_1.default.self}`, `${names_1.de…
How Grantd compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 65/100
- higher than 25% of 4,460 AI and agents servers
- Tools
- 4
- the typical AI and agents server has 6
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 1
- more than 50% of 2,711 AI and agents servers
- Downloads a week
- 33
- more than 22% of 1,538 AI and agents servers with a package
What its tools let an agent do: 3 read · 1 create
Install Grantd in Claude Code, Cursor or VS Code
Runs npx -y grantd-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add grantd -- npx -y grantd-mcp
What the publisher says
From the Grantd repository's README, as published. We do not edit it. Read it on GitHub
Grantd
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.
Security at a glance
Grantd vaults users' OAuth tokens, so security is the product, not a feature. The fundamentals:
and fail-closed (a missing key refuses to write; it never silently stores plaintext).
- Tokens encrypted at rest — AES-256-GCM envelope encryption, fresh IV per record, key-versioned,
boundary and returns only the provider's response — the raw token is never serialized back.
- Tokens never reach the LLM or the caller. The proxy injects the access token at the network
so a Postgres REST layer (e.g. Supabase/PostgREST) can't read the vault.
- API keys hashed at rest (pbkdf2-sha256, peppered); the raw sk_ key is shown once.
- No SQL injection — every query is a parameterized postgres.js tagged template.
- Tenant isolation on every query by environment id; Row-Level Security enabled on all tables
- 256-bit random OAuth state + session tokens; PKCE (S256) where the provider supports it.
- Durable, Postgres-backed rate limiting — per secret key on auth routes, per IP on public routes.
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.
Providers
Adding a provider is data, not code (see src/providers.ts). Help verifying Slack/Notion is welcome.
Quick start (dev)
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 :8787MCP server
Exposes the broker to an AI agent (Claude Code / Cursor / Claude Desktop) as tools: listproviders, checkconnection, createconnectlink, and callprovider. The auth-gating wedge: if the agent calls callprovider 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-mcpOr 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"
}
}
}
}Layout
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Grantd: common questions
- Is Grantd MCP server safe?
- With care: it is graded C, so read the findings first (65/100). Read the Grantd safety report
- How do I install Grantd?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Grantd need an API key?
- Yes. The registry entry asks for
GRANTD_API_KEY. - Is Grantd maintained?
- The last commit was 148 days ago (2026-06-09). The latest release is v0.1.0.
- What can I use instead of Grantd?
- Servers from other publishers that do the same job: LLM Sandbox MCP server, Agent Lsp MCP server and Grandet MCP server.
- How does Grantd compare with other AI and agents MCP servers?
- safety score 65/100 (higher than 25% of 4,460 AI and agents servers); tools 4 (the typical AI and agents server has 6); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Grantd
Same job from other publishers: the closest match first, then the best rated.
- LLM SandboxSecurely run LLM-generated code in isolated containers across 7 languages and 3 container backends.not reviewedWidely usedA
- Agent LspOrchestrates language servers into 65 code-intelligence tools across 32 languages, token-optimized.not reviewedEstablishedA
- GrandetCheapest API for any model across official, inference and relay providers; find free creditsnot reviewedEstablishedA
- SkillsmithShare agent skills across your team, scan them for risk, and track what's actually used.not reviewedEstablishedB