v0.7.0: name MCP tools by leaf, not fully-qualified
Hardcoding mcp__neovim__vim_* in the agent/skill prose was wrong on two counts: (1) the prefix was flat-out incorrect — a plugin-shipped .mcp.json server is namespaced mcp__plugin_<plugin>_<key>__, not mcp__<key>__; (2) hardcoding any fully-qualified MCP tool name in prose is fragile — it depends on registration method and topology (metamcp aggregation injected/removed a segment). - frontmatter tools:/allowed-tools: use the correct prefix wildcard mcp__plugin_nvim-agentic-companion_neovim__* (the allowlist needs a real pattern; one place; stable with plugin name + .mcp.json key) - all prose now names tools by leaf (vim_command, vim_health, …) and tells the agent to match those against its actual runtime toolset rather than assume a prefix
This commit is contained in:
@@ -10,7 +10,7 @@ It assumes two things are already wired up:
|
||||
`serverstart` at editor startup). The plugin ships a `.mcp.json` that points
|
||||
the `neovim` MCP server at the `mcp-session-pool` over Streamable-HTTP
|
||||
(`pool.localhost:12010/p/neovim/mcp`); the pool fronts a supervised
|
||||
stdio→HTTP bridge. Tools surface as `mcp__neovim__vim_*`.
|
||||
stdio→HTTP bridge. Tools surface as `vim_*`.
|
||||
2. **`coder/claudecode.nvim`** loaded inside nvim, with `<leader>a*` keymaps
|
||||
wired (toggle, focus, send, accept/deny diff).
|
||||
|
||||
@@ -35,7 +35,7 @@ pool→bridge self-heals. Recovery is event-driven — a `systemd.path` watching
|
||||
the nvim socket fires a oneshot that POSTs `/repin` to the pool when the socket
|
||||
(re)appears; no polling. The pool and bridge run on emmett as systemd services
|
||||
under user `oleks`, so the per-user socket is directly reachable. If
|
||||
`mcp__neovim__*` tools are missing: socket exists? `systemctl status
|
||||
`vim_*` tools are missing: socket exists? `systemctl status
|
||||
nvim-mcp-bridge`? `http://127.0.0.1:12010/pools/neovim` pinned? session
|
||||
restarted since the wiring landed?
|
||||
|
||||
@@ -47,7 +47,7 @@ nvim-agentic-companion/
|
||||
├── agents/
|
||||
│ └── companion.md # the nvim-companion agent identity
|
||||
└── skills/
|
||||
├── editor-introspect/ # read live state via mcp__neovim__*
|
||||
├── editor-introspect/ # read live state via the vim_* MCP tools
|
||||
├── editor-act/ # drive nvim safely (open, jump, toggle, run)
|
||||
└── claude-code-handoff/ # delegate buffer edits to the in-editor Claude
|
||||
```
|
||||
@@ -85,8 +85,8 @@ The skills enforce that separation so the agent doesn't drift into running
|
||||
## Configuration
|
||||
|
||||
- **`nvim_socket`** — default `/run/user/1000/nvim.sock`. Where the
|
||||
running nvim listens; must match the socket `mcp-neovim-server`
|
||||
connects to (`NVIM_SOCKET_PATH` in the MetaMCP `neovim` upstream).
|
||||
running nvim listens; must match `NVIM_SOCKET_PATH` in the
|
||||
`nvim-mcp-bridge` service that `mcp-neovim-server` runs under.
|
||||
- **`config_path`** — default
|
||||
`/home/oleks/projects/servers/emmett/nixos/neovim.nix`. The
|
||||
declarative NixVim source the companion cites from.
|
||||
|
||||
Reference in New Issue
Block a user