{
  "markdown": "[![CI](https://github.com/plumbkit/plumb/actions/workflows/ci.yml/badge.svg)](https://github.com/plumbkit/plumb/actions/workflows/ci.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/plumbkit/plumb.svg)](https://pkg.go.dev/github.com/plumbkit/plumb)\n[![Go Report Card](https://goreportcard.com/badge/github.com/plumbkit/plumb)](https://goreportcard.com/report/github.com/plumbkit/plumb)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"site/logo-dark.svg\">\n  <img alt=\"plumb\" src=\"site/logo-light.svg\" width=\"220\">\n</picture>\n\n<br>\n\n**IDE intelligence for agents — guardrails for unattended work, coordination for fleets.**\n\nPlumb is an [MCP](https://modelcontextprotocol.io) server that gives a coding agent the intelligence layer of an IDE — [LSP](https://microsoft.github.io/language-server-protocol/)-backed semantics, a [tree-sitter](https://tree-sitter.github.io/tree-sitter/) code index, and project memory — inside guardrails: atomic, lock-serialised writes with transactional rollback, scoped filesystem and git access, and a daemon that survives its own crashes. And because every agent you run shares that one daemon, plumb is also the coordination layer between them: peers see the writes others made, message each other, and hand off work instead of duplicating it. A single binary; nothing else to install.\n\n---\n\n## Why Plumb\n\nLLM agents usually work by reading whole files into the context window — token-heavy, lossy at scale, blind to symbol semantics, and unsafe to let loose on a real repo. Plumb is built on four pillars, in priority order.\n\n### 1. Reliability & write-safety\nLeaving an agent to edit a codebase for an hour is only viable if writes can't corrupt files and a crash can't wedge your session.\n\n- **Atomic I/O** — every write is staged in a temp file and renamed into place. No partial writes, ever. Symlink-aware, CRLF-tolerant.\n- **Per-path locking** — the daemon serialises concurrent writes to the same file across every session and chat window. No races.\n- **Multi-file transactions** — apply edits across dozens of files with guaranteed atomic rollback if any step fails.\n- **Crash-resilient daemon** — `plumb serve` is a reconnecting proxy. If the daemon crashes or hangs, it respawns one and replays the handshake; the agent never notices. In-flight writes are never silently re-run.\n- **Optimistic concurrency** — mtime/sha guards catch stale edits before they clobber newer changes.\n\nSee it run: [`docs/demos/`](docs/demos/) — `two-agents-one-file.sh` (a stale write is refused, nothing is lost) and `daemon-respawn.sh` (below — the daemon is killed mid-session; the agent's next edit still succeeds):\n\n![daemon-respawn.sh: the daemon is killed mid-session and the agent's next edit still succeeds](docs/assets/daemon-respawn.gif)\n\n### 2. Multi-agent coordination\nOne daemon serves every agent you run — which makes it the natural place for agents to *see and talk to* each other, not merely avoid each other's writes. Locks stop two agents corrupting a file; coordination stops them duplicating a task, rebasing onto a function signature a peer is mid-rewrite of, or shipping a change a peer's in-flight work is about to invalidate.\n\n- **Peer awareness** (on by default) — `workspace_sessions` names every active session and the writes it made, as the daemon recorded them. Recorded activity, not another agent's say-so: an agent about to start a task can see that a peer is already in those files. (Read-only operations never appear, and a write that failed or was refused is kept but marked `[failed — no change applied]` — so \"a peer is working here\" and \"this landed\" are distinguishable at a glance.)\n- **An agent-to-agent mailbox** (on by default, same workspace) — `leave_note` / `check_messages` give sessions a threaded channel: hand a change to the peer already rewriting those files, or ask a peer to *measure* a behaviour instead of assuming it. Messages ride on ordinary tool results, so a working agent receives them without polling.\n- **Advisory intents** (opt-in: `[collab] intents`) — `share_intent` declares what an agent is working on; a peer whose write touches a claimed path gets a hint at the moment of the would-be collision. Intents are deliberately labelled as unverified claims, kept distinct from the daemon-recorded activity feed, and never block anything.\n- **Durable findings** (opt-in: `[collab] knowledge_handoff`) — `share_findings` turns what an agent just learned into a searchable, secret-scrubbed project memory immediately, so the knowledge outlives the session that produced it.\n\nCoordination is advisory by design — the write-safety above never depends on agents cooperating. Reference: [Cross-agent sharing](docs/tools.md#cross-agent-sharing-collab) in the tool docs and the [`[collab]` config section](docs/configuration.md#collab--cross-agent-sharing).\n\n### 3. Semantic intelligence\nThe same primitives your editor has, exposed as structured tools:\n\n- **LSP-backed refactors** — `rename_symbol`, `replace_symbol_body`, `safe_delete_symbol` understand scope, types, and references.\n- **Real diagnostics inline** — actual `gopls`/`pyright` output is appended to every write, so the agent learns it broke the build immediately.\n- **Symbol search** — scoped to your code, no stdlib or dependency noise.\n\n### 4. Context efficiency & safety controls\n- **Read only what you need** — symbols or line ranges, not 2,000-line files.\n- **Scoped access you control** — a per-connection path allowlist (read-only vs read-write roots) plus tiered git gating (destructive and network operations are off by default and need explicit confirmation). See [SECURITY.md](SECURITY.md).\n- **One-round-trip bootstrap** — `session_start` returns workspace, branch, recent commits, diagnostics, and project memory.\n\nSee the measured, reproducible numbers behind this: [**docs/use-cases.md**](docs/use-cases.md) — reading one function is 2.9×–33.4× less context than the whole file (the ratio is how much of the file you didn't need), and `find_references` returns the real call sites where a text search is 60% noise. The page publishes the losses too: `read_multiple_files` costs 1.31× **more** payload than reading the files natively (down from 1.32×, but still a loss — see Scenario 10 for why it isn't smaller). Every figure is regenerated by [`scripts/measure-use-cases.py`](scripts/measure-use-cases.py).\n\n---\n\n## Get started\n\nPlumb is a single binary — from zero to your first answer:\n\n**1. Install**\n\n```sh\n# Homebrew (macOS + Linux) — recommended\nbrew install plumbkit/plumb/plumb\n\n# or with Go\ngo install github.com/plumbkit/plumb/cmd/plumb@latest\n\n# or grab a prebuilt binary: https://github.com/plumbkit/plumb/releases\n```\n\n> **macOS note:** prebuilt binaries are not yet notarised — on first run you may\n> need `xattr -d com.apple.quarantine ./plumb`, or right-click → Open. Homebrew\n> installs avoid this.\n\n**2. Connect your agent**\n\n```sh\nplumb setup claude-code      # also: claude-desktop, codex, gemini, cursor, …\n```\n\n`plumb setup` writes the MCP config for you — no hand-editing JSON.\n\n**3. Open your project and try it**\n\nMake sure the language server you need is on your `$PATH` (`gopls` for Go,\n`pyright` for Python, …), then point your agent at a real question. In Claude\nCode:\n\n```sh\ncd your/project\nclaude \"Use plumb to orient in this repo (session_start), then show me\neverywhere <Handler> is called and what would break if I changed its signature.\"\n```\n\nPlumb resolves the workspace and runs `session_start` for orientation, then\nanswers with real LSP and topology data — actual call sites and blast radius —\ninstead of guessing from file dumps. It's read-only; nothing is modified. (Any\nconnected agent works — just paste the prompt.)\n\n> No `go.mod`/`pyproject.toml` and not a git repo? Run `plumb init` once to pin\n> the workspace root (it also seeds `.plumb/context.md` and project config).\n\nFull walkthrough → [**docs/getting-started.md**](docs/getting-started.md).\n\n---\n\n## Language support (honest version)\n\nPlumb negotiates LSP capabilities per language and also ships a built-in tree-sitter index for search and navigation with no language server. Support comes in tiers — we'd rather be precise than claim a big number.\n\n| Tier | Languages | What you get |\n|---|---|---|\n| **First-class** (CI-tested, real-binary integration) | **Go** (gopls), **Python** (pyright) | Full LSP: definitions, references, rename, diagnostics, hierarchies + all write tools |\n| **Validated** | **Java** (jdtls), **Rust** (rust-analyzer), **Swift** (sourcekit-lsp), **TypeScript/JS** (typescript-language-server), **Zig** (zls), **Kotlin** (kotlin-lsp), **HTML** (vscode-html-language-server) | Full LSP; just put the server on `$PATH` and it activates automatically (exclude any language with `[lsp.<lang>] enabled = false`). HTML carries one caveat: that server has no filesystem access, so it answers only from documents already opened |\n| **Search & navigation** (tree-sitter, no LSP needed) | 31+ incl. JS/TS/TSX, Ruby, C, C#, Elixir, Scala, PHP, JSON, CSS, SCSS, XML, Lua, C++, Objective-C, Dart, Bash, SQL, HCL, Dockerfile, TOML, YAML, Markdown | Ranked symbol search, outlines, graph exploration via the Topology index |\n\nReal-binary validation has been exercised on **macOS and Linux** — as of 2026-08-21, all nine adapters pass their integration tests against real server binaries on both. Details, including three toolchain traps that look like adapter bugs, are in [docs/adding-an-lsp.md](docs/adding-an-lsp.md#validation-levels). Windows is [tracked but not yet supported](https://github.com/plumbkit/plumb/issues/8) — the daemon's Unix-socket architecture needs a port.\n\n---\n\n## How it works\n\n`plumb serve` is a thin, reconnecting stdio proxy. The real work happens in one shared background daemon, so language servers stay warm across chats.\n\n```mermaid\nflowchart TD\n    A1[\"Claude\"] --> S1[\"plumb serve *\"]\n    A2[\"Codex\"] --> S2[\"plumb serve *\"]\n    A3[\"Gemini\"] --> S3[\"plumb serve *\"]\n    S1 --> K[\"plumb.sock\"]\n    S2 --> K\n    S3 --> K\n    K --> D[\"plumb daemon **\"]\n    D --> SDB[(\"stats.db ***<br/>global — all projects\")]\n    D --> G[\"gopls → /projects/foo\"]\n    D --> P[\"pyright → /projects/bar\"]\n    G --> F1[(\"/projects/foo/.plumb/ ***<br/>topology.db · memory.db\")]\n    P --> F2[(\"/projects/bar/.plumb/ ***<br/>topology.db · memory.db\")]\n```\n\n`*` `plumb serve` is a reconnecting proxy — if the daemon crashes or hangs it respawns one and replays the handshake, so your session survives without the agent noticing.\n\n`**` one shared process, reused across every conversation.\n\n`***` SQLite. One **global** `stats.db` (tool stats + episodic summaries); two **per-project** indexes under each workspace's `.plumb/` — `topology.db` (the code graph) and `memory.db` (memory search). Schema details → [**docs/architecture.md**](docs/architecture.md#databases-at-a-glance).\n\nServers stay warm across chats, per-path locks are shared across every connection, and symbol indexes update live after each write. Full architecture → [**docs/architecture.md**](docs/architecture.md).\n\n---\n\n## Monitoring (TUI)\n\nRun `plumb` with no arguments for a live dashboard — see what your agent is doing in real time: every tool call as it happens, daemon health, per-tool stats, and streaming logs you can follow and filter. The fastest way to catch a runaway loop or confirm an edit landed.\n\n---\n\n## Core capabilities\n\nPlumb exposes **58 tools**. The ones you'll use constantly:\n\n`session_start` · `workspace_symbols` · `get_definition` · `find_references` · `rename_symbol` · `edit_file` · `transaction_apply` · `diagnostics`\n\nThe rest cover filesystem reads/writes, LSP hierarchies, tiered git, an optional local **Topology** index (ranked search + blast-radius/route analysis, no language server needed), durable per-project memory, and cross-agent coordination (peer sessions, an agent mailbox, opt-in intents and knowledge handoff). Full API reference: [**docs/tools.md**](docs/tools.md).\n\n---\n\n## Configuration\n\nGlobal or per-project `config.toml`, or environment variables. Run `plumb config show` to see the resolved config with provenance.\n\n```toml\n[edits]\nstrict = true                  # require read_file before edit_file\nrate_limit_per_minute = 30     # bound runaway agent loops\n\n[git]\nallow_destructive = false      # reset/checkout/rebase off by default\nallow_push = false             # push/fetch/pull off by default\n```\n\nFull settings reference: [**docs/configuration.md**](docs/configuration.md).\n\n---\n\n## The hard part\n\nAgents can already *read* code well enough; writing it unsupervised — concurrently, transactionally, recoverably — is what's still unsolved. Plumb is the bet that this is the half worth getting right first. It's early, and the language coverage says so: a small validated core, the rest clearly marked experimental.\n\n---\n\n## Roadmap\n\nPlumb is pre-1.0. The core — write-safety, the resilient daemon, the topology index, and project memory — is in daily use. The road to 1.0 is mostly about *proving* it beyond the validated core and smoothing distribution. Issues and ideas welcome.\n\n**Shipped**\n\n- [x] Concurrency-safe, atomic, transactional writes with rollback\n- [x] Crash-resilient reconnecting daemon\n- [x] Tree-sitter topology index + per-project memory\n- [x] Cross-agent coordination: peer awareness + agent mailbox (default on), intents + knowledge handoff (opt-in)\n- [x] Go and Python LSP adapters validated (real-binary)\n\n**Getting to 1.0.** Rather than jump from 0.9 straight to 1.0, Plumb ships a series of focused minor releases — **0.10 through 0.19** — each with one coherent theme. **0.19.x is the last 0.x release;** 1.0 follows it as a deliberate stability commitment. Native Windows support is intentionally a post-1.0 (1.1) item, not a 1.0 gate. The themed plan:\n\n- **0.10** — distribution + honest claims (Homebrew, semantic re-rank → GA)\n- **0.11** — validate the experimental LSP adapters on real binaries (zls ✓ validated; Kotlin ✓ validated on JetBrains' kotlin-lsp)\n- **0.12** — Swift on Xcode via Build Server Protocol guidance\n- **0.13** — daemon robustness (git-write crash safety, liveness probe)\n- **0.14** — agent ergonomics + tool surface\n- **0.15** — honesty + full config surface\n- **0.16** — stabilisation + cross-platform proving\n- **0.17** — distribution + discoverability (registries)\n- **0.18** — proof + docs\n- **0.19** — soak + feedback, the last 0.x (rolling patches, not a formal RC)\n- **1.0** — general availability: the stability + validated-core promise\n\nFull detail, rationale, and the post-1.0 items (Windows, tree-sitter cleanup) are in [docs/roadmap.md](docs/roadmap.md).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md) for architecture and code style. We follow Australian English in all prose. By contributing you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 15050,
  "sha": "b1c246fa392cca3ec4ffd3d981c2bd979c09fde5d2d66b1910b0a28e5212a234",
  "repo_slug": "plumbkit/plumb",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_plumbkit_plumb_1c6b09bd/readme"
}