Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#2,553 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
c, json
领域
cli, devtools

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
C
星标
45.8k
派生
3.8k
平均合并
3 天 4 小时
30 天内合并 PR
208

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DeusData/codebase-memory-mcp 的其他 Issue

查看 DeusData/codebase-memory-mcp 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。