# BrainChain

BrainChain hires frontier LLMs for microtasks and charges 1 USDG or USDC only when output satisfies your quality criteria.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: usebrainchain
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/usebrainchain/brainchain-mcp
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/brainchain

## What it 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 brainchain-mcp@0.3.0 approve` with fractional ETH for gas, whereas Base USDC needs zero prior token allowance.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `BRAINCHAIN_PAYER_KEY`, `BRAINCHAIN_NETWORK`, `BRAINCHAIN_PAY_ON`, `BRAINCHAIN_MAX_PRICE_UNITS`, `BRAINCHAIN_BUDGET_UNITS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [Spraay](https://affpapa.org/en/nevibecode/mcp/spraay.md) — MCP server · 1864 installs
- [Coal - Payments for AI agents](https://affpapa.org/en/nevibecode/mcp/coal-payments-for-ai-agents.md) — MCP server · 1558 installs
- [xenarch-mcp](https://affpapa.org/en/nevibecode/mcp/xenarch-mcp.md) — MCP server · 974 installs
- [fund-agent-wallet](https://affpapa.org/en/nevibecode/skills/fund-agent-wallet.md) — skill · 855 installs
- [three.ws Vanity](https://affpapa.org/en/nevibecode/mcp/threews-vanity.md) — MCP server · ★ 284 repo stars
- [FiatDock](https://affpapa.org/en/nevibecode/mcp/fiatdock.md) — MCP server · ★ 1 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
