nvim-mcp-server

nvim-mcp-server

A Model Context Protocol server for Neovim that provides LSP-based symbol tools, enabling AI language models to perform code analysis and manipulation such as symbol lookup, renaming, and body replacement via Neovim's built-in LSP.

Category
Visit Server

README

MseeP.ai Security Assessment Badge

Neovim MCP Server

A Model Context Protocol (MCP) server for Neovim that provides LSP-based symbol tools. This server enables AI language models to interact with Neovim's Language Server Protocol (LSP) for symbol-level code operations.

Features

Symbol Tools (LSP-based)

  • get_symbols_overview(relative_path, depth) - Get overview of top-level symbols in a file. Use depth to include children (e.g., methods of a class).
  • find_symbol(name_path_pattern, relative_path, depth) - Find symbols by name path pattern (e.g., "MyClass/my_method").
  • find_referencing_symbols(name_path, relative_path) - Find all references to a symbol.
  • replace_symbol_body(name_path, relative_path, body) - Replace the body of a symbol definition.
  • insert_after_symbol(name_path, relative_path, body) - Insert content after a symbol's definition.
  • insert_before_symbol(name_path, relative_path, body) - Insert content before a symbol's definition.
  • rename_symbol(name_path, relative_path, new_name) - Rename a symbol throughout the codebase.
  • restart_language_server() - Restart the LSP server (useful when LSP hangs).
  • get_lsp_client_info() - Get information about active LSP clients.

General Tools

  • execute_lua(code) - Execute Lua code in Neovim
  • execute_vimscript(code) - Execute Vimscript code in Neovim

Installation

Prerequisites

  • Python 3.11+
  • uv package manager
  • Neovim 0.9+ with built-in LSP client

Install from source

git clone https://github.com/brianhuster/nvim-mcp-server.git
cd nvim-mcp-server
uv sync

Add to your Neovim configuration

Add the plugin directory to your Neovim runtime path:

-- In your init.lua or plugins.lua
vim.opt.runtimepath:append("/path/to/nvim-mcp-server/plugin")

Usage

Start Neovim with the MCP server

  1. Start Neovim with a socket:

    nvim --listen /tmp/nvim.sock
    
  2. Set the NVIM environment variable and run the MCP server:

    export NVIM=/tmp/nvim.sock
    uv run nvim-mcp
    

Configuration with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "nvim": {
      "command": "uv",
      "args": ["run", "nvim-mcp"],
      "env": {
        "NVIM": "/tmp/nvim.sock"
      }
    }
  }
}

Use with Goose

extensions:
  nvim-mcp:
    cmd: uv
    args: ["run", "nvim-mcp"]
    env:
      NVIM: "/tmp/nvim.sock"
    type: stdio

Development

Commands

  • uv run nvim-mcp - Start the MCP server
  • uv run nvim-mcp --version - Show version
  • uv run ruff check - Run linting
  • uv run mypy - Run type checking

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured