← Back to directory
P

Pi Claude Bridge

Community
Not a standard server
Use Claude subscription models in Pi through Claude Code.

This is not a typical connect-and-use MCP server; read the source repository before using it.

Category
Dev Tools #178 of 751
Stars
★ 880 Very popular
Runtime
Node.js
Credentials
API key / credential required
License
MIT
Last commit
56FMRS · C

This is a Claude Code inference-provider extension for Pi, not an MCP server. It uses Claude Code login and subscription quota and forwards Pi tools and skills, with documented session-sync and extension-compatibility limitations.

Strongest · Documentation 14/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
10/20
Maintenance
10/20
Documentation
14/20
Setup experience
12/20
Why each score
Reliability 10/20
The README describes Agent SDK session synchronization, tool bridging, isolated summary queries, and known boundaries, and provides offline and integration test commands. However, no manifest, CI workflow, or test results are supplied to verify initialization, tool-list handshake, or key paths. It also says concurrent sessions are unsupported and documents cache and history-sync issues, so the static evidence supports a conservative score.
Security and permissions 10/20
The documentation says MCP servers from configuration files are blocked by default, cloud MCP is always blocked, and Claude Code permission rules and PreToolUse hooks cannot reliably restrict bridged tools; permissions should be handled on the Pi side. It also discloses environment inheritance, hook behavior, and system-prompt injection paths. Without source evidence, data flows, permission boundaries, and credential handling cannot be verified, and there is no evidence of confirmation for dangerous actions. No red-line evidence is present in the supplied material.
Maintenance 10/20
The supplied metadata identifies an MIT license, npm installation path, issue tracking, and a repository that is not archived. But there is no commit history, release cadence, dependency-update evidence, security-response channel, or maintainer governance information to establish sustained maintenance. Stars do not add points.
Documentation 14/20
The README covers installation, Claude Code login, model selection, configuration, environment variables, session history, extension compatibility, known issues, and debug logs, and gives test commands. It does not include the manifest or source; cost details, platform coverage, and troubleshooting are incomplete. Its subscription-billing note also acknowledges that policy may change, so full marks are not justified.
Setup experience 12/20
The README gives concise Pi extension installation, Claude Code login, and model-selection steps, with a minimum Pi version and optional configuration. Setup still assumes Pi and Claude Code are installed and requires a separate login; there is no mainstream MCP client configuration example. The static material also lacks the verifiable CI and key-path test evidence required for a higher score.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the network

Best for

  • People using Pi 1.5.1 or newer with a Claude subscription.
  • People who want Claude Code to use Pi tools and skills.

Not for

  • People looking for an MCP server or MCP client connection.
  • People who need Claude Code permission rules or PreToolUse hooks to restrict tool execution.
  • People relying on extensions that change Pi's system prompt or message history each turn and need seamless compatibility with Claude Code sessions.

Required permissions

  • Requires access to a Claude Code login and subscription quota.
  • Bridge session pointers, content digests, and record IDs are stored in Pi's agent directory; the Claude Code child process inherits Pi's environment.
  • Hooks in Claude Code user settings run during bridge turns; tool permissions should be managed on the Pi side.

Risks and side effects

  • The author says the bridge currently uses regular subscription quota, but billing policies may change.
  • Rewritten history can prevent cache reuse, and file snapshots in rewritten portions may be lost.
  • Changes to instructions or extension prompts trigger a new session and resend uncached history; some extensions that inject a message on every request can prevent cache reuse.
  • Running the same Pi session simultaneously in multiple bridge processes is unsupported.
  • Anthropic environment variables can override the Claude Code child configuration; Claude Code permission rules and PreToolUse hooks should not be relied on to restrict tools.

Setup

Before you start

Runtime:Node.js

ANTHROPIC_API_KEY optionalsecret Optional Anthropic API key variable; blank it in the credential env to prevent an exported value from affecting bridge calls.
ANTHROPIC_AUTH_TOKEN optionalsecret Optional Anthropic auth token variable; blank it in the credential env to prevent an exported value from affecting bridge calls.
Other optional settings (10)
PI_CODING_AGENT_DIR optional pi agent directory used for session data and debug logs; defaults to ~/.pi/agent.
PI_CODING_AGENT optional Marker variable pi sets for child processes; Claude Code hooks can check it to skip themselves.
HTTPS_PROXY optional Optional HTTPS proxy address; set in the env object of a claude-bridge credential.
ANTHROPIC_BASE_URL optional Optional Anthropic API base URL; blank it in the credential env to prevent an exported value from affecting bridge calls.
CLAUDE_CONFIG_DIR optional Claude Code config directory variable; the credential env cannot override it.
HOME optional User home directory variable; the credential env cannot override it.
USERPROFILE optional User profile directory variable; the credential env cannot override it.
CLAUDE_BRIDGE_DEBUG optional Set to 1 to enable bridge debug output.
CLAUDE_BRIDGE_DEBUG_PATH optional Optional variable to override the bridge log location.
CLAUDE_BRIDGE_TESTING_ALT_MODEL optional Set in .env.test for integration smoke tests that require another model.

Requires Pi 1.5.1 or newer. Install the extension in Pi with pi install npm:pi-claude-bridge, then log in to Claude Code with claude auth login. Choose a claude-bridge/... model in Pi's /model menu. Optional: install the AskClaude tool with pi install npm:pi-claude-bridge-askclaude.

Check that it works

Select a claude-bridge/... model in pi and send a request; receiving a Claude response confirms the bridge is working.

Troubleshooting

  1. Check that `claude auth login` has been run and that Pi is using a `claude-bridge/...` model rather than `anthropic/...`.
  2. A Claude Code 404 model error may mean the model is only available to approved programs.
  3. Check whether exported `ANTHROPIC_BASE_URL`, `ANTHROPIC_API_KEY`, or `ANTHROPIC_AUTH_TOKEN` values are overriding the bridge configuration.
  4. Set `CLAUDE_BRIDGE_DEBUG=1` to inspect bridge and per-query Claude Code CLI logs.
  5. For session-resume failures, inspect the `syncResult:` lines in the bridge log and the corresponding CLI log.

Use cases

Use Claude Code and Claude subscription models from within Pi.
Let other providers delegate questions or tasks to Claude Code using the optional AskClaude tool.

Overview

Pi Claude Bridge is a Claude Code inference-provider extension for Pi. It connects Claude Code through the Anthropic Agent SDK and uses Claude subscription quota. It synchronizes session history between Pi and Claude Code and forwards Pi tools and skills to Claude Code. It is not an MCP server.

Similar servers

Source revision bc46bc86459a Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/pi-claude-bridge.svg)](https://followmcp.com/en/servers/pi-claude-bridge)