Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Pi: use pi's native MCP client (mcp.json) instead of the generated cbmem.ts bridge

Đang mở
#2,553 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, json
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start with install_pi_durable_context() in src/cli/cli.c and smoke test 8al; inspect how Pi configuration and uninstall are handled, plus the README’s Pi MCP guidance. Implementing this spans version-dependent install and upgrade behavior, config merging, cleanup, and documentation. Done means Pi 0.99+ uses the native MCP config and removes managed bridge artifacts, older versions keep the bridge, and install, update, and uninstall behave as described.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

editor/integration parsing/quality
What problem does this solve?

Pi has a native MCP client since 0.99.0 (on by default in 1.0). Servers go in ~/.pi/agent/mcp.json, same mcpServers format as Claude Code. Docs: https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md

The installer still assumes pi has no MCP:

  • install_pi_durable_context() in src/cli/cli.c generates ~/.pi/agent/extensions/cbmem.ts, spawning cli --json <tool> per call
  • smoke test 8al fails if ~/.pi/agent/mcp.json gets created
  • README says Pi MCP needs an extension

Result: no persistent server, schemas copied into a generated file that drifts (see #1550, #1806, #1834, #1867, #1990, #2166), and if you add the server to mcp.json yourself you get duplicate tools, because every install/update writes cbmem.ts back.

Proposed solution

On pi >= 0.99, merge an entry into ~/.pi/agent/mcp.json instead of generating cbmem.ts:

{ "mcpServers": { "codebase-memory-mcp": {
  "command": "/home/<user>/.local/bin/codebase-memory-mcp",
  "exposure": "direct"
} } }
  • direct exposure, since pi's default (codemode) hides tools behind JS scripts
  • tools become mcp__codebase_memory_mcp__<tool>, worth noting in the AGENTS.md block
  • delete a managed cbmem.ts on upgrade, remove the entry on uninstall
  • keep the bridge for pi < 0.99
Alternatives considered

Status quo, or users edit mcp.json by hand and delete cbmem.ts after every update (what I do now).

Confirmations
  • I searched existing issues and this is not a duplicate. Related: #1500, #2166.
Ngôn ngữ chính
C
Star
45.8k
Fork
3.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
208

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DeusData/codebase-memory-mcp

Tất cả issue của DeusData/codebase-memory-mcp

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.