MCPHub Neovim

v1.0.0Developer Toolsstable

An MCP client for Neovim that seamlessly integrates MCP servers into your editing workflow with an intuitive interface for managing, testing, and using MCP servers with your favorite chat plugins.

avantechatgptchatpluginclaude-aicodecompanion
Share:
1,766
Stars
0
Downloads
0
Weekly
0/5

What is MCPHub Neovim?

MCPHub Neovim is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp client for neovim that seamlessly integrates mcp servers into your editing workflow with an intuitive interface for managing, testing, and using mcp servers with your favorite chat plugins.

An MCP client for Neovim that seamlessly integrates MCP servers into your editing workflow with an intuitive interface for managing, testing, and using MCP servers with your favorite chat plugins.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP client for Neovim that seamlessly integrates MCP serv

Use Cases

MCP client for Neovim editor integration
Manage and test MCP servers with chat plugins
ravitemer

Maintainer

LicenseMIT
Languagelua
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcphub-nvim

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCPHub Neovim

MCPHub.nvim is a Lua-native MCP client plugin for Neovim that manages, tests, and uses MCP servers directly inside the editor, integrating with popular chat plugins like Avante.nvim, CodeCompanion.nvim, and CopilotChat.nvim. It supports all three MCP transports (stdio, SSE, and Streamable HTTP), handles OAuth with PKCE authentication, and exposes MCP resources as Neovim variables and MCP prompts as slash commands. Neovim users who rely on AI-assisted coding workflows use MCPHub.nvim to bring the full power of the MCP ecosystem into their existing editor configuration without switching to a separate host application.

Prerequisites

  • Neovim 0.9+ with Lua plugin support
  • A Neovim plugin manager such as lazy.nvim, packer.nvim, or rocks.nvim
  • Node.js 18+ for stdio-based MCP servers that use npx
  • At least one chat plugin installed: Avante.nvim, CodeCompanion.nvim, or CopilotChat.nvim
  • An MCP server to connect to (local or remote)
1

Install MCPHub.nvim with your plugin manager

Add MCPHub.nvim to your Neovim plugin manager configuration. The example below uses lazy.nvim.

-- In your lazy.nvim plugins table:
{
  "ravitemer/mcphub.nvim",
  dependencies = { "nvim-lua/plenary.nvim" },
  config = function()
    require("mcphub").setup()
  end,
}
2

Create a global MCP server configuration file

MCPHub reads server definitions from a JSON configuration file. Create ~/.config/mcphub/servers.json with your MCP server entries. The plugin supports environment variable expansion using the ${ENV_VAR} syntax and JSON5 (comments and trailing commas allowed).

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${HOME}/projects"]
    }
  }
}
3

Configure MCPHub setup options in Neovim

Customize the setup call with the path to your config file, auto-start behavior, and any UI preferences.

require("mcphub").setup({
  config = vim.fn.expand("~/.config/mcphub/servers.json"),
  auto_start = true,
})
4

Open the MCPHub UI and browse servers

Run :MCPHub in Neovim to open the interactive server management interface. From here you can start/stop servers, browse available tools and resources, and run test calls to verify connectivity.

:MCPHub
5

Integrate with a chat plugin

Configure your chat plugin (e.g., CodeCompanion or Avante) to use MCPHub as the MCP provider. Each plugin has its own setup—refer to the MCPHub documentation at ravitemer.github.io/mcphub.nvim for plugin-specific snippets.

6

Use project-local MCP config files

MCPHub automatically detects a .mcphub.json or .vscode/mcp.json file in the project root and merges it with the global config, allowing per-project MCP server customization without modifying the global file.

MCPHub Neovim Examples

MCPHub server configuration (servers.json)

A complete servers.json example showing two MCP servers with environment variable expansion.

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}

Prompts to try

With MCPHub connected to your chat plugin inside Neovim, try these prompts in your AI chat buffer.

- "List my open GitHub pull requests and show the diff for the most recent one"
- "Fetch the documentation at https://neovim.io/doc/ and summarize the key API changes"
- "Read the current file and suggest refactoring improvements"
- "Search my project for all TODO comments and prioritize them by file"

Troubleshooting MCPHub Neovim

MCPHub shows servers as 'disconnected' after startup

Verify the server command works outside Neovim by running it in a terminal. Ensure Node.js and npx are on the PATH that Neovim sees (check :echo $PATH). Restart with :MCPHub and check the error messages in the UI.

MCP tools do not appear in the chat plugin

Ensure you have followed the chat plugin integration steps in the MCPHub docs (ravitemer.github.io/mcphub.nvim). Each plugin (Avante, CodeCompanion, CopilotChat) requires a specific configuration block to register MCPHub as the tool provider.

Project-local config file is not being detected

Make sure the file is named .mcphub.json and placed at the git repo root, or uses the VS Code-compatible path .vscode/mcp.json. MCPHub detects the project root via the presence of a .git directory.

Frequently Asked Questions about MCPHub Neovim

What is MCPHub Neovim?

MCPHub Neovim is a Model Context Protocol (MCP) server that mcp client for neovim that seamlessly integrates mcp servers into your editing workflow with an intuitive interface for managing, testing, and using mcp servers with your favorite chat plugins. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCPHub Neovim?

Follow the installation instructions on the MCPHub Neovim GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCPHub Neovim?

MCPHub Neovim works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCPHub Neovim free to use?

Yes, MCPHub Neovim is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcphub-nvim": { "command": "npx", "args": ["-y", "mcphub-nvim"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCPHub Neovim?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides