Skip to main content

MCP server for AI-assisted control of Neovim via msgpack-RPC

Project description

nvim-mcp

PyPI

nvim-mcp is an MCP server that lets AI assistants (Cursor, Claude, and others) control a running Neovim session: open buffers, move the cursor, run LSP actions, inspect layout, and more. It talks to Neovim directly over its default Unix socket using msgpack-RPC, discovers instances automatically, and exposes four tools.

Platforms: Linux and macOS only.

Install

uv tool install nvim-mcp

Or run without installing:

uvx nvim-mcp

Quick start

  1. Start Neovim (it listens on an RPC socket by default).
  2. Set up your MCP client and agent rules — see config/ for everything you need.
  3. The assistant can now control Neovim through 4 tools.

Tools

Tool Purpose
nvim_send The universal interface. Send any ex command, Vimscript expression, or key sequence to Neovim. Three modes: command, eval, keys.
nvim_state Structured snapshot: current file, cursor position, mode, window layout, modified buffers, cwd, and more.
nvim_connect Connect to a Neovim instance. Auto-connects when only one exists; lists all when multiple are found.
nvim_recipes Browse operation recipes by category (files, navigation, buffers, windows, marks, registers, folds, LSP).

Multi-instance

One Neovim instance running? Tools auto-connect. Multiple? nvim_connect lists them — pick by index, socket_path, or terminal_pid. Set NVIM_SOCKET_PATH to skip discovery entirely.

Setup

See config/ for MCP client registration (Cursor, Claude Desktop, Claude CLI) and example agent rule files.

Requirements

  • Python ≥ 3.10
  • Linux or macOS
  • Neovim with RPC socket enabled (default)

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvim_mcp-0.2.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvim_mcp-0.2.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file nvim_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: nvim_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nvim_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a3d324b7554cb7f7d2c7f196759eb04fa297dd862b7057ddff97bd1eb94e4795
MD5 882b93b8409b47a9ab0f4001dff2c92d
BLAKE2b-256 cfde1429fbfe19eff94cab0c40f5c265db38a142ba1ac77a46aa3bb2671510e5

See more details on using hashes here.

File details

Details for the file nvim_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nvim_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nvim_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 858e9431f9d5cae0d5c008e087afdbbd5ee95810b35cf0c402cbe67d6ad71026
MD5 353bd1a56129199c949d713a83d9309b
BLAKE2b-256 bb1cd43e07b11364b31470582b2b52a8c83f5649c50515ec0a7b2d1b93034243

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page