Skip to main content

grains-mcp

An MCP server for Grains — build and deploy a hosted agent to grains.run without leaving Claude.

It's a thin client over the Grains control-plane API. Every tool call acts as one Grains user, authenticated by that user's deploy token.

Tools

Tool What it does
grains_scaffold Generate grains_app.py + grains.toml for a new agent (framework: none/crewai/langchain/langgraph). Pure local — Claude writes the files.
grains_deploy Create the agent (if new) and deploy the given files. Returns status + the agent's signed identity (did).
grains_invoke Send a task to a deployed agent and return its reply.
grains_logs Recent agent logs.
grains_list_agents / grains_agent_status List / inspect your agents.
grains_secret_set Set an agent secret (e.g. OPENAI_API_KEY). Value is never echoed back.
grains_set_price Make an agent public / set its per-message price (decimal string).

Setup

Requires a Grains deploy token (from the dashboard, or grains CLI). Then add the server to Claude Code (~/.claude/mcp.json or project .mcp.json):

{
  "mcpServers": {
    "grains": {
      "command": "grains-mcp",
      "env": {
        "GRAINS_API_URL": "https://api.grains.run",
        "GRAINS_DEPLOY_TOKEN": "grains_dt_your_token_here"
      }
    }
  }
}

(Until custom domains are live, GRAINS_API_URL is the API Gateway URL.)

Then, in Claude: "scaffold a URL-summarizer agent and deploy it to Grains." Claude calls grains_scaffold, writes the files, calls grains_deploy, and you can grains_invoke it — all in one conversation.

Transports

  • stdio (default) — for the Claude Code config above.
  • streamable-httpgrains-mcp --http --port 8080, for hosting at mcp.grains.run (hosted OAuth-backed deployment is a follow-up; today the server authenticates with the deploy token from its env).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grains_mcp-0.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grains_mcp-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file grains_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: grains_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for grains_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 597fafcd90e44cebf4261dbab159b9ebdc0f8e3a8c0512ad9fac3243229f6545
MD5 f1152b12057521b50edbaa223ec929d8
BLAKE2b-256 3128316b1d55e15adcf5d43703b6e946553b20e5667809524bbfac445f5aebc9

See more details on using hashes here.

File details

Details for the file grains_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: grains_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for grains_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b065daf93e4260a3708bd6c191c0b13b83f3a2a9f879cfa78255b639963c8e3
MD5 e63c33837b349f8e65345986eb38dbf7
BLAKE2b-256 b4cd88b479ffb1a1ef511640c308084e2b5d040dd2c99487eee12ec9ccef9480

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page