Purpose
fish-bridge-mcp is an economical and token-saving AI tool that provides graph-based session memory for very long chat sessions. It applies a session-scoped knowledge graph engine to AI chat context compression, converting raw AI chats (40k+ tokens) into a compact typed knowledge graph (about 300–800 tokens), and writes it into .github/copilot-instructions.md or CLAUDE.md. This file is automatically included in every round of AI conversation in all modes (ask, edit, agent), so it works without injection and without an agent. The core workflow does not require an MCP server.
Main capabilities
- Ingest: read raw chat turns from JSONL (Copilot), pasted content, or any file format.
- Extract: an LLM extracts typed nodes (questions, decisions, errors, tasks, skills, files) and edges.
- Dedup: merge near-duplicates via semantic similarity; conflict detection flags status reversals.
- Compile: compress the graph into a roughly 300–800 token XML/markdown block.
- Write: write the compressed block into .github/copilot-instructions.md (or CLAUDE.md).
- Deliver: the AI tool automatically reads this file in the next round — no injection, no agent.
MCP tools include: record_turn, get_context, get_focus, mark_resolved, add_node, export_session, import_session, show_active, list_deferred.
Usage
Prerequisites: if uv is not installed, install it first: curl -LsSf https://astral.sh/uv/install.sh | sh (macOS/Linux), or refer to the uv documentation. The single uv tool can replace pip + pipx + pyenv, with no need to manage virtualenv.
Recommended installation method — uv tool install (installs both the fish-bridge CLI and the fish-bridge-mcp MCP server to PATH): After installation, two commands are available on PATH:
- fish-bridge — the main CLI (ingest, compile, show, serve, etc.)
- fish-bridge-mcp — the MCP server for VS Code agent mode
MCP configuration only (no permanent installation needed): use uvx directly in .vscode/mcp.json, and it will download and run the MCP server on demand. See the MCP server section for the full configuration.
2-minute quick start: after completion, .github/copilot-instructions.md will contain a roughly 350 token session compression summary, replacing the raw history in every subsequent round. It can be adjusted via configuration commands.
MCP server (optional — agent mode only): the MCP server adds real-time record_turn capture in VS Code agent mode. It is not required — the file-based workflow described above runs without it in all modes. Add it to .vscode/mcp.json (using uvx, no pre-installation needed). If you have used uv tool install fish-bridge-mcp, you can also reference the installed binary directly. Configuration examples for Claude Desktop, Cursor, and Windsurf are in the examples/ directory.
Applicable scenarios
Suitable for scenarios requiring long, multi-turn AI chat sessions, especially for users who want to reduce the raw history tokens repeatedly carried in each round of conversation, lower context costs, and let the AI continuously remember key questions, decisions, errors, tasks, skills, and file information. Also suitable for real-time turn capture in VS Code agent mode.
Limitations
- The core workflow does not depend on the MCP server; the MCP server is only used for real-time record_turn capture in VS Code agent mode.
- Offline extraction is an optional feature, implemented via Ollama.
- The compressed knowledge graph is about 300–800 tokens, with the specific size depending on the session content.
- The project uses the MIT license, see LICENSE for details.
- More information on charges, pricing, platform support scope, performance metrics, etc. is not yet available in the materials.