Neovim MCP
Leverages Vim's native text editing commands and workflows, which Claude already understands, to create a lightweight code assistance layer.
What is Neovim MCP?
Neovim MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to leverages vim's native text editing commands and workflows, which claude already understands, to create a lightweight code assistance layer.
Leverages Vim's native text editing commands and workflows, which Claude already understands, to create a lightweight code assistance layer.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- vim_buffer
- vim_command
- vim_status
- vim_edit
- vim_window
Use Cases
Maintainer
Works with
Installation
NPM
npx -y mcp-neovim-serverManual Installation
npx -y mcp-neovim-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Neovim MCP
mcp-neovim-server is a TypeScript MCP server that bridges Claude and other AI assistants to a live Neovim instance through Neovim's remote API socket. It exposes 19 tools covering buffer reading and editing, Vim command execution, window management, search and replace, macro recording, and more — all using Vim's native idioms that Claude already understands. This creates a lightweight, latency-efficient code assistance layer where the AI can read your current buffers, make edits, run searches, and execute Vim commands without requiring a full IDE plugin.
Prerequisites
- Node.js 18+ and npx available on your system
- Neovim 0.8 or later installed
- Neovim must be started with the --listen flag to expose a socket (e.g., nvim --listen /tmp/nvim)
- An MCP-compatible client such as Claude Desktop or Cursor
Start Neovim with a socket listener
Launch Neovim with the --listen flag pointing to a socket path. This is required so the MCP server can connect to the running Neovim instance via its remote API. Add this to your shell alias or Neovim launch script for convenience.
nvim --listen /tmp/nvimInstall the MCP server globally (optional)
You can run the server directly with npx without installation, but installing globally avoids the startup delay on each invocation.
npm install -g mcp-neovim-serverConfigure Claude Desktop
Add the mcp-neovim-server entry to your claude_desktop_config.json. Set NVIM_SOCKET_PATH to match the path you used in the --listen flag. Set ALLOW_SHELL_COMMANDS to true only if you want the AI to run shell commands via the '!' prefix.
{
"mcpServers": {
"MCP Neovim Server": {
"command": "npx",
"args": ["-y", "mcp-neovim-server"],
"env": {
"NVIM_SOCKET_PATH": "/tmp/nvim",
"ALLOW_SHELL_COMMANDS": "false"
}
}
}
}Restart Claude Desktop
After saving the config, fully restart Claude Desktop. The Neovim MCP tools will appear in the tool list once the server connects successfully to the running Neovim socket.
Open a file in Neovim and ask Claude to help
With a file open in Neovim, switch to Claude and ask it to read the buffer, make edits, or run a search. The server will use vim_buffer to read content and vim_edit or vim_command to apply changes.
Neovim MCP Examples
Client configuration
Full Claude Desktop configuration for the Neovim MCP server with shell commands disabled.
{
"mcpServers": {
"MCP Neovim Server": {
"command": "npx",
"args": ["-y", "mcp-neovim-server"],
"env": {
"NVIM_SOCKET_PATH": "/tmp/nvim",
"ALLOW_SHELL_COMMANDS": "false"
}
}
}
}Prompts to try
Example prompts for Neovim-assisted coding tasks once the server is connected.
- "Read the current buffer and explain what this function does"
- "Search for all occurrences of 'TODO' in the current file and list them"
- "Replace all instances of 'foo' with 'bar' in the current buffer"
- "Run :w to save the file, then run :!python % to execute it"
- "Show me all open buffers and switch to the one named main.py"Troubleshooting Neovim MCP
Server reports 'failed to connect to Neovim socket'
Ensure Neovim was started with 'nvim --listen /tmp/nvim' (or your custom path) before starting Claude Desktop. The socket file must exist at the path specified in NVIM_SOCKET_PATH. Verify with 'ls -la /tmp/nvim'.
NVIM_SOCKET_PATH mismatch between config and running Neovim
The path in your MCP config's NVIM_SOCKET_PATH must exactly match the path given to Neovim's --listen flag. If you use a different path (e.g., /tmp/neovim.sock), update both places. You can also set the path in your Neovim init.lua: vim.fn.serverstart('/tmp/nvim').
vim_command tool runs commands but Neovim does not reflect changes
Commands that modify the buffer state are synchronous but UI refresh can lag. Use vim_buffer after vim_command to confirm the change took effect. If edits seem lost, check if you have unsaved changes with vim_status before making further modifications.
Frequently Asked Questions about Neovim MCP
What is Neovim MCP?
Neovim MCP is a Model Context Protocol (MCP) server that leverages vim's native text editing commands and workflows, which claude already understands, to create a lightweight code assistance layer. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Neovim MCP?
Install via npm with the command: npx -y mcp-neovim-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Neovim MCP?
Neovim MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Neovim MCP free to use?
Yes, Neovim MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Neovim MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Neovim MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Neovim MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Neovim MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.