Graine AI

MCP server

Use Graine from Claude, Cursor and other AI tools. One endpoint, your API key, and the same tools as Sprout — reads run at once, and your AI tool asks you before anything changes.

Graine runs a Model Context Protocol server. Connect an MCP client — Claude Desktop, Cursor, Claude Code, or any client that speaks MCP over HTTP — and it can read your agents, workflows, campaigns, calls and numbers, and make changes once you confirm them. These are the same tools Sprout uses in the dashboard.

Endpointhttps://api.graine.ai/v2/mcp
TransportStreamable HTTP. Each request is one JSON-RPC message, or a batch of up to 20, answered as JSON — no session to keep, no event stream
AuthenticationAuthorization: Bearer gat_… — a Graine API key, or Sign in with Graine
Protocol versions2025-06-18, 2025-03-26, 2024-11-05
Methodsinitialize, ping, tools/list, tools/call

Before you start

Create an API key in the dashboard under API keys (Authentication). The key's scopes decide which tools your AI tool sees, and the role of the person who made the key applies as well (Keys and workspace roles): a tool is listed only when both allow it. For an assistant that should only look, give the key agents:read and calls:read and nothing else.

The key acts as you

Anything your AI tool does with the key is done as the key's creator, within its scopes. Keep the key out of files you share or commit, and revoke it under API keys to cut access at once (Revoke a key).

Connect your AI tool

Replace gat_YOUR_KEY with your key.

Claude Desktop

Open Settings → Developer → Edit Config and add Graine to claude_desktop_config.json, then restart Claude Desktop. This uses mcp-remote, which needs Node.js:

{
  "mcpServers": {
    "graine": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.graine.ai/v2/mcp", "--header", "Authorization:${GRAINE_AUTH}"],
      "env": { "GRAINE_AUTH": "Bearer gat_YOUR_KEY" }
    }
  }
}

The header is written without a space after the colon, and the key sits in env, as mcp-remote expects.

Cursor

Add Graine to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json in one project:

{
  "mcpServers": {
    "graine": {
      "url": "https://api.graine.ai/v2/mcp",
      "headers": { "Authorization": "Bearer gat_YOUR_KEY" }
    }
  }
}

Claude Code

claude mcp add --transport http graine https://api.graine.ai/v2/mcp \
  --header "Authorization: Bearer gat_YOUR_KEY"

Add --scope user to use it in every project. To share the server with your team in a project's .mcp.json without sharing a key, let each person's environment supply it:

{
  "mcpServers": {
    "graine": {
      "type": "http",
      "url": "https://api.graine.ai/v2/mcp",
      "headers": { "Authorization": "Bearer ${GRAINE_API_KEY}" }
    }
  }
}

Check the key

Ask for the tools the key may use:

curl https://api.graine.ai/v2/mcp \
  -H "Authorization: Bearer gat_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The answer lists each tool with its description, its inputs and how it is marked.

The tools

Scope the key needsTools
agents:readlist_agents, get_agent, list_workflows, get_workflow, list_workflow_samples, check_workflow, list_phone_numbers, list_knowledge_bases
calls:readlist_campaigns, get_campaign, get_workflow_run, list_calls, get_call
account:readget_balance
Any keysearch_docs, get_doc — these docs
agents:writecreate_agent, update_agent, clone_agent, create_workflow, save_workflow_draft, publish_workflow, assign_phone_number
calls:writeplace_test_call, test_run_workflow, cancel_workflow_run
batches:writestart_campaign, pause_campaign, resume_campaign, start_workflow_campaign, pause_workflow_campaign, resume_workflow_campaign

Read tools are marked read-only and change nothing. Every other tool changes something, and the ones that place calls or act on what is live — publishing a workflow, placing a test call or a test run, starting, pausing or resuming a campaign or a list, cancelling a run — are also marked destructive. Your AI tool asks you before it uses a tool that changes something; keep that on.

Attaching a document, undoing a change and opening a page are Sprout's alone: they need the dashboard.

What a change returns

A tool that changes something runs as soon as your AI tool calls it — your confirmation in the AI tool takes the place of Sprout's approval card. It answers with what happened:

statusMeaning
doneThe change was made. dashboard_path is the page that shows it.
heldYour workspace's approval rules sent it to an admin, as they would any request made with this key.
refusedThis key may not do it.
failedIt couldn't be made; summary says why.
skippedIt changed since it was read. Read it again and retry.

refused, failed and skipped come back as a tool error (isError: true), so your AI tool knows the change didn't happen. Calls placed this way are ordinary calls: billed, in Call History, and held to your balance and to the agent being switched on, like every other call.

Limits and errors

Tool calls120 per key per minute, on top of the API's own rate limits
A requestUp to 1 MB; a batch, up to 20 messages
A tool callAnswers within 90 seconds
AnswerWhen
401No key, or a key that isn't valid — see Authentication
403The key holds none of the scopes above
429Over the limit; Retry-After says how many seconds to wait
-32601A method this server doesn't have
-32602A tool this key can't see, or arguments that aren't right
-32700 / -32600The request isn't valid JSON-RPC

On this page