bigcodegen_mcp-neovim-server

bigcodegen_mcp-neovim-server

3.2

If you are the rightful owner of bigcodegen_mcp-neovim-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A proof of concept integration between Claude Desktop and Neovim using Model Context Protocol (MCP) and the official neovim/node-client JavaScript library.

The Neovim MCP Server is a demonstration of integrating Claude Desktop with Neovim through the Model Context Protocol (MCP). This integration utilizes the neovim/node-client JavaScript library to create a lightweight code assistance layer that leverages Vim's native text editing commands and workflows. By connecting to a Neovim instance, the server can view the current buffer, get cursor location, mode, and file name, run Vim commands, and make edits using insert or replacement. This setup allows for a seamless interaction between Claude and Neovim, providing a unique code editing experience. However, as a proof of concept, it comes with limitations such as potential issues with custom Neovim configurations, socket connection handling, and error management. Despite these challenges, the Neovim MCP Server offers a glimpse into the potential of MCP in enhancing code editing workflows.

Features

  • Connects to your nvim instance if you expose `--listen /tmp/nvim` when starting nvim
  • Views your current buffer
  • Gets cursor location, mode, file name
  • Runs vim commands
  • Can make edits using insert or replacement

Tools

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

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

  3. vim_status

    Get the status of the VIM editor. Status contains line, col, mode, filename, and visual selection.

  4. vim_edit

    Edit lines using insert or replace in the VIM editor. Input startLine (number), mode ("insert" | "replace"), lines (string). Insert will insert lines at startLine. Replace will replace lines starting at the startLine to the end of the buffer.