GitHub - bigcodegen/mcp-neovim-server: Control Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library (original) (raw)

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.2 - Now with comprehensive error handling, improved MCP compliance, and helpful workflow prompts!

mcp-neovim-server MCP server

Features

API

Resources

Tools

Core Tools

Enhanced Buffer Management

Search and Replace

Advanced Workflow Tools

System Tools

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

Error Handling

The server implements comprehensive error handling with custom error classes and consistent error responses:

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

Configuration

Environment Variables

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.