Integrate · Claude Code

PreWiro inside Claude Code.

Claude Code talks HTTP MCP natively. The PreWiro CLI generates the exact config snippet — one command, no editing.

1. Install + auth

# install (workspace local — your monorepo's apps/cli)
pnpm install

# auth
export PREWIRO_TOKEN=pwro_live_…
export PREWIRO_API_URL=https://app.copilotverse.io/api/v1

2. Generate the MCP config

prewiro mcp-config "Prewiro" > ~/.config/claude-code/config.json

The output is just:

{
  "mcpServers": {
    "Prewiro": {
      "url": "https://app.copilotverse.io/api/mcp/v1",
      "headers": { "Authorization": "Bearer pwro_live_…" }
    }
  }
}

If you already have an existing config with other MCP servers, merge into the mcpServers object instead of overwriting.

3. Restart Claude Code and verify

Restart Claude Code. The next session lists PreWiro tools alongside repo tools. Verify with:

# from the conversation
"List Prewiro tools."   →   tools/list
"Fire goal.execute with goal=\"30 enterprise meetings\""   →   tools/call

Smoke test from a terminal

prewiro list-actions               # see what's available
prewiro goal.execute '{
  "goal_text": "30 enterprise meetings this quarter",
  "target_metric": { "type": "meetings", "value": 30 },
  "constraints": {
    "niches": ["B2B SaaS founders"],
    "locations": ["United States"],
    "target_count": 200
  }
}'