Skip to content
MCP server

Agent Clinic

Pay-per-visit diagnostic for AI agent run logs, examined on your own model

Runs locally

Agent Clinic is a paid MCP server for agent testing. It runs locally on your machine and is started by your AI client.

Pricing
Paid
Platforms
API, CLI
Runs
Locally
Version
0.2.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add agent-clinic --env AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' -- npx -y agent-clinic-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "agent-clinic": {
      "command": "npx",
      "args": [
        "-y",
        "agent-clinic-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "agent-clinic": {
      "command": "npx",
      "args": [
        "-y",
        "agent-clinic-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "agent-clinic": {
      "command": "npx",
      "args": [
        "-y",
        "agent-clinic-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "agent-clinic": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "agent-clinic-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add agent-clinic --env AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' -- npx -y agent-clinic-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.agent-clinic]
command = "npx"
args = ["-y", "agent-clinic-mcp"]
env = { AGENT_PRIVATE_KEY = "<AGENT_PRIVATE_KEY>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "agent-clinic": {
      "command": "npx",
      "args": [
        "-y",
        "agent-clinic-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' agent-clinic npx -- -y agent-clinic-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "agent-clinic": {
          "command": "npx",
          "args": [
            "-y",
            "agent-clinic-mcp"
          ],
          "env": {
            "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • AGENT_PRIVATE_KEYThe agent's wallet key (0x and 64 hex characters), needed for clinic_house_call only. Use a wallet that holds only what you will spend on the clinic. Never printed or logged.
  • MAX_SPEND_USD_PER_CALLPer-call cap in US dollars: a visit that costs more is refused before anything is signed.
  • MAX_SPEND_USD_PER_DAYDaily cap in US dollars (UTC day): a visit that would go above it is refused before anything is signed.
  • NETWORKeip155:8453 is Base mainnet (real USDC); eip155:84532 is Base Sepolia testnet (test USDC). The server refuses to pay a clinic on another network.
  • CLINIC_URLThe clinic's address. https only (plain http only for localhost).
  • SPEND_FILEWhere today's spending total is kept, so a restart does not reset it.

About Agent Clinic

Agent Clinic reviews a failed or messy agent run by sending its instructions to your own model rather than uploading the log. You pay one USDC amount per visit over x402 on Base, receive a set of instructions split into eleven review passes, and your agent runs those passes against its own run log and produces a report with findings tied to exact quoted lines.

Each finding points back to a line in the log, and a verification pass drops any quote that cannot be found word for word. The report includes a suggested corrected instruction file that the agent owner reviews before applying, so nothing in the agent's settings changes automatically.

The clinic is aimed at people running tool-using agents who want to understand why a run went wrong, such as repeated failing tool calls or claims unsupported by tool results. Spending is capped per call and per day through environment variables, and the wallet only needs USDC.

What it does

Pay-per-visit pricing
Each visit costs one dollar in USDC on Base, with no account or subscription.
Runs on your own model
The examination happens on the model your agent chooses, so the log stays off the clinic's servers.
Quote-checked findings
Each finding quotes the log line behind it, and unmatched quotes are removed.
Corrected instruction file
The report includes a suggested revised instruction file for the owner to review.
Spending caps
Per-call and daily spending limits are set through environment variables and refuse visits before signing.
MCP server integration
Runs as a stdio MCP server installable from npm for use with compatible AI clients.

Good for

  • Finding why an agent repeatedly calls a tool with the wrong arguments
  • Checking whether an agent claims results it never retrieved
  • Reviewing an agent's instructions for conflicting or blocking rules
  • Reducing wasted tokens and retry loops in a long-running agent

Pricing

Paid

$1.00 per visit, paid in USDC on Base; your model's token costs are extra

Prices change. Check clinic.sosell.al before you buy.

Agent Clinic FAQ

Does the clinic see my run log?

No. The visit request carries no log field, and the examination runs on your agent's own model. Only optional check-ins such as stage names and counts are sent, unless you choose to share the full report.

What does a visit cost?

One dollar per visit, paid in USDC on Base. Payment is final and there are no refunds. Your own model's token costs are separate.

Which network does the MCP server use by default?

Base mainnet, eip155:8453. Base Sepolia testnet is available by setting NETWORK to eip155:84532.

What happens if the answer is lost?

Running the visit again with the same request_id returns the same visit without charging again, before the visit expires after three days.

How do I add Agent Clinic to Claude Code?

Run this command in your terminal: claude mcp add agent-clinic --env AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' -- npx -y agent-clinic-mcp

What are the best alternatives to Agent Clinic?

The closest alternatives to Agent Clinic are Agent Failure Archive, AI Agent Audit and Action Review, AgentPing and AI Agent Security Scanner.

Where this comes from

  • Description: written from the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers