
Overseer Nvim Mcp
io.github.impossiblecode由 GitHub 帳號 impossiblecode 發布v0.2.3更新於 Oct 24, 2026
Gives coding agents the user's own view and control of overseer.nvim tasks in Neovim
概覽
本機 MCP 伺服器,讓編碼代理在使用者的 Neovim 工作階段中列出、執行、追蹤、重新啟動、停止與移除 overseer.nvim 任務。
- 可以做什麼
- 列出任務,包含 id、名稱、狀態、結束碼、指令、工作目錄、耗時,以及任務是由代理或使用者啟動;列出從 npm、make、go-task、just 與 VS Code 提供者探索到的範本,支援子字串篩選並顯示參數。以原始指令陣列或帶參數的範本啟動長時間執行的指令,使其成為真正的 overseer 任務。讀取任務輸出,可等待正規表達式符合、任務結束或逾時,並用游標只取新增的行。依數字 id 或名稱子字串重新啟動、停止或移除任務,對使用者啟動的執行中任務需傳 force。另提供兩個斜線指令提示與可附加的任務清單及任務輸出資源。
- 適用情境
- 適合希望代理把開發伺服器、檔案監看器或 watch 模式測試執行放進使用者 Neovim 任務清單、而非自己 shell 的情境,如此程序會出現在 overseer 面板中,使用者可自行停止,工作階段結束時也能被正確清理。
- 執行需求
- 需要搭載 overseer.nvim 的 Neovim(以 v2.1.0 測試)、Node.js 22 或更新版本,以及在 Neovim 終端機緩衝區中執行的 MCP 用戶端,以便繼承 NVIM 通訊端變數。部分用戶端需明確轉送該變數,例如 Codex 設定中的 env_vars 或 mcphub 設定中的 env 區塊。透過 npx 以 stdio 方式啟動。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Overseer Nvim Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
overseer-nvim-mcp
An MCP server that gives a coding agent the same control over overseer.nvim tasks that you have: list, tail, run, restart, stop, and dispose.
[npm] [CI] [license] [Glama score]
Why
Your agent's shell tool and your overseer task list are separate execution worlds. A dev server the agent starts in its own shell is invisible in the task list, can't be stopped from it, and orphans its process tree when the session ends. Tasks you start get proper teardown. This closes that gap: the agent's long-running commands become real overseer tasks.
Requirements
- Neovim with overseer.nvim
(tested against
v2.1.0) - Node >= 22
- An MCP client running inside a Neovim terminal buffer
Install
The server speaks stdio and is started by your MCP client. The command is always the same:
The client must run inside a Neovim terminal buffer; that is where the
$NVIM socket it inherits comes from. Tools appear at the next session start,
since MCP servers connect at startup. If the tools never appear, the usual
cause is that $NVIM did not reach the server's environment: the server
registers nothing without it, and some clients strip the environment they
pass to servers.
Claude Code
Codex CLI
Then add one line to the generated block in ~/.codex/config.toml:
The env_vars line is required. Codex passes stdio servers a fixed whitelist
of variables (HOME, PATH, TERM and the like), $NVIM is not on it, and
without it the server registers no tools.
Codex also won't reach for the server on its own; see Getting your agent to actually use it.
Antigravity CLI
In ~/.gemini/config/mcp_config.json:
That user-global file is the one to use: the CLI's non-interactive print mode
(agy -p) loads MCP servers from it and from nowhere else; a workspace-level
.agents/mcp_config.json is silently ignored there.
Antigravity also won't reach for the server on its own; see Getting your agent to actually use it.
Gemini CLI
Or in settings.json:
opencode
In opencode.json:
mcphub.nvim (codecompanion.nvim, avante.nvim)
In mcphub's servers config:
The env block is required: mcp-hub does not pass its own environment to the
servers it spawns, so without it the server sees no $NVIM and registers no
tools. The server operates on the Neovim instance that started the hub. A hub
started outside Neovim has no $NVIM to forward, and mcp-hub reports this
server as disconnected with Variable 'NVIM' not found.
Using with LazyVim
LazyVim ships an overseer.nvim extra.
Enable it with :LazyExtras (select editor.overseer), restart Neovim, then
add the server to your MCP client as above. Nothing else is needed; the server
talks to whatever overseer configuration you already have.
Tools
The last three take force, and refuse a running task you started without it.
Tasks are addressed by numeric id or a case-insensitive name substring, so an
agent can say "dev" instead of tracking ids.
How it works
The transport is $NVIM, the RPC socket Neovim exports to every process it
spawns in a terminal buffer. Your MCP client inherits it, and this server, as a
child of that client, inherits it in turn.
Everything else follows from that:
- With
$NVIMset, the server registers seven tools, each onenvim_exec_luaagainst overseer over msgpack-RPC. - With
$NVIMunset, it registers nothing and gets out of the way. Running outside Neovim is a no-op rather than an error.
There is no socket discovery: no cwd hashing, no lsof, no
pgrep. Those approaches are structurally broken (a cwd-hash scheme cannot tell
a crashed instance's stale socket from a live one and will unlink working
sockets; pgrep on macOS excludes the caller's own ancestors, which is exactly
the Neovim instance that matters). $NVIM sidesteps both by construction.
All user input (task names, commands, working directories) is passed as msgpack
arguments and arrives in Lua as .... Nothing is ever interpolated into Lua
source, so a task name cannot become code execution.
It shares your task list, so it stays out of your tasks
The task list has two writers now, and only one of them can see it. Two things keep that from biting:
- A substring matching more than one task is an error that lists the
candidates and asks for a numeric id.
"dev"matches a dozen names in a monorepo, and silently taking the first is how the wrong thing gets stopped. - Tasks are tagged with who started them.
overseer_list_tasksreportsoriginasagentoruser, andoverseer_stop,overseer_restartandoverseer_disposerefuse a running task you started yourself unlessforceis passed. Finished tasks are unguarded, since removing a dead row costs nothing.
The asymmetry is on purpose. A wrong refusal costs one extra call. A wrong stop kills your dev server, loses whatever state it held, and you would have no reason to connect it to the agent.
overseer_run is for commands that do not exit on their own: dev servers,
file watchers, --watch test runs. Short commands that terminate by themselves
should stay on the agent's normal shell tool, where output is available in-band.
Round-tripping a two-second build through start-then-poll is worse.
An empty template list is normal
overseer_list_templates returns whatever overseer's providers discover, verbatim.
Most repos declare nothing runnable and return an empty list. That is a
legitimate answer, not an error. This is why overseer_run takes a raw cmd as
its primary path: a template-only design would be unusable in the common case.
No provider-specific knowledge lives in this server. It does not filter or rewrite results, including help-only entries some task runners expose, because doing so would mean encoding one provider's conventions into a server that must behave identically in a repo that has never heard of it.
What each entry carries:
descis an explicitnullwhen a provider supplies no descriptions. npm and make never do; go-task and just usually do. An explicit null says there is nothing to read, rather than leaving you guessing whether a field got dropped somewhere.- Entries with a description sort first. That encodes nothing about any provider, only about information content. A repo with a Taskfile and a package.json would otherwise bury its documented half beneath dozens of bare npm script names.
paramsare the arguments a template takes;requiredmarks the onesoverseer_runwill refuse the call without. Pass them asparams. A missing one is an error naming what it wanted rather than a prompt opened in your editor.running_task_idappears when a task of that name is already running. It is a name match, so it can miss (a template invoked with params produces a task named after the resolved command), but when it is there, it is the signal not to start a second dev server on top of yours.filtermatches a substring against name and desc. Worth using: a three-runner monorepo can return well over eighty entries.
Getting your agent to actually use it
On some clients this is automatic. The server returns MCP instructions in its
initialize result, and clients that surface those put them in the agent's system
prompt, where it is actually looking rather than buried among fifty tool
descriptions. It states the lifetime boundary (long-running here, short commands
on the shell) and tells the agent to check templates before reconstructing a
command, use wait_for instead of polling, and clean up only its own tasks.
The server withholds those instructions when $NVIM is unset, for the same
reason it registers no tools: a session that gets none should not be told how to
use them.
Whether the instructions reach the model is the whole game, and clients differ:
- Claude Code injects them. Copilot CLI injects them for servers whose
instructions you allow (
--allow-all-mcp-server-instructionsin scripted runs). - Codex CLI shows the model the tool definitions but not the instructions,
and leaving servers untouched until prompted is a known
open issue. Asked to "start
the dev server", it runs
npm run devin its own shell with the server connected and working. - Antigravity CLI injects nothing at all: it writes the instructions and
every tool schema to files under
~/.gemini/antigravity-cli/mcp/overseer/that the model only reads once something points it there. Same prompt, same result: its own shell.
On those two, either name overseer in the prompt ("start the dev server in
overseer" works on both) or say it once in the place the client actually
reads: its context file. One line in AGENTS.md (Codex) or GEMINI.md (Antigravity)
flips the same prompt to full overseer routing: templates checked first, task
run by name, output tailed after.
The markdown below is that one-time instruction, and it belongs in your
project context file on every client (CLAUDE.md, AGENTS.md, GEMINI.md, whatever yours reads).
Clients re-read project instructions constantly, so they outweigh anything the
server can send:
If that still isn't enough, a PreToolUse hook makes it deterministic. This one
blocks the shell for a few unambiguous cases and tells the agent what to do
instead. Start narrow and add patterns you actually hit, since a hook that fires
on the wrong thing is worse than none:
Waiting, without spinning
An agent driving a task by hand ends up guessing: start it, tail, get nothing, tail again, get nothing. It has no way to sleep, so every guess is a round-trip you watch scroll past.
overseer_tail takes a wait_for regex instead. It returns the moment a
matching line appears, or when the task exits, or at timeout_ms, and says
which of the three happened, so a timeout can't be misread as success:
total is a cursor. Pass it back as since and you get only what is new,
rather than re-reading the same screenful every poll:
from is the index the block actually starts at. If it is greater than
since + 1, output scrolled past between calls and you are looking at a gap
rather than a continuation.
overseer_run waits briefly too, up to settle_ms (default 1500, 0 to
disable), returning as soon as the task produces output or exits. A command that
dies on startup reports its failure there instead of returning the same bare id
a healthy dev server would.
The waiting happens in Node. This server runs inside
your editor, and vim.wait does not process input, so a fifteen-second wait in
Lua would freeze your session for fifteen seconds. Polling over the local socket
keeps Neovim responsive, and you never see the round-trips.
Slash commands and attachable resources
Tools are what the agent calls. The server also publishes two things you drive.
Prompts appear as slash commands (/mcp__overseer__... in Claude Code). The
server generates them per invocation, so they inspect your live editor state
rather than reciting a generic answer:
-
directory_local_taskdefines a task for a project that has no npm script, Makefile or Taskfile, using overseer's ownregister_templatein a.nvim.lua. It checks whetherexrcis actually on and whether a.nvim.luaalready exists, and includes the two things that make a correct setup look broken: it will not appear until Neovim restarts, and Neovim will ask you to:trustthe file. -
diagnoseexplains why overseer is not showing the tasks you expect. Overseer records, per provider, why it contributed nothing, and that reason is otherwise invisible:Which distinguishes "nothing to read here" from "that runner isn't installed", a distinction an empty list cannot make.
Resources are attachable rather than called:
overseer://tasks: the whole task list as JSONoverseer://task/{id}/output: one task's output, with a status line
The server enumerates the per-task URIs with live ids and supports completion, so a client can offer the tasks that exist instead of making you look one up.
Notes
- Output from a task started over RPC lives in the strategy's pending buffer, not
a terminal buffer, until you open the overseer panel.
overseer_tailreads both, strips ANSI colour codes and carriage returns, and trims the PTY's blank padding so you get clean log lines rather than the bottom of an empty grid. exit_codeis absent while a task is running and present once it exits, which is how an agent distinguishes a clean finish from a crash.
Contributing
See CONTRIBUTING.md. Releases are automated with release-please, so commits must follow Conventional Commits.
License
MIT © Miguel Angelo Sepulveda
來源:README.md,提交 29b63e4
工具
0版本歷史
1- v0.2.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分