Neovim MCP Server
A proof of concept integration between Claude Desktop (or any client) and Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library. This server leverages Vim’s native text editing commands and workflows, which Claude already understands, to create a lightweight code or general purpose AI text assistance layer.
Features
- Connects to your nvim instance if you expose a socket file, for example
--listen /tmp/nvim, when starting nvim - Views your current buffers
- Gets cursor location, mode, file name
- Runs vim commands and optionally shell commands through vim
- Can make edits using insert or replacement
API
Resources
nvim://session: Current neovim text editor sessionnvim://buffers: List of all open buffers in the current Neovim session with metadata including modified status, syntax, and window IDs
Tools
- vim_buffer
- Current VIM text editor buffer with line numbers shown
- Input
filename(string) - Filename is ignored, returns a string of numbered lines with the current active buffer content
- vim_command
- Send a command to VIM for navigation, spot editing, and line deletion
- Input
command(string) - Runs a vim command first passed through
nvim.replaceTermcodes. Multiple commands will work if separated by newlines - On error,
'nvim:errmsg'contents are returned
- vim_status
- Get the status of the VIM editor
- Status contains cursor position, mode, filename, visual selection, window layout, current tab, marks, registers, and working directory
- vim_edit
- Edit lines using insert, replace, or replaceAll in the VIM editor
- Input
startLine(number),mode("insert"|"replace"|"replaceAll"),lines(string) - insert will insert lines at startLine
- replace will replace lines starting at startLine
- replaceAll will replace the entire buffer contents
- vim_window
- Manipulate Neovim windows (split, vsplit, close, navigate)
- Input
command(string: “split”, “vsplit”, “only”, “close”, “wincmd h/j/k/l”) - Allows window management operations
- vim_mark
- Set a mark at a specific position
- Input
mark(string: a-z),line(number),column(number) - Sets named marks at specified positions
- vim_register
- Set content of a register
- Input
register(string: a-z or "),content(string) - Manages register contents
- vim_visual
- Make a visual selection
- Input
startLine(number),startColumn(number),endLine(number),endColumn(number) - Creates visual mode selections
Using this simple set of tools, Claude can peer into your neovim session to answer questions as well as make edits to the buffer.
Limitations
- This is a quick proof of concept to experiment with Model Context Protocol. Use at your own risk.
- May not interact well with a custom neovim config!
- Error handling could be better.
- Sometimes Claude doesn’t get the vim command input just right.
Configuration
Environment Variables
ALLOW_SHELL_COMMANDS: Set to ‘true’ to enable shell command execution (e.g.!ls). Defaults to false for security.NVIM_SOCKET_PATH: Set to the path of your Neovim socket. Defaults to ‘/tmp/nvim’ if not specified.
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"MCP Neovim Server": {
"command": "npx",
"args": [
"-y",
"mcp-neovim-server"
],
"env": {
"ALLOW_SHELL_COMMANDS": "true",
"NVIM_SOCKET_PATH": "/tmp/nvim"
}
}
}
}
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Neovim Server
Project Details
- bigcodegen/mcp-neovim-server
- mcp-neovim-server
- MIT License
- Last Updated: 4/20/2025
Recomended MCP Servers
本项目通过将 MCP 协议转换为 MQTT 协议,我们能够利用强大的大型语言模型(LLMs),就能轻松操控您的智能家居、机器人或其他硬件设备。
A Model Context Protocol (MCP) server that enables Claude and other AI assistants to send SMS messages using...
MCP Server for Databricks
Query model running with Ollama from within Claude Desktop or other MCP clients
A Model Context Protocol Server for Home Assistant
A powerful Model Context Protocol (MCP) server that helps refine AI-generated content to sound more natural and human-like....
A Model Context Protocol (MCP) server that enables LLMs to interact with Anki flashcard software through AnkiConnect.
强大的MCP翻译服务器!#AiryLarkMCP 🌐 专为专业翻译人员设计: • 三阶段翻译流程:分析规划、精准翻译、全文审校 • 自动识别专业领域术语 • 提供全面翻译质量评估 • 支持多语种互译 • 保持原文风格与专业性 💯 无缝集成Claude/Cursor等支持MCP的AI助手,让AI翻译达到专业水准!
MCP server for interacting with RabbitMQ
Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more...





