What is Connect Claude Desktop to Neovim using MCP and the official neovim/node-client JavaScript library.?
This server leverages Vim's native text editing commands and workflows to create a lightweight code or general purpose AI text assistance layer. It connects to your nvim instance, manages buffers, runs commands, and provides comprehensive window management and health monitoring.
Documentation
Neovim MCP Server
Connect Claude Desktop (or any Model Context Protocol client) to Neovim using 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.
Version 0.5.3 - Now with a DXT package!
Features
Connects to your nvim instance if you expose a socket file, for example --listen /tmp/nvim, when starting nvim
Views your current buffers and manages buffer switching
Using this comprehensive set of 19 tools, Claude can peer into your neovim session, navigate buffers, perform searches, make edits, record macros, manage tabs and folds, and handle your complete development workflow with standard Neovim features.
Prompts
neovim_workflow: Get contextual help and guidance for common Neovim workflows including editing, navigation, search, buffer management, window operations, and macro usage. Provides step-by-step instructions for accomplishing tasks with the available MCP tools.
Error Handling
The server implements comprehensive error handling with custom error classes and consistent error responses:
NeovimConnectionError: Socket connection failures with detailed messages
NeovimCommandError: Command execution failures with command context
NeovimValidationError: Input validation failures
New in v0.5.2: All tools now include robust try-catch error handling that returns meaningful error messages in proper MCP format. Features include connection health monitoring, graceful error propagation, and actionable error messages to help diagnose issues.
Limitations
May not interact well with complex neovim configurations or plugins
Shell command execution is disabled by default for security
Socket connection required - won't work with standard vim
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.
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.