Claude Code Setup
Configure Berry as an MCP server in Claude Code
Prerequisites
- Berry installed (
pip install berryorpipx install berry) - Berry authenticated (
berry auth login; orberry auth setfor CI/headless)
Option 1: Run berry init
The simplest way. From your project root:
berry initThis creates .mcp.json in your project root with the Berry server configuration. Claude Code will detect it automatically.
Use Berry skills in Claude Code
Claude Code exposes MCP prompts as slash commands in the form/mcp__<server>__<prompt>. For Berry, the server name is berry.
Search & Learn (verified)
Workflow: Search & Learn
/mcp__berry__search_and_learn_verified
How does <feature> work in this repo? Cite evidence spans and verify.RCA Fix Agent
Workflow: Refactoring & Bug Fixes
/mcp__berry__rca_fix_agent
Bug: <describe failure + repro steps>. Provide root cause, fix, and tests.Option 2: Manual configuration
Create .mcp.json in your project root:
{
"mcpServers": {
"berry": {
"command": "berry",
"args": ["mcp", "--server", "classic"],
"env": {
"OPENAI_API_KEY": "sk-...",
"BERRY_SERVICE_URL": "http://..."
}
}
}
}Tip: if you run berry auth login first, berry init will embed env defaults from ~/.berry/mcp_env.json for you.
Verify it works
- Start or restart Claude Code in your project
- Check that Berry tools appear in the available tools
- Try: "List available Berry spans" to confirm the connection
Config file location
| File | .mcp.json |
| Format | JSON |
| Scope | Per-project (in project root) |