AB

arismoko/buddy.nvim

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

22 stars 1 forks 品質 68 トレンド 10MIT

AI-powered MCP server for Neovim - bridge your editor to LLM agents

概要

I wanted AI tooling in Neovim without leaving for another editor. So I built this. buddy.nvim runs an MCP server inside Neovim. Claude, OpenCode, or any MCP client can connect and actually control your editor: read buffers, edit files, run commands, navigate. Not just chat. You write tools in Lua. They work as MCP tools (AI calls them) and as regular Neovim plugins (keymaps, commands, autocmds). Same code, both interfaces. Clone to your Neovim packages directory: buddy.nvim uses transport, compatible with modern MCP clients. The buddy-mcp-proxy automatically discovers running Neovim sessions, forwards auth tokens for you, and supports switching between multiple instances. No port configuration needed. Requires Node.js 20+. Add to ~/.config/opencode/opencode.jsonc: Add to your Claude Desktop config: - : ~/Library/Application Support/Claude/claude_desktop_config.json - : %APPDATA%\Claude\claude_desktop_config.json - : ~/.config/Claude/claude_desktop_config.json

README

以下は原文 README の抜粋です。原文を見る。

buddy.nvim

Lua tools that work as keymaps AND as MCP tools.


I wanted AI tooling in Neovim without leaving for another editor. So I built this.

buddy.nvim runs an MCP server inside Neovim. Claude, OpenCode, or any MCP client can connect and actually control your editor: read buffers, edit files, run commands, navigate. Not just chat.

You write tools in Lua. They work as MCP tools (AI calls them) and as regular Neovim plugins (keymaps, commands, autocmds). Same code, both interfaces.


Installation

lazy.nvim

{
  "arismoko/buddy.nvim",
  dependencies = {
    "nvim-mini/mini.nvim",
    "nvim-neotest/nvim-nio",
  },
  lazy = false,
  config = function()
    require("buddy").setup({
      auto_start = true,
      port = 7234,
    })
  end,
}

packer.nvim

use {
  "arismoko/buddy.nvim",
  requires = {
    "nvim-mini/mini.nvim",
    "nvim-neotest/nvim-nio",
  },
  config = function()
    require("buddy").setup({
      auto_start = true,
      port = 7234,
    })
  end,
}

Manual

Clone to your Neovim packages directory:

git clone https://github.com/arismoko/buddy.nvim ~/.local/share/nvim/site/pack/plugins/start/buddy.nvim

Connecting MCP Clients

buddy.nvim uses HTTP + Server-Sent Events (SSE) transport, compatible with modern MCP clients.

There are two ways to connect:

The buddy-mcp-proxy automatically discovers running Neovim sessions, forwards auth tokens for you, and supports switching between multiple instances. No port configuration needed. Requires Node.js 20+.

npm install -g buddy-mcp-proxy

OpenCode

Add to ~/.config/opencode/opencode.jsonc:

{
  "mcp": {
    "vim": {
      "type": "local",
      "command": ["npx", "buddy-mcp-proxy"]
    }
  }
}

Claude Desktop

Add to your Claude Desktop config:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "vim": {
      "command": "npx",
      "args": ["buddy-mcp-proxy"]
    }
  }
}

Option B: Direct SSE Connection

Connect directly to a specific Neovim instance by URL. Simpler, but you must know the port and can only connect to one session.

GitHub で README 全文を見る

インストール

npx buddy-mcp-proxy
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "vim": { "command": "npx", "args": ["buddy-mcp-proxy"] } } }