Skip to content

What is MCP HUB?

MCPHub.nvim is a MCP client for neovim that seamlessly integrates MCP (Model Context Protocol) servers into your editing workflow. It provides an intuitive interface for managing, testing, and using MCP servers with your favorite chat plugins.

Image

IMPORTANT

It is recommended to read this page before going through the rest of the documentation.

How does MCP Hub work?

Let's break down how MCP Hub operates in simple terms:

MCP Config File

Like any MCP client, MCP Hub requires a configuration file to define the MCP servers you want to use. This file is typically located at ~/.config/mcphub/servers.json. MCP Hub supports local stdio servers as well as remote streamable-http or sse servers. This is similar to claude_desktop_config.json file for Claude desktop or mcp.json file used by VSCode. In fact you can use the same file for MCP Hub as well with some additional benefits. It looks something like:

js
// Example: ~/.config/mcphub/servers.json
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": [
        "mcp-server-fetch"
      ]
    },
    "remote-server": {
      "url": "https://api.example.com/mcp"
    }
  }
}

Servers Manager

  • When MCP Hub's setup() is called typically when Neovim starts, it launches the nodejs binary, mcp-hub with the servers.json file.
  • The mcp-hub binary reads servers.json file and starts the MCP servers.
  • It provides a express REST API endpoint (default: http://localhost:37373) for clients to interact with MCP servers
  • The plugin communicates with this endpoint to:
    • Start/stop MCP servers
    • Execute tools, resources, prompts etc
    • Handle real-time server events when tools or resources are changed.

Usage

  • Use :MCPHub command to open the interface
  • Adding (<A>), editing (<e>), deleting (<d>) MCP servers in easy and intuitive with MCP Hub. You don't need to edit the servers.json file directly.
  • Install servers from the Marketplace (M)
  • Toggle servers, tools, and resources etc
  • Test tools and resources directly in Neovim

Chat Integrations

  • MCP Hub provides integrations with popular chat plugins like Avante, CodeCompanion, CopilotChat.
  • LLMs can use MCP servers through our @mcp tool.
  • Resources show up as #variables in chat.
  • Prompts become /slash_commands.

Feature Support Matrix

CategoryFeatureSupportDetails
Capabilities
ToolsFull support
🔔 Tool List ChangedReal-time updates
ResourcesFull support
🔔 Resource List ChangedReal-time updates
Resource TemplatesURI templates
PromptsFull support
🔔 Prompts List ChangedReal-time updates
RootsNot supported
SamplingNot supported
MCP Server Transports
Streamable-HTTPPrimary transport protocol for remote servers
SSEFallback transport for remote servers
STDIOFor local servers
Authentication for remote servers
OAuthWith PKCE flow
HeadersFor API keys/tokens
Chat Integration
Avante.nvimTools, resources, resourceTemplates, prompts(as slash_commands)
CodeCompanion.nvimTools, resources, resourceTemplates, prompts (as slash_commands)
CopilotChat.nvimIn-built support Draft
Marketplace
Server DiscoveryBrowse from verified MCP servers
InstallationManual and auto install with AI
Advanced
Smart File-watchingSmart updates with config file watching
Multi-instanceAll neovim instances stay in sync
Shutdown-delayCan run as systemd service with configure delay before stopping the hub
Lua Native MCP ServersWrite once , use everywhere. Can write tools, resources, prompts directly in lua

Next Steps

Released under the MIT License.