Grants

Model Context Protocol (MCP)

Plug Grants into Claude, Cursor, and any other MCP-aware AI tool.

MCP is the open protocol AI assistants use to talk to external tools. This server is auto-built from the Grants data models - one install line, configure your AI host, and your assistant can list, read, create, update, and delete data on your behalf. Auth uses the same personal access tokens the rest of the API accepts, so you control exactly which models the assistant can touch.

Install

One line, one file. The script lands under your home directory - no pip install, no system-wide changes. Pick your OS in the tabs below.

curl -fsSL https://granttool.de/xapi2/mcp/install.sh | bash
Download script manuallyVersion: 1.0.3·Command: grantsmcp·Tools: 51·checksum: d119c67f69

Provide a token

Create a personal access token (PAT) from the Integrations menu and tick the scopes the AI should have - read-only for safe exploration, or read + write for hands-on editing. PATs are revocable and scoped, so a leaked token can't outlive a single revocation. Pass the token via the GRANTSMCP_TOKEN environment variable in your AI host's server config (recommended), or run grantsmcp login --token pat_... once and the token persists for every future invocation.

export GRANTSMCP_TOKEN=pat_...
grantsmcp doctor

Configure your AI client

Every MCP-capable AI host accepts a small JSON config that tells it which servers to launch. Drop the snippet below into the host's MCP config file and restart it. The server runs locally as a subprocess of the host - it never accepts inbound connections from the network.

{
"mcpServers": {
"grantsmcp": {
"command": "grantsmcp",
"args": [],
"env": {
"GRANTSMCP_TOKEN": "pat_..."
}
}
}
}
ClientConfig file
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json

macOS · Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor~/.cursor/mcp.json

Per-project alt: <repo>/.cursor/mcp.json

Cline (VS Code)~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Linux/Windows: equivalent globalStorage path

Continue~/.continue/config.json

MCP servers under `experimental.modelContextProtocolServers`

Restart the client after editing - MCP servers are loaded at client launch.

What the assistant can do

Each data model exposes one tool per available operation. Read tools ({type}_list, {type}_get) are safe to call freely; write tools ({type}_create, {type}_update, {type}_delete) mutate data and should be confirmed with the user. The server cannot create users, manage tokens, or change billing - those happen in the Grants web UI.

ModelTools
whoami
whoami

Returns the currently signed-in user - useful as the first call.

derived_doc
derived_doc_list (list)derived_doc_get (get)derived_doc_create (create)derived_doc_update (update)derived_doc_delete (delete)
feedback_item
feedback_item_list (list)feedback_item_get (get)feedback_item_create (create)feedback_item_update (update)feedback_item_delete (delete)
feedback_point
feedback_point_list (list)feedback_point_get (get)feedback_point_create (create)feedback_point_update (update)feedback_point_delete (delete)
file
file_list (list)file_get (get)file_create (create)file_update (update)file_delete (delete)
folder
folder_list (list)folder_get (get)folder_create (create)folder_update (update)folder_delete (delete)
grant
grant_list (list)grant_get (get)grant_create (create)grant_update (update)grant_delete (delete)
lead
lead_list (list)lead_get (get)lead_create (create)lead_update (update)lead_delete (delete)
loi
loi_list (list)loi_get (get)loi_create (create)loi_update (update)loi_delete (delete)
review_note
review_note_list (list)review_note_get (get)review_note_create (create)review_note_update (update)review_note_delete (delete)
version_snapshot
version_snapshot_list (list)version_snapshot_get (get)version_snapshot_create (create)version_snapshot_update (update)version_snapshot_delete (delete)
Read toolWrite tool (confirmation recommended)

Example prompts

Once the server is registered in your AI client, the model picks up the tool list automatically. These prompts show how to work with the data models together with the AI.

Confirm you can talk to the Grants server, then list the
five most recently created derived_docs. Summarise the result.

Environment variables

VariablePurpose
GRANTSMCP_TOKENPersonal access token used for every API call. Recommended.
GRANTSMCP_BASE_URLOverride the baked-in server URL (testing only).
GRANTSMCP_NO_AUTOUPDATESkip the once-per-day version check + self-replace.
GRANTSMCP_NO_TELEMETRYSkip the anonymous usage analytics.

Local diagnostics

The same script is runnable directly from a shell - useful when the AI client reports that the server failed to start.

# Server reachable? Token valid? Tool surface rendered?
grantsmcp doctor

Security

The server runs locally as a subprocess of your AI client and never accepts inbound connections from the network. Tool calls only target the official API URL baked into your script; a cross-origin redirect would have its Authorization header stripped before the next hop. Revoke the token any time from the Integrations menu.

  • No user or token management. The server cannot create accounts, change passwords, mint or revoke tokens, or touch billing - only data models.
  • PAT scopes are the brake. Grant exactly the scopes the assistant needs. A read-only PAT turns the server into a safe exploration session.
  • Write tools are marked destructive. Most AI clients prompt before calling - leave the confirmation switch on.
  • Server checks still run. Validation, access rules, and audit logging fire on every tool call exactly as they do for the web UI.

Telemetry + auto-update

The server sends one anonymous analytics event per tool call (tool name, version, OS - no arguments, no field values) so the team running this app can see how it's used. Disable with GRANTSMCP_NO_TELEMETRY=1. Separately, the server checks for a newer version at most once every 24 hours and replaces itself in place; GRANTSMCP_NO_AUTOUPDATE=1 disables that. Updated bytes activate on the next host restart - the running session keeps the old code so an in-flight request can't break.