Neovim MCP

v1.0.0Developer Toolsstable

Leverages Vim's native text editing commands and workflows, which Claude already understands, to create a lightweight code assistance layer.

anthropicclaudemcpmodelcontextprotocolneovim
Share:
314
Stars
0
Downloads
0
Weekly
0/5

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

Leverage Vim editing commands
Lightweight code assistance
Neovim integration for AI
bigcodegen

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-neovim-server

Manual Installation

npx -y mcp-neovim-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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/nvim
2

Install 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-server
3

Configure 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"
      }
    }
  }
}
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-neovim": { "command": "npx", "args": ["-y", "mcp-neovim-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides