Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A MCP server to interact with Neovim

README.md

Neovim MCP Server

![codecov](https://codecov.io/gh/linw1995/nvim-mcp) !GitHub Actions Workflow Status

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. Supports both stdio and HTTP server transport modes for different integration scenarios.

Features

  • Multi-Connection Support: Manage multiple concurrent Neovim instances
  • LSP Integration: Complete LSP workflow with code actions, hover, and diagnostics
  • Universal Document Identifier: Work with files by buffer ID, relative path,

or absolute path

  • MCP Resources: Structured diagnostic data via connection-aware URI schemes
  • Multi-Transport Support: Both stdio and HTTP server transport modes
  • Dynamic Tool System ⚠️ (Experimental): User-extensible custom tools
  • Plugin Integration: Automatic setup through Neovim plugin

Installation

Use Cargo install from crates.io

cargo install nvim-mcp

Using Nix

This repository is a flake that exposes the server as its default package and app.

Run it directly, without installing anything:

nix run github:linw1995/nvim-mcp -- --version

Or install it imperatively into your profile:

nix profile install github:linw1995/nvim-mcp

Declarative setup with home-manager

The snippet below installs the Neovim plugin and the server binary, then registers it with Claude Code declaratively. No cargo install build step and no manual claude mcp add:

# flake.nix
inputs.nvim-mcp.url = "github:linw1995/nvim-mcp";
# home-manager module (inputs must be in scope)
{ pkgs, lib, inputs, ... }:
let
  nvim-mcp = inputs.nvim-mcp.packages.${pkgs.system}.default;
in
{
  programs.neovim = {
    enable = true;
    plugins = [
      (pkgs.vimUtils.buildVimPlugin {
        pname = "nvim-mcp";
        version = inputs.nvim-mcp.shortRev or "unstable";
        src = inputs.nvim-mcp;
      })
    ];
    extraLuaConfig = ''require("nvim-mcp").setup({})'';
  };

  # Requires home-manager's programs.claude-code module.
  programs.claude-code = {
    enable = true;
    mcpServers.nvim = {
      type = "stdio";
      command = lib.getExe nvim-mcp;
      args = [ "--connect" "auto" ];
    };
  };
}

This registers the nvim MCP server for every project, so you can skip the manual claude mcp add step below.

Tip: git spawns throwaway Neovim instances to edit commit, merge and rebase messages. If those load your full config they each call setup() and register an extra socket in the same git root. Guard the call so exactly one socket exists per repository:

local transient = false
for _, arg in ipairs(vim.fn.argv()) do
  if arg:match("COMMIT_EDITMSG$") or arg:match("MERGE_MSG$")
    or arg:match("git%-rebase%-todo$") or arg:match("TAG_EDITMSG$") then
    transient = true
  end
end
if not transient then
  require("nvim-mcp").setup({})
end

From Source

git clone https://github.com/linw1995/nvim-mcp.git && cd nvim-mcp
cargo install --path .

Usage Cases Collection

<!-- markdownlint-configure-file { "no-inline-html": false } -->

<video src="https://github.com/user-attachments/assets/6946ee1c-42ac-4313-ae10-ca92a4dd0ab7" style="max-height:640px; min-height: 200px"> </video>

  • LSP Hover Translation (From #85)
  • Diagnostic Analysis and Code Fixes (From #10)
  • Smart Context Retrieval (From #86)
  • And more in Discussions

Quick Start

1. Setup Neovim Integration

With a plugin manager like lazy.nvim:

return {
    "linw1995/nvim-mcp",
    build = "cargo install --path .",
    opts = {},
}

2. Configure claude or other MCP clients

# Auto-connect to current project Neovim instances (recommended)
claude mcp add -s local nvim -- nvim-mcp --log-file . \
  --log-level debug --connect auto

# Analyze diagnostics in current Neovim instance
claude "analyze @nvim:nvim-diagnostics://"

Documentation

For detailed information, see:

and transport modes

and contributing

Development

Basic development setup:

# Enter development shell
nix develop .

# Run tests
cargo test -- --show-output

# Build and run
cargo run -- --connect auto

See Development Guide for complete setup instructions, testing procedures, and contribution guidelines.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Other servers.