# mcphub.nvim — Neovim MCP Client & UI > Neovim MCP client that runs servers via mcp-hub and exposes an interactive `:MCPHub` UI so chat plugins can browse, test, and call tools. ## Install Save in your project root: ## Quick Use 1. Add to Lazy.nvim (requires Neovim >= 0.8 and Node.js >= 18): ```lua { "ravitemer/mcphub.nvim", dependencies = { "nvim-lua/plenary.nvim", }, build = "npm install -g mcp-hub@latest", config = function() require("mcphub").setup() end } ``` 2. Restart Neovim and open the UI: - Run `:MCPHub` ## Intro Neovim MCP client that runs servers via mcp-hub and exposes an interactive `:MCPHub` UI so chat plugins can browse, test, and call tools. - **Best for:** Neovim users who want MCP servers inside the editor, with a UI to test tools and wire them into chat plugins - **Works with:** Neovim, Node.js, mcp-hub; integrates with popular Neovim chat plugins - **Setup time:** 15–30 minutes ## Practical Notes - Quant: baseline your setup with 1 server and 3 tool calls; aim for <2 minutes from `:MCPHub` open to first successful tool run. - Quant: keep versions explicit: Neovim >= 0.8 and Node.js >= 18 are hard requirements—record them in your dotfiles. --- ## How to make MCP in-editor feel “native” A practical pattern is to keep three layers separate: 1. **Server definition** (what runs, with what env) 2. **UI discovery/testing** (`:MCPHub` as a tool console) 3. **Chat integration** (only wire the few tools you actually use) ## Debugging checklist - Confirm Node.js and Neovim versions first. - Ensure `mcp-hub` is installed and on PATH (the Lazy build step can do this). - Start with one small server/tool, then expand. ## Team workflow tip Store your MCP server config in version control and treat it like infra: reviews, changelog notes, and rollback steps. ### FAQ **Q: Do I need to install mcp-hub separately?** A: The recommended Lazy.nvim setup installs `mcp-hub` via the build step. **Q: Should I expose every tool to my chat plugin?** A: No. Start with 1–3 tools you actually use and expand deliberately. **Q: What breaks most often?** A: Version drift (Neovim/Node) and PATH issues for the mcp-hub binary. ## Source & Thanks > Source: https://github.com/ravitemer/mcphub.nvim > License: MIT > GitHub stars: 1,766 · forks: 83 --- ## 快速使用 1. 通过 Lazy.nvim 安装(需要 Neovim >= 0.8、Node.js >= 18): ```lua { "ravitemer/mcphub.nvim", dependencies = { "nvim-lua/plenary.nvim", }, build = "npm install -g mcp-hub@latest", config = function() require("mcphub").setup() end } ``` 2. 重启 Neovim 打开 UI: - 执行 `:MCPHub` ## 简介 Neovim 的 MCP 客户端:通过 mcp-hub 管理 servers,并提供交互式 `:MCPHub` UI,让聊天插件可以浏览、测试并调用 tools/prompts,把编辑器变成工具面板。 - **适合谁:** 想在 Neovim 里管理并测试 MCP servers、并与聊天插件联动的用户 - **可搭配:** Neovim、Node.js、mcp-hub;可与常见 Neovim 聊天插件集成 - **准备时间:** 15–30 分钟 ## 实战建议 - 量化建议:先只接入 1 个 server + 3 次 tool 调用,把从打开 `:MCPHub` 到首次成功调用的耗时压到 <2 分钟。 - 量化建议:严格记录版本门槛(Neovim >= 0.8、Node.js >= 18),避免环境漂移导致的“偶发不可用”。 ## 让编辑器里的 MCP 更像“原生功能” 建议把三层分开管理,复杂度会明显下降: 1. **Server 定义**(跑什么、环境变量是什么) 2. **UI 发现/测试**(把 `:MCPHub` 当作工具控制台) 3. **聊天插件集成**(只接入你真正要用的少数 tools) ## 排障清单 - 先确认 Node.js 与 Neovim 版本。 - 确认 `mcp-hub` 已安装且在 PATH 里(Lazy 的 build 步可完成)。 - 从一个最小 server/tool 起步,跑通再扩展。 ## 团队化建议 把 MCP server 配置纳入版本管理:走 code review、写变更记录、准备回滚方案。 ### FAQ **必须单独装 mcp-hub 吗?** 答:推荐的 Lazy.nvim 配置会在 build 步中安装 `mcp-hub`。 **要把所有工具都接到聊天插件里吗?** 答:不要。先从 1–3 个最常用工具开始,再有意识地扩展。 **最常见的故障点是什么?** 答:版本漂移(Neovim/Node)与 mcp-hub 在 PATH 中不可用。 ## 来源与感谢 > Source: https://github.com/ravitemer/mcphub.nvim > License: MIT > GitHub stars: 1,766 · forks: 83 --- Source: https://tokrepo.com/en/workflows/mcphub-nvim-neovim-mcp-client-ui Author: MCP Hub