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

toolwhat it doesscope
search_vaultranked search (hybrid / keyword / semantic) → metadata + snippetdocuments:read
list_documentsbrowse the vault, cursor-paginateddocuments:read
get_documentfull structured fields by id; full_text opt-indocuments:read
ask_vaultnatural-language Q&A → synthesized answer + citationsvault: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/mcp

Cursor

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.