Neovim

Developer tools

Control Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library.

Your AI app calls the Neovim MCP server, which does the work through tools like vim_buffer, vim_command, vim_status and vim_edit and sends the result back to the chat.

About Neovim

Neovim is a community MCP server from bigcodegen, filed in our directory under developer tools. Control Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library.

The README for Neovim lists tools such as vim_buffer, vim_command, vim_status and vim_edit, which your AI app can call once the server is connected.

At a glance

Publisher
bigcodegen (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
325

Tools Neovim gives your AI app

  • vim_buffer
  • vim_command
  • vim_status
  • vim_edit
  • vim_window
  • vim_mark
  • vim_register
  • vim_visual
  • vim_macro
  • vim_tab
  • vim_fold
  • vim_jump
  • vim_health

Tool names as the Neovim README lists them. Your AI app shows the live list once Neovim is connected.

How to set up Neovim

  1. Follow the install steps in the Neovim README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Neovim README for keys or settings; the registry lists none that Neovim requires.
  3. Add Neovim to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Neovim tools to confirm the connection.
  5. Run one read-only task with Neovim first, such as a call to vim_buffer, before you allow anything that writes or sends.

Neovim compared with similar servers

  • Bld by rife2 has fewer GitHub stars than Neovim (324 against 325); both are community servers, and both run locally.
  • Wx Mp by WhiteNightShadow has more GitHub stars than Neovim (328 against 325); both are community servers, and both run locally.
  • Codex Bridge by Fanch-hui has fewer GitHub stars than Neovim (324 against 325); both are community servers, and both run locally.

Before you connect Neovim

  • Give Neovim its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Neovim tool call until you trust what it does with them.
  • Treat text that Neovim fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Neovim on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Neovim

How marketing and sales teams put Neovim to work, by company size. Pick the size closest to yours and start Neovim on one use case.

Small business

  • A small business with a developer can use Neovim to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Neovim to explain and fix a marketing site issue without context switching between tools.
  • Neovim runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Neovim to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Neovim to keep scripts and automations documented and versioned as they change.
  • Start with vim_buffer and vim_command, the tools Neovim lists first, and add more once the team trusts the results.

Enterprise

  • Enterprise engineering teams can roll out Neovim with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Neovim so web and marketing engineering share one reviewed way of working with AI.
  • Neovim is a community server, so have security review the code and pin a version before Neovim touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Neovim README

From bigcodegen/mcp-neovim-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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.

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
  • 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 with metadata including modified status, syntax, and window IDs
Tools
Core Tools
  • vim_buffer
    • Get buffer contents with line numbers (supports filename parameter)
    • Input filename (string, optional) - Get specific buffer by filename
    • Returns numbered lines with buffer content
  • vim_command
    • Send a command to VIM for navigation, spot editing, and line deletion
    • Input command (string)
    • Runs vim commands with nvim.replaceTermcodes. Multiple commands work with newlines
    • Shell commands supported with ! prefix when ALLOW_SHELL_COMMANDS=true
    • On error, 'nvim:errmsg' contents are returned
  • vim_status
    • Get comprehensive Neovim status
    • Returns cursor position, mode, filename, visual selection with enhanced detection, window layout, current tab, marks, registers, working directory, LSP client info, and plugin detection
    • Enhanced visual selection reporting: detects visual mode type (character/line/block), provides accurate selection text, start/end positions, and last visual selection marks
  • vim_edit
    • Edit lines using insert, replace, or replaceAll modes
    • Input startLine (number), mode ("insert" | "replace" | "replaceAll"), lines (string)
    • insert: insert lines at startLine
    • replace: replace lines starting at startLine
    • replaceAll: replace entire buffer contents
  • vim_window
    • Manipulate Neovim windows (split, vsplit, close, navigate)
    • Input command (string: "split", "vsplit", "only", "close", "wincmd h/j/k/l")
  • vim_mark
    • Set named marks at specific positions
    • Input mark (string: a-z), line (number), column (number)
  • vim_register
    • Set content of registers
    • Input register (string: a-z or "), content (string)
  • vim_visual
    • Create visual mode selections
    • Input startLine (number), startColumn (number), endLine (number), endColumn (number)
Enhanced Buffer Management
  • vim_buffer_switch
    • Switch between buffers by name or number
    • Input identifier (string | number) - Buffer name or number
  • vim_buffer_save
    • Save current buffer or save to specific filename
    • Input filename (string, optional) - Save to specific file
  • vim_file_open
    • Open files into new buffers
    • Input filename (string) - File to open
Search and Replace
  • vim_search
    • Search within current buffer with regex support
    • Input pattern (string), ignoreCase (boolean, optional), wholeWord (boolean, optional)
  • vim_search_replace
    • Find and replace with advanced options
    • Input pattern (string), replacement (string), global (boolean, optional), ignoreCase (boolean, optional), confirm (boolean, optional)
  • vim_grep
    • Project-wide search using vimgrep with quickfix list
    • Input pattern (string), filePattern (string, optional) - File pattern to search
Advanced Workflow Tools
  • vim_macro
    • Record, stop, and play Vim macros
    • Input action ("record" | "stop" | "play"), register (string, a-z), count (number, optional)
  • vim_tab
    • Complete tab management
    • Input action ("new" | "close" | "next" | "prev" | "first" | "last" | "list"), filename (string, optional)
  • vim_fold
    • Code folding operations
    • Input action ("create" | "open" | "close" | "toggle" | "openall" | "closeall" | "delete"), startLine/endLine (numbers, for create)
  • vim_jump
    • Jump list navigation
    • Input direction ("back" | "forward" | "list")
System Tools
  • vim_health
    • Check Neovim connection health and socket status

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.

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. 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.

Questions about Neovim

What is the Neovim MCP server?

Control Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library. Neovim is maintained by bigcodegen on GitHub at bigcodegen/mcp-neovim-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Neovim MCP server?

Neovim doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (bigcodegen/mcp-neovim-server). Like most servers, Neovim ends with a command or URL you paste into your AI app's MCP config.

Does Neovim need an API key?

The registry lists no required keys for Neovim. Check the Neovim README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Neovim an official MCP server?

No. Neovim is a community server maintained by bigcodegen. Community servers can be excellent; read the code and the open issues before you give Neovim access to company data.

What license is Neovim under?

Neovim is released under the MIT license, according to its GitHub repository. The license covers the code of Neovim; the service it connects to has its own terms.