Skip to content

bug(mcp): tracked .mcp.json declares a project server that pi blocks on every start #210

Closed

Description

@danielvm-git

Fix order: 5 of 7 · Severity: P1

Symptom

Every pi start in a bigpowers checkout:

Warning: MCP: Project servers blocked: bigpowers-mcp (blocked: project server approval denied — reload in a trusted interactive session to approve it)

The server is never approvable-as-shipped: the approval is keyed by project root + definition hash (~/.pi/agent/mcp-project-approvals.json), so it re-appears in every worktree, every clone, and every fresh machine.

Root cause

  • .mcp.json is tracked in git and declares a project-scope server for all checkouts:

    { "mcpServers": { "bigpowers-mcp": {
        "command": "node",
        "args": ["${OMP_PLUGIN_ROOT:-.}/bigpowers-mcp/build/index.js"],
        "cwd": "${OMP_PLUGIN_ROOT:-.}" } } }
  • That entry only makes sense for OMP plugin installs (where OMP_PLUGIN_ROOT is set). In a normal clone the fallback . happens to work only if bigpowers-mcp/build/index.js exists, so trust + approval get spent on a dev-only server.

  • The adapter treats any project-scope MCP entry as untrusted-by-default (pi-mcp-adapter project-server-trust.ts:44-46) and the policy can only be relaxed in the user-global adapter config, never the project one (config.ts:655).

Net effect: a permanent, unactionable startup warning for every contributor, on every worktree.

Fix direction

  • Generate .mcp.json at install time (OMP plugin loader / bigpowers setup --mcp) instead of committing it; keep scripts/validate-mcp-package.sh proving the packaged form still starts.
  • If it must ship, gate it: .mcp.json.example in-repo plus a documented bigpowers setup --mcp that writes the real file for OMP users.
  • Add the denial/approval path to docs/references/bigpowers-mcp.md: approve once, or set settings.projectServers: "allow" in ~/.pi/agent/mcp-adapter.json.

Verify

pi    # no "Project servers blocked" line in a plain clone
OMP_PLUGIN_ROOT=$PWD bigpowers setup --mcp && pi   # server available where it belongs

Activity

  1. added
    bug
    quality
    on Nov 6, 2026
  2. github-actions commented on Nov 6, 2026

    @github-actions

    🎉 This issue has been resolved in version 2.94.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugqualityreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions