Get the FREE Ultimate OpenClaw Setup Guide →

nvim

A Model Context Protocol (MCP) server that provides seamless integration with Neovim instances, enabling AI assistants to interact with your editor through connections and access diagnostic information via structured resources.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio linw1995-nvim-mcp cargo run --bin nvim-mcp

How to use

This MCP server provides a Neovim integration layer for AI assistants to interact with running Neovim instances. It supports multiple simultaneous connections, integrates with the Language Server Protocol (LSP) workflow for actions like hover, code actions, and diagnostics, and exposes resources that identify documents via buffer IDs, relative paths, or absolute paths. The server can operate over multiple transport modes, including stdio and an HTTP server mode, enabling flexible integration scenarios with clients such as Claude or other MCP clients. With the experimental dynamic tool system, you can extend capabilities by adding new tools that operate across connected Neovim sessions.

To use it, run the MCP server binary and connect your MCP client to it. The README describes a quick start where the server is built and installed via Cargo, and clients can auto-connect to the current project Neovim instance. For typical usage, configure your MCP client to connect to the running server (for example, using an auto-connect workflow) and then issue commands to analyze diagnostics, retrieve code actions, or perform hover translations. The tools and resources supplied by the server enable you to request diagnostic analysis, fetch structured diagnostic resources, and perform actions within the Neovim context through the MCP interface.

How to install

Prerequisites:

  • Rust and Cargo installed on your system
  • Git installed
  • Neovim installed

Installation steps (from source):

  1. Clone the repository: git clone https://github.com/linw1995/nvim-mcp.git && cd nvim-mcp

  2. Build and install the MCP server binary: cargo install --path .

  3. Run the server: nvim-mcp

Alternative install (build from source without installing to Cargo registry):

  1. Build the binary directly: cargo build --release
  2. Run the compiled binary from target/release (or use cargo run --bin nvim-mcp during development): ./target/release/nvim-mcp

Notes:

  • The README also shows a Nix-based installation method for environments using Nix: nix profile install github:linw1995/nvim-mcp#nvim-mcp
  • If you prefer to install via Cargo in a development workflow, you can use cargo install --path . as shown above.

Additional notes

Tips and common issues:

  • Ensure Rust/Cargo are properly installed and available in your PATH before attempting to build.
  • If you plan to run multiple Neovim instances, use the multi-connection support by starting separate Neovim processes and connecting them to the MCP server as needed.
  • The Quick Start section in the README demonstrates configuring the Claude MCP client for auto-connection to the current project and analyzing diagnostics; this server exposes similar tools and resources for advanced workflows.
  • For transport modes, the MCP server supports both stdio and HTTP-based transport; choose the transport that best fits your integration scenario. If using HTTP transport, ensure appropriate network bindings and security considerations are in place.
  • When developing or debugging, you can build in release mode for performance and run tests (cargo test) as described in the Development section of the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers