MCP Catalogs
首页

mcp-neovim-server

by bigcodegen·312·综合分 47

MCP 服务器,提供 19 个工具控制 Neovim,支持编辑、导航、缓冲区管理和工作流自动化。

developer-toolsproductivityai-llm
24
Forks
9
活跃 Issue
7 个月前
最近提交
2 天前
收录于

概述

这个 MCP 服务器使 Claude 等 AI 模型能够通过丰富的工具集与 Neovim 交互。它通过套接字文件提供对缓冲区、窗口、搜索操作和 Vim 命令的全面控制,同时保持轻量级连接。服务器提供基本操作如缓冲区编辑和高级功能,如宏录制、标签管理和带有快速修复集成的全局搜索。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:在 Neovim 中进行 AI 辅助编程,直接操作缓冲区和编辑代码
:通过 Neovim 命令自动化文本处理和文件管理
:组合多个 Vim 操作的复杂开发工作流自动化
:如何启用 shell 命令执行?
:系统要求是什么?

什么时候选它

如果您已经在使用 Neovim 并希望在文本编辑器环境中直接获得 AI 辅助,请选择此 MCP server。

什么时候不要选它

如果您使用其他文本编辑器(VS Code、Emacs 等)或需要可能与 MCP server 冲突的复杂 Neovim 插件集成,请不要选择它。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • vim_bufferfilename (string, optional)

    Get buffer contents with line numbers (supports filename parameter)

  • vim_commandcommand (string)

    Send a command to VIM for navigation, spot editing, and line deletion

  • vim_status

    Get comprehensive Neovim status including cursor position, mode, and more

  • vim_editstartLine (number), mode ("insert" | "replace" | "replaceAll"), lines (string)

    Edit lines using insert, replace, or replaceAll modes

  • vim_windowcommand (string: "split", "vsplit", "only", "close", "wincmd h/j/k/l")

    Manipulate Neovim windows (split, vsplit, close, navigate)

  • vim_searchpattern (string), ignoreCase (boolean, optional), wholeWord (boolean, optional)

    Search within current buffer with regex support

  • vim_search_replacepattern (string), replacement (string), global (boolean, optional), ignoreCase (boolean, optional), confirm (boolean, optional)

    Find and replace with advanced options

  • vim_greppattern (string), filePattern (string, optional)

    Project-wide search using vimgrep with quickfix list

  • vim_macroaction ("record" | "stop" | "play"), register (string, a-z), count (number, optional)

    Record, stop, and play Vim macros

  • vim_tabaction ("new" | "close" | "next" | "prev" | "first" | "last" | "list"), filename (string, optional)

    Complete tab management

  • vim_foldaction ("create" | "open" | "close" | "toggle" | "openall" | "closeall" | "delete"), startLine/endLine (numbers, for create)

    Code folding operations

  • vim_health

    Check Neovim connection health and socket status

可对比工具

vim-mcpneovim-clienteditor-tool

安装

安装选项

选项 1:DXT 包(推荐)
  1. 从 [发布页面](https://github.com/bigcodegen/mcp-neovim-server/releases) 下载最新的 .dxt 文件
  2. 将文件拖到 Claude Desktop
选项 2:手动安装

将以下内容添加到您的 claude_desktop_config.json 文件中:

{
  "mcpServers": {
    "MCP Neovim Server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-neovim-server"
      ],
      "env": {
        "ALLOW_SHELL_COMMANDS": "true",
        "NVIM_SOCKET_PATH": "/tmp/nvim"
      }
    }
  }
}

FAQ

如何启用 shell 命令执行?
在配置中设置环境变量 ALLOW_SHELL_COMMANDS 为 'true'。出于安全考虑,默认情况下这是禁用的。
系统要求是什么?
您需要安装支持套接字的 Neovim、用于 MCP 服务器的 Node.js,以及 Claude Desktop 等 Model Context Protocol 客户端。该服务器基于套接字连接工作,不适用于标准 vim。

Hacker News 讨论

开发者社区最近的相关讨论。

mcp-neovim-server 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。