NE

Neovim

Created 7 months ago

Connect Claude Desktop to Neovim using MCP and the official neovim/node-client JavaScript library.

development documentation public

What is Neovim?

An MCP Server for your Neovim session.

Documentation

Neovim MCP Server

Features

  • Connects to your nvim instance if you expose a socket file.
  • Views your current buffers and manages buffer switching.
  • Gets cursor location, mode, file name, marks, registers, and visual selections.
  • Runs vim commands and optionally shell commands through vim.
  • Can make edits using insert, replace, or replaceAll modes.
  • Search and replace functionality with regex support.
  • Project-wide grep search with quickfix integration.
  • Comprehensive window management.
  • Health monitoring and connection diagnostics.

API# Resources

  • nvim://session: Current neovim text editor session.
  • nvim://buffers: List of all open buffers in the current Neovim session.

Tools

  • vim_buffer: Get buffer contents with line numbers.
  • vim_command: Send a command to VIM for navigation and editing.
  • vim_status: Get comprehensive Neovim status.
  • vim_edit: Edit lines using various modes.
  • vim_window: Manipulate Neovim windows.
  • vim_mark: Set named marks at specific positions.
  • vim_register: Set content of registers.
  • vim_visual: Create visual mode selections.
  • vim_buffer_switch: Switch between buffers.
  • vim_buffer_save: Save current buffer.
  • vim_file_open: Open files into new buffers.
  • vim_search: Search within current buffer.
  • vim_search_replace: Find and replace with advanced options.
  • vim_grep: Project-wide search using vimgrep.
  • vim_macro: Record, stop, and play Vim macros.
  • vim_tab: Complete tab management.
  • vim_fold: Code folding operations.
  • vim_jump: Jump list navigation.
  • vim_health: Check Neovim connection health.

Error Handling

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

Limitations

  • May not interact well with complex neovim configurations or plugins.
  • Shell command execution is disabled by default for security.
  • Socket connection required.

Configuration# Environment Variables

  • ALLOW_SHELL_COMMANDS: Set to 'true' to enable shell command execution.
  • NVIM_SOCKET_PATH: Set to the path of your Neovim socket.

Installation# Option 1: DXT Package (Recommended)

  1. Download the latest .dxt file from Releases.
  2. Drag the file to Claude Desktop.

Option 2: Manual Installation

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.

Server Config

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

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: Yes

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: bigcodegen
Category: community
License: MIT License
Tags:
development documentation public