> ## Documentation Index
> Fetch the complete documentation index at: https://synthbrew.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code setup

> Configure Claude Code to use Synthbrew through the MCP server.

Use the Synthbrew MCP server in Claude Code to provision schemas, sources, API keys, and runtime docs from your terminal agent.

## Prerequisites

* Claude Code installed
* A Synthbrew public API key

## Add the MCP server

Run:

```bash theme={null}
claude mcp add --transport stdio --scope user \
  --env SYNTHBREW_API_KEY=sb_api_... \
  --env SYNTHBREW_API_URL=https://api.synthbrew.com/api \
  synthbrew -- npx -y @synthbrew/agent
```

Use `--scope project` instead if you want Claude Code to write a shared `.mcp.json` file in the current project.

## Test the connection

Inside Claude Code, run:

```text theme={null}
/mcp
```

Then ask:

```text theme={null}
Use Synthbrew to generate a schema for a CRM with companies, contacts, deals, activities, and tasks. Validate it first, then create a populated source and return the connection details.
```

Claude Code should validate the schema before creating resources.

## Project config alternative

You can also add Synthbrew manually to `.mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "synthbrew": {
      "command": "npx",
      "args": ["-y", "@synthbrew/agent"],
      "env": {
        "SYNTHBREW_API_KEY": "${SYNTHBREW_API_KEY}",
        "SYNTHBREW_API_URL": "https://api.synthbrew.com/api"
      }
    }
  }
}
```
