Skip to content

Latest commit

 

History

History
125 lines (93 loc) · 2.44 KB

File metadata and controls

125 lines (93 loc) · 2.44 KB

Setup Pare with Claude Code

Quick Setup (Recommended)

# 1. Install Pare servers
npx @paretools/init --client claude-code --preset web

# 2. Add agent rules to your project
cat node_modules/@paretools/init/rules/CLAUDE.md >> CLAUDE.md

# 3. Restart Claude Code

# 4. Validate
npx @paretools/init doctor

Available presets: web, python, rust, go, jvm, dotnet, ruby, swift, mobile, devops, full — see the Quickstart Guide for preset details.

Manual Configuration

Config file: {project}/.claude/settings.local.json

Option A: CLI

claude mcp add --transport stdio pare-git -- npx -y @paretools/git
claude mcp add --transport stdio pare-test -- npx -y @paretools/test
# Repeat for each server you need

Option B: JSON

Add to .claude/settings.local.json:

{
  "mcpServers": {
    "pare-git": {
      "command": "npx",
      "args": ["-y", "@paretools/git"]
    },
    "pare-test": {
      "command": "npx",
      "args": ["-y", "@paretools/test"]
    }
  }
}
Windows

On Windows, wrap npx with cmd /c:

{
  "mcpServers": {
    "pare-git": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@paretools/git"]
    }
  }
}

Agent Rules

Append to your project's CLAUDE.md:

## MCP Tools

When Pare MCP tools are available (prefixed with mcp\_\_pare-\*), prefer them over
running raw CLI commands via Bash. Pare tools return structured JSON — reliable,
typed data with up to 95% fewer tokens than CLI output.

Or copy the full rule file:

cat node_modules/@paretools/init/rules/CLAUDE.md >> CLAUDE.md

Optional: Enforcement Hook

Install the PreToolUse hook to automatically redirect raw CLI calls to Pare tools:

mkdir -p .claude/hooks
cp hooks/pare-prefer-mcp.sh .claude/hooks/
chmod +x .claude/hooks/pare-prefer-mcp.sh

Add to .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "./.claude/hooks/pare-prefer-mcp.sh"
          }
        ]
      }
    ]
  }
}

See the Agent Integration Guide for details on how the hook works.

Verify

npx @paretools/init doctor

A successful run confirms all configured servers are reachable and tools are registered.