
fish-bridge — Session Knowledge Graph
io.github.MakeaMouse由 GitHub 账号 MakeaMouse 发布v0.1.3更新于 Oct 24, 2026
Compresses AI chat sessions into a typed knowledge graph. Local/offline via Ollama.
概览
本地 MCP 服务器,将 AI 对话会话压缩为带类型的知识图谱,并把精简的上下文块写入项目指令文件。
- 可以做什么
- 在 agent 模式下实时把对话轮次记录进会话知识图谱,可选由 LLM 抽取后端完成类型标注与去重。读取当前上下文、聚焦子集以及活跃或延后节点列表。添加节点、标记条目已解决,并导出或导入会话图谱文件。配套 CLI 可摄取 Copilot 记录、粘贴文本、文档、代码库、依赖文件、测试输出、IaC 与 OpenAPI 规范,再把图谱编译进 copilot-instructions.md 或 CLAUDE.md。
- 适用场景
- 适合需要跨轮次或跨工具延续长对话、又不想重复发送数万 token 的场景,也适合把决策、任务和错误以结构化、可编辑的图谱保存在项目指令文件中。基于文件的工作流并不需要这个 MCP 服务器。
- 运行要求
- 以 Python 包 fish-bridge-mcp 形式本地运行,可通过 uv、uvx 或 pip 安装;仅限桌面环境。需要抽取后端:本地 Ollama,或使用 ANTHROPIC_API_KEY、GEMINI_API_KEY、OPENAI_API_KEY 配置的云端后端。云端后端按轮次计费。
安装
在 SourceWeft 中
- 打开 控制台中的 fish-bridge — Session Knowledge Graph,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
fish_bridge
[CI] [PyPI] [Python] [License: MIT]
Session-scoped knowledge graph engine for AI chat context compression.
Converts raw AI chat (40k+ tokens) into a compact typed knowledge graph (~300–800 tokens) and writes it to .github/copilot-instructions.md or CLAUDE.md — automatically included in every AI turn across all modes (ask, edit, agent). No MCP server required for the core workflow.
Install
Don't have
uv? Get it first:curl -LsSf https://astral.sh/uv/install.sh | sh(macOS/Linux) or see uv docs. It replaces pip + pipx + pyenv in one tool — no virtualenv management needed.
Recommended — uv tool install (installs both the fish-bridge CLI and fish-bridge-mcp MCP server on your PATH):
After install, two commands are available on your PATH:
fish-bridge— the main CLI (ingest,compile,show,serve, ...)fish-bridge-mcp— the MCP server for VS Code agent mode
MCP config only (no permanent install needed): use uvx directly in your .vscode/mcp.json — it downloads and runs the MCP server on demand:
See the MCP server section below for the full config.
Traditional pip install (for embedding fish-bridge as a library in your own Python project)
2-minute quickstart
That's it. .github/copilot-instructions.md now contains a ~350-token compressed summary of your session, replacing raw history in every future turn.
Backends
Configure with:
Full CLI reference
MCP server (optional — agent mode only)
The MCP server adds real-time record_turn capture when using VS Code agent mode. It is not required — the file-based workflow above works in all modes without it.
Add to .vscode/mcp.json (uses uvx — no prior install needed):
If you used uv tool install fish-bridge-mcp, you can also reference the installed binary directly:
See examples/ for Claude Desktop, Cursor, and Windsurf configs.
MCP tools: record_turn, get_context, get_focus, mark_resolved, add_node, export_session, import_session, show_active, list_deferred
Ingest sources
How it works
- Ingest — reads raw chat turns from JSONL (Copilot), paste, or any file format
- Extract — LLM extracts typed nodes (questions, decisions, errors, tasks, skills, files) and edges
- Dedup — semantic similarity merges near-duplicates; conflict detection flags status reversals
- Compile — graph is compressed to ~300–800 token XML/markdown block
- Write — block is written to
.github/copilot-instructions.md(orCLAUDE.md) - Deliver — AI tool reads the file automatically on the next turn — no injection, no agent required
Documentation
License
MIT — see LICENSE
来源:README.md,提交 e995e56
工具
0版本历史
1- v0.1.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分