nvim-mcp
by paulburgess1357·★ 54·Score 45
MCP server connecting AI agents to Neovim via msgpack-RPC, enabling code editing and command execution without plugins.
Overview
nvim-mcp provides AI agents with direct access to a running Neovim instance, allowing them to view buffers, execute commands, edit files in memory, query diagnostics, and more through Neovim's native msgpack-RPC protocol. It supports multiple AI clients including Cursor, Claude Code, Codex, and OpenCode. The server emphasizes safety by working with in-memory operations and preserving undo history before changes are saved to disk.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose nvim-mcp when you want AI agents to interact directly with your Neovim editor for code editing, analysis, or automation without requiring any plugins.
When NOT to choose this
Don't choose nvim-mcp if you're using a different editor, need write operations to disk without confirmation, or require authentication for secure multi-user environments.
Tools this server exposes
6 tools extracted from the READMEget_neovim_stateGet current Neovim editor state including mode, working directory, buffers, windows, cursor position, folds, selections, marks, and diagnostics.
edit_bufferEdit buffer contents in memory with find-and-replace or full rewrites.
run_vim_commandExecute any Vim command in Neovim.
send_keystrokesSend keystrokes to Neovim to navigate, enter modes, or trigger mappings.
get_lsp_diagnosticsQuery LSP diagnostics for errors, warnings, and hints across a buffer or the whole session.
add_highlightAdd colored extmarks to highlight specific lines or code regions.
Note: Tool names were inferred from the 'What agents can do' section. The actual tool names and signatures may differ and should be verified in the full tool reference (docs/TOOLS.md).
Comparable tools
Installation
Installation
Using uv (recommended)
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh- Register the MCP server with your client. For Cursor, add to
.cursor/mcp.json:
{
"mcpServers": {
"nvim-mcp": {
"command": "uvx",
"args": ["nvim-mcp"]
}
}
}For other clients like Claude Desktop, see the [configuration guide](config/README.md).
Using Nix
Ensure Nix is installed with flakes enabled:
{
"mcpServers": {
"nvim-mcp": {
"command": "nix",
"args": ["run", "github:paulburgess1357/nvim-mcp"]
}
}
}- Add agent rules to specify when and how the AI should use the tools. See the [configuration guide](config/README.md#2-add-agent-rules).
- Start Neovim. It will be auto-discovered on most Linux systems.
FAQ
- Is this plugin required in Neovim?
- No, nvim-mcp works with Neovim's native msgpack-RPC socket without requiring any plugins.
- What AI clients are supported?
- It works with Cursor, Claude Code, Codex, OpenCode, and any MCP-compatible client.
Compare nvim-mcp with
Last updated · Auto-generated from public README + GitHub signals.