Skip to main content
Glama

nvim-mcp

PyPI

実行中のNeovimセッションにAIエージェントが直接アクセスできるようにするMCPサーバーです。Neovimのネイティブなmsgpack-RPCソケット経由で接続するため、プラグインは不要です。

Cursor、Claude Code、Codex、OpenCode、およびMCP互換のあらゆるクライアントで動作します。

エージェントをNeovimに接続する前に、安全な運用についてをお読みください。

エージェントができること

  • 視覚情報の把握 — エディタモード、作業ディレクトリ、開いているバッファ、ウィンドウレイアウト、カーソル位置、フォールド、選択範囲、マーク、診断情報。

  • メモリ上のバッファ編集 — 即時のフィードバックと完全なアンドゥサポートを備えた検索・置換や全文書き換え。保存するまでディスクには一切書き込まれません。

  • あらゆるVimコマンドの実行:w:e:vsplit、マクロなど、コマンドラインで入力できるあらゆる操作。

  • キー入力の送信 — ナビゲーション、挿入モードへの移行、マッピングのトリガー。

  • LSP診断のクエリ — 単一バッファまたはセッション全体にわたるエラー、警告、ヒントの取得。

  • コードへのハイライト注釈 — 特定の行に注意を引くための色付きextmarkの描画。

  • 複数インスタンスの操作 — 実行中のセッションを自動検出し、適切なセッションに接続します。複数インスタンスを参照してください。

Neovimでできることは、エージェントもすべて実行可能です。詳細はツールリファレンス全体を参照してください。

Related MCP server: Vigentic MCP

デモ

クイックスタート

nvim-mcpはuv(推奨)またはNix経由で実行します。

Cursorユーザーの方へ: マーケットプレイスプラグインは現在審査中です。利用可能になり次第、MCPサーバーとエージェントルールが同時にインストールされます(ステップ4までスキップ可能です)。ルールを有効にするには、「Connect to my Neovim instance」のようにチャットを開始するか、Settings → Rulesでルールを「Always」に設定して毎回適用されるようにしてください。

  1. ランチャーをインストールします。

    curl -LsSf https://astral.sh/uv/install.sh | sh

    Nixをインストールします(flakesを有効にする必要があります)。

  2. クライアントにMCPサーバーを登録します。 Cursorの例 (.cursor/mcp.json):

    {
      "mcpServers": {
        "nvim-mcp": {
          "command": "uvx",
          "args": ["nvim-mcp"]
        }
      }
    }
    {
      "mcpServers": {
        "nvim-mcp": {
          "command": "nix",
          "args": ["run", "github:paulburgess1357/nvim-mcp"]
        }
      }
    }

    Claude Code、Codex、Claude Desktop、OpenCode、その他のクライアントについては、設定ガイドを参照してください。

  3. エージェントルールを追加します — この手順をスキップしないでください。 ルールがないと、エージェントはツールを持っていても「いつ、どのように」使うべきかがわからず、動作が不安定になります。設定については設定ガイドを参照してください。

  4. Neovimを起動します — ほとんどのLinuxシステムでは自動的にUnixソケットでリッスンされ、nvim-mcpによって検出されます。自動検出が機能しない場合は、環境変数を参照してください。複数のインスタンスを実行している場合は、複数インスタンスを参照してください。

動作確認

Neovimでファイルを開き、AIエージェントに以下を貼り付けてください:

For each step: explain what you're about to do, then do it, then tell me
what happened. Wait for me to say "next" before moving on.

1. What file am I in? Highlight the function my cursor is in.
2. Are there any diagnostics? Highlight any lines with errors or warnings.
3. Add a docstring above the function, then show me the diff.
4. Open a vertical split, write a short test for that function, and save both files.

安全な運用について

ツールとエージェントルールは非破壊的な操作を行うように設計されています。編集はメモリ上で行われ、アンドゥ履歴は保持され、エージェントはバッファ操作を行うように誘導されます。しかし、LLMは非決定論的であり、NeovimのAPIへの完全なアクセス権を持っているため、誤操作が発生する可能性があることを前提としてください。バージョン管理されたディレクトリで作業を行ってください。

要件

  • Linux

  • Python ≥ 3.10

  • Neovim ≥ 0.11 (古いバージョン--listenNVIM_ADDRESS で動作します)

ライセンス

MIT — LICENSEを参照してください。

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
17hResponse time
3wRelease cycle
5Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that utilizes a headless Neovim instance as an IDE kernel for advanced code editing and navigation. It provides tools for LSP-powered diagnostics, buffer management, and structural edits using Tree-sitter.
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to navigate code using Neovim's LSP and Treesitter features, and read/write the quickfix list.
    14
  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    6
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulburgess1357/nvim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server