nvim-mcp
MCP server for AI-assisted control of Neovim via msgpack-RPC
pinned to #f536171updated 2 days ago
Ask your AI client: “install mcps/nvim-mcp”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install mcps/nvim-mcpmetahub onboarded this repo on the author's behalf.
If you own github.com/paulburgess1357/nvim-mcp on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
60
Last commit
2 days ago
Latest release
published
- #ai
- #artificial-intelligence
- #claude
- #claude-code
- #codex
- #cursor
- #large-language-model
- #llm
- #mcp
- #mcp-server
- #model-context-protocol
- #msgpack-rpc
- #neovim
- #neovim-config
- #nvim
- #openai
- #text-editor
- #vim
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.f536171· 2 days ago
Documentation
8 passed1 warningHomepage or repository declaredwarn
No homepage or repository declared.
Add a "homepage" or "repository" field to pyproject.toml.
Description quality
9 words · 60 chars — OK but more detail helps
README is present and substantial
5,677 chars · 7 sections · 1 code block
Tags / topics declared
18 total — ai, artificial-intelligence, claude, claude-code, codex, cursor (+12)
README has usage / example sections
found: Quick start
Homepage / docs URL declared
no homepage declared (registry will use the repo URL) — info-only, not blocking
Description is substantive
Description is 9 words.
Documentation present and substantive
Documentation present (README.md, 659 words).
Documentation shows usage
Documentation includes 1 code example.
Release history
1- releasecurrentf536171warn2 days ago
Contents
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
<video src="https://github.com/user-attachments/assets/6de3f7a4-9c12-4a2f-96d9-d02d21935d37"></video>
Using nvim-mcp with a terminal inside Neovim
<video src="https://github.com/user-attachments/assets/93fd17a6-0f93-48db-8428-d1cba51e29f2"></video>
Claude and Cursor collaborating in one Neovim instance
<video src="https://github.com/user-attachments/assets/d92915ec-2108-4166-9911-4d09a5025865"></video>
Using nvim-mcp in Cursor
<video src="https://github.com/user-attachments/assets/388f5f39-ab4d-4747-9eca-e09c666439ee"></video>
Multiple Neovim instances
<video src="https://github.com/user-attachments/assets/15fa449e-0296-4815-8bfc-b9c33b5075bb"></video>
Quick start
nvim-mcp runs via uv (recommended) or Nix.
Cursor users: A Marketplace plugin is pending review — once available, it installs the MCP server and agent rule together (you can skip to step 4). To activate the rule, start chats with something like "Connect to my Neovim instance" — or set the rule to "Always" in Settings → Rules to apply it on every turn.
-
Install a launcher.
<strong>uv</strong>
curl -LsSf https://astral.sh/uv/install.sh | sh<strong>Nix</strong>
Install Nix — flakes must be enabled.
-
Register the MCP server with your client. Example for Cursor (
.cursor/mcp.json):<strong>With uv</strong>
{ "mcpServers": { "nvim-mcp": { "command": "uvx", "args": ["nvim-mcp"] } } }<strong>With Nix</strong>
{ "mcpServers": { "nvim-mcp": { "command": "nix", "args": ["run", "github:paulburgess1357/nvim-mcp"] } } }For Claude Code, Codex, Claude Desktop, OpenCode, and other clients, see the configuration guide.
-
Add agent rules — do not skip this. Without rules, the agent has the tools but doesn't know when or how to use them, and behavior will be unreliable. See the configuration guide for setup.
-
Start Neovim — on most Linux systems it listens on a Unix socket automatically and is discovered by nvim-mcp. If auto-discovery doesn't work, see environment variables. Running multiple instances? See multiple instances.
Verify it works
Open a file in Neovim and paste this into your AI agent:
For each step: explain what you're about to do, then do it, then tell me
what happened. Wait for me to say "next" before moving on.
1. What file am I in? Highlight the function my cursor is in.
2. Are there any diagnostics? Highlight any lines with errors or warnings.
3. Add a docstring above the function, then show me the diff.
4. Open a vertical split, write a short test for that function, and save both files.
Working safely
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-deterministic, have full access to Neovim's API, and you should assume they will make mistakes. Work in a version-controlled directory.
Requirements
- Linux
- Python ≥ 3.10
- Neovim ≥ 0.11 (older versions work with
--listenandNVIM_ADDRESS)
License
MIT — see LICENSE.
Reviews
No reviews yet. Be the first.
Related
Caveman
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
Nanobot
A lightweight personal AI assistant framework
Hermes Agent
The self-improving AI agent — creates skills from experience, improves them during use, and runs anywhere
mh install mcps/nvim-mcp