nvim-mcp
nvim-mcp
実行中の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」に設定して毎回適用されるようにしてください。
ランチャーをインストールします。
curl -LsSf https://astral.sh/uv/install.sh | shNixをインストールします(flakesを有効にする必要があります)。
クライアントに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、その他のクライアントについては、設定ガイドを参照してください。
エージェントルールを追加します — この手順をスキップしないでください。 ルールがないと、エージェントはツールを持っていても「いつ、どのように」使うべきかがわからず、動作が不安定になります。設定については設定ガイドを参照してください。
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 (古いバージョンは
--listenとNVIM_ADDRESSで動作します)
ライセンス
MIT — LICENSEを参照してください。
Maintenance
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
- AlicenseBqualityBmaintenanceLeverages Vim's native text editing commands and workflows, which Claude already understands, to create a lightweight code assistance layer.1959319MIT
- FlicenseNot gradedqualityDmaintenanceA 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.
- FlicenseAqualityDmaintenanceEnables AI agents to navigate code using Neovim's LSP and Treesitter features, and read/write the quickfix list.14
- AlicenseNot gradedqualityDmaintenanceA 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.6Apache 2.0
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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