NvimSAFE
MCP server that connects AI agents to your running Neovim instance via msgpack-RPC — no plugins required.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/nvim-mcp/)
[](https://glama.ai/mcp/servers/paulburgess1357/nvim-mcp)
An MCP server that gives AI agents first-class access to your running Neovim session. It connects through Neovim's native msgpack-RPC socket — no plugins required.
Works with Cursor, Claude Code, Codex, OpenCode, and any MCP-compatible client.
Before you connect an agent to Neovim, please read Working safely.
What agents can do
- See what you see — editor mode, working directory, open buffers, window layout, cursor context, folds, selections, marks, and diagnostics.
- Edit buffers in memory — find-and-replace or full rewrites with immediate feedback and full undo support. Nothing touches disk until you save.
- Run any Vim command —
:w,:e,:vsplit, macros, or anything else you could type at the command line. - Send keystrokes — navigate, enter insert mode, trigger mappings.
- Query LSP diagnostics — errors, warnings, and hints across one buffer or the whole session.
- Annotate code with highlights and virtual text — colored line highlights and inline/above/below text notes that never touch the buffer's real content.
- Work with multiple instances — auto-discovers running sessions and connects to the right one. See multiple instances.
Anything you can do in Neovim, the agent can too. See the full tool reference for details.
Demos
Using nvim-mcp across two terminals
Using nvim-mcp with a terminal inside Neovim
4ec580b44f1aOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add nvim-mcp -- uvx nvim-mcp
{
"mcpServers": {
"nvim-mcp": {
"command": "uvx",
"args": [
"nvim-mcp"
]
}
}
}Exposed tools (18)
7 read · 9 write · 2 destructive. Blast radius: 2 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_virtual_text | write | Add a virtual text annotation to a Neovim buffer. Visual only — |
add_virtual_texts | write | Add multiple virtual text annotations to Neovim buffers in a |
clear_highlights | destructive | Remove all MCP highlights from a Neovim buffer. Only removes |
clear_virtual_texts | destructive | Remove all MCP virtual text annotations from a Neovim buffer. |
connect | read | Connect to a running Neovim instance over its Unix socket or TCP address. |
find_and_replace_buf | write | Find and replace text in a Neovim buffer. The edit happens in-memory |
get_all_diagnostics | read | Get LSP diagnostics from all open buffers in Neovim. Read-only. |
get_buf_diagnostics | read | Get LSP diagnostics for a single Neovim buffer. Read-only. |
get_state | read | Full snapshot of the current Neovim session. Read-only — does not |
get_state_brief | read | Lightweight snapshot of the Neovim session for quick orientation. |
highlight_range | write | Add a colored line highlight to a Neovim buffer. This is a visual |
highlight_ranges | write | Add colored line highlights to one or more Neovim buffers in a single |
read_buf_range | read | Read a specific line range from a Neovim buffer. Read-only; reads |
read_full_buf | read | Read the full content of a Neovim buffer. Read-only; reads from |
send_command | write | Run one or more Vim ex commands in Neovim. This is a mutation tool — |
send_keys | write | Send raw keystrokes to Neovim as if typed by the user. This is a |
send_to_terminal | write | Type text into a terminal buffer |
write_full_buf | write | Replace the entire content of a Neovim buffer. The edit happens |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (4)
clear_highlights, clear_virtual_texts
The tools and agent rules are designed to use non-destructive operations — edits happen in memory, undo history is preserved, and the agent is steered toward buffer operations. But LLMs are non-determ
curl -LsSf https://astral.sh/uv/install.sh | sh
assets/avatar.png
Gates applied: no_behavioural_pass.
4ec580b44f1afull audit observations/trust-audit/mcp-server/paulburgess1357__nvim-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 4ec580b44f1a | SAFE | B | 89 | first audit |
Questions
What is the Nvim MCP server?
MCP server that connects AI agents to your running Neovim instance via msgpack-RPC — no plugins required.
What tools does Nvim expose?
18 in total: 7 read-only, 9 that write, and 2 that can delete or overwrite (clear_highlights, clear_virtual_texts). Every one is listed on this page with its risk.
Is Nvim safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 2 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Nvim need?
No credential environment variables were found in its source, so it appears to need none.
How does Nvim run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as nvim-mcp.
How current is this page?
The grade is for one exact copy of the source (4ec580b44f1a), read on 2026-10-07. The repository is watched and re-audited when it changes.