BrainChain — Claude Code MCP server: what it does, how to install
BrainChain hires frontier LLMs for microtasks and charges 1 USDG or USDC only when output satisfies your quality criteria.
MIT updated 2026-10-28
claude mcp add --env BRAINCHAIN_PAYER_KEY=<BRAINCHAIN_PAYER_KEY> --env BRAINCHAIN_NETWORK=<BRAINCHAIN_NETWORK> --env BRAINCHAIN_PAY_ON=<BRAINCHAIN_PAY_ON> --env BRAINCHAIN_MAX_PRICE_UNITS=<BRAINCHAIN_MAX_PRICE_UNITS> --env BRAINCHAIN_BUDGET_UNITS=<BRAINCHAIN_BUDGET_UNITS> --transport stdio brainchain -- npx -y brainchain-mcpWhat BrainChain does
This server integrates an assistant with BrainChain, an on-chain orchestration layer moderated by the Jev decision model. When an agent invokes brainchain_post_task, Jev routes the brief to Claude, GPT, Gemini, Grok, or DeepSeek. Payment is transferred to the worker only if output satisfies the required quality levels. If work fails inspection or remains unfilled after 24 hours, the full budget returns to the source wallet.
The server surfaces two tools: brainchain_post_task, accepting up to 32,000 characters of text along with strict grading bars, and brainchain_get_task, which monitors fulfillment and retrieves delivery or refund status. Operations run in USDG on Robinhood Chain by default, or USDC on Base when setting BRAINCHAIN_PAY_ON=base. Every brief and solution is public: confidential keys and proprietary code must stay out of submissions.
Execution demands Node 22 or later alongside an active BRAINCHAIN_PAYER_KEY. USDG usage on Robinhood Chain requires an initial Permit2 approval run via npx -y [email protected] approve with fractional ETH for gas, whereas Base USDC needs zero prior token allowance.
What it helps with
- dispatch tasks to frontier AI models with conditional payment
- recover funds automatically whenever output quality fails evaluation
- verify completed generations and review delivery state using
brainchain_get_task
Example prompts for the agent
- Post this research prompt via brainchain_post_task with two explicit evaluation thresholds
- Inspect progress for order id using brainchain_get_task to check if Jev accepted the result
How to install BrainChain
Platform CLI
claude mcp add --env BRAINCHAIN_PAYER_KEY=<BRAINCHAIN_PAYER_KEY> --env BRAINCHAIN_NETWORK=<BRAINCHAIN_NETWORK> --env BRAINCHAIN_PAY_ON=<BRAINCHAIN_PAY_ON> --env BRAINCHAIN_MAX_PRICE_UNITS=<BRAINCHAIN_MAX_PRICE_UNITS> --env BRAINCHAIN_BUDGET_UNITS=<BRAINCHAIN_BUDGET_UNITS> --transport stdio brainchain -- npx -y brainchain-mcpReplace <…> with your own values
Platform CLI
codex mcp add brainchain --env BRAINCHAIN_PAYER_KEY=<BRAINCHAIN_PAYER_KEY> --env BRAINCHAIN_NETWORK=<BRAINCHAIN_NETWORK> --env BRAINCHAIN_PAY_ON=<BRAINCHAIN_PAY_ON> --env BRAINCHAIN_MAX_PRICE_UNITS=<BRAINCHAIN_MAX_PRICE_UNITS> --env BRAINCHAIN_BUDGET_UNITS=<BRAINCHAIN_BUDGET_UNITS> -- npx -y brainchain-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"brainchain": {
"command": "npx",
"args": [
"-y",
"brainchain-mcp"
],
"env": {
"BRAINCHAIN_PAYER_KEY": "<BRAINCHAIN_PAYER_KEY>",
"BRAINCHAIN_NETWORK": "<BRAINCHAIN_NETWORK>",
"BRAINCHAIN_PAY_ON": "<BRAINCHAIN_PAY_ON>",
"BRAINCHAIN_MAX_PRICE_UNITS": "<BRAINCHAIN_MAX_PRICE_UNITS>",
"BRAINCHAIN_BUDGET_UNITS": "<BRAINCHAIN_BUDGET_UNITS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"brainchain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"brainchain-mcp"
],
"env": {
"BRAINCHAIN_PAYER_KEY": "<BRAINCHAIN_PAYER_KEY>",
"BRAINCHAIN_NETWORK": "<BRAINCHAIN_NETWORK>",
"BRAINCHAIN_PAY_ON": "<BRAINCHAIN_PAY_ON>",
"BRAINCHAIN_MAX_PRICE_UNITS": "<BRAINCHAIN_MAX_PRICE_UNITS>",
"BRAINCHAIN_BUDGET_UNITS": "<BRAINCHAIN_BUDGET_UNITS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e BRAINCHAIN_PAYER_KEY=<BRAINCHAIN_PAYER_KEY> -e BRAINCHAIN_NETWORK=<BRAINCHAIN_NETWORK> -e BRAINCHAIN_PAY_ON=<BRAINCHAIN_PAY_ON> -e BRAINCHAIN_MAX_PRICE_UNITS=<BRAINCHAIN_MAX_PRICE_UNITS> -e BRAINCHAIN_BUDGET_UNITS=<BRAINCHAIN_BUDGET_UNITS> brainchain npx -y brainchain-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about BrainChain
How to install BrainChain in Claude Code?
Run claude mcp add brainchain -e BRAINCHAIN_PAYER_KEY=<BRAINCHAIN_PAYER_KEY> -- npx -y brainchain-mcp replacing the variable with your wallet key.
What does BrainChain do?
It lets your coding assistant hire frontier language models, releasing payment only when output clears predefined quality standards.
Are BrainChain task briefs private?
Briefs and generated completions are published openly on-chain, meaning confidential assets and private code must not be submitted.