Developers · MCP
Your vault, inside your agent.
A local Model Context Protocol server that lets Claude Desktop, Claude Code, Cursor, Codex — any MCP client — search, list, read, and ask your Granite vault. It's a thin wrapper over the read-only Agent API.
Tools
| tool | what it does | scope |
|---|---|---|
search_vault | ranked search (hybrid / keyword / semantic) → metadata + snippet | documents:read |
list_documents | browse the vault, cursor-paginated | documents:read |
get_document | full structured fields by id; full_text opt-in | documents:read |
ask_vault | natural-language Q&A → synthesized answer + citations | vault:ask |
Read-only — there is no upload or write tool.
Setup
1. Mint a token. In Granite, go to Settings → Developer → Access tokens and create one with the scopes you want (documents:read, optionally vault:ask). Copy the gra_live_… value — it's shown once.
2. Add the server to your client (below). It reads two env vars: GRANITE_API_KEY (required, your token) and GRANITE_API_BASE (optional, defaults to https://api.granite.co/v1 — leave it unset).
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"granite": {
"command": "npx",
"args": ["-y", "@graniteco/mcp"],
"env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
}
}
}Claude Code
claude mcp add granite \
--env GRANITE_API_KEY=gra_live_your_token_here \
-- npx -y @graniteco/mcpCursor
Add to ~/.cursor/mcp.json (or a project .cursor/mcp.json):
{
"mcpServers": {
"granite": {
"command": "npx",
"args": ["-y", "@graniteco/mcp"],
"env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
}
}
}Restart your client and ask it what's in your vault.
Notes
The server is open source and published as @graniteco/mcp on npm. It adds no logic of its own — authentication, per-account scoping, prompt-injection sanitization, audit logging, and rate limits all happen in the Agent API it wraps. Part of Granite Paid.