Skip to content
ravitemer edited this page Apr 1, 2025 · 6 revisions

MCPHub.nvim

A powerful Neovim plugin that integrates MCP (Model Context Protocol) servers into your workflow. Configure and manage MCP servers through a centralized config file while providing an intuitive UI for browsing, installing and testing tools and resources. Perfect for LLM integration, offering both programmatic API access and interactive testing capabilities through the :MCPHub command.

graph TD
subgraph "MCP Servers"
subgraph "Native MCP Servers"
N1["Buffer (Tools)"]
N2["LSP (Resources)"]
end
subgraph "Community"
C1["GitHub (Tools )"]
C2["Figma (Tools)"]
end
end

H[MCPHub]
M["@mcp tool + MCP Servers in text representation"]

subgraph "Chat Plugins"
A["Avante + @mcp tool"]
CC["CodeCompanion + @mcp tool"]
O[Others + @mcp tool]
end

subgraph "LLM Providers"
OAI[OpenAI]
AC[Claude]
M1[Mistral]
G[Grok]
D[DeepSeek]
end

%% MCP Servers provide capabilities
N1 & N2 --> H
C1 & C2 --> H

%% MCPHub transforms capabilities into system prompt
H --> M

%% Tools to plugins
M --> A
M --> CC
M --> O

%% Plugin to LLM connections
A --> OAI & AC
CC --> M1 & G
O --> D
Loading

✨ Features

Simple Command Interface

  • Single command :MCPHub to access all functionality

Integrated Hub View

  • Dynamically enable/disable servers and tools to optimize token usage
  • Start/stop servers with persistent state
  • Enable/disable specific tools per server
  • Configure custom instructions per server
  • State persists across restarts

Native MCP Server Support

  • Create Lua-based MCP servers directly in Neovim
  • Automatically create lua native MCP servers using LLMs with built-in templates
  • Write once, use everywhere design
  • Clean chained API for tools and resources
  • Full URI-based resource system with templates
  • Centralized lifecycle management

Built-in MCP Servers

Neovim Server: Pre-configured with essential development tools

  • File operations (read, write, search, replace)
  • Command execution and terminal integration
  • LSP integration with diagnostics
  • Buffer and environment access
  • Can be disabled if not needed

Chat Plugin Integration

  • Deep integration with popular Neovim chat plugins:
    • Avante.nvim: Full MCP tool support with auto-approval option
    • CodeCompanion.nvim: MCP resources as chat variables
    • Real-time variable updates when servers change
    • Automatic resource syncing across plugins
    • Example: LSP diagnostics as chat variables

Marketplace Integration

  • Browse available MCP servers with details and stats
  • Sort, filter by category, and search servers
  • View server documentation and installation guides
  • One-click installation via Avante/CodeCompanion

Interactive Testing

  • Real-time tool testing interface
  • Resource browsing and access
  • Built-in documentation and help

Performance and Reliability

  • Parallel startup for improved performance
  • Automatic server lifecycle management
  • Smart shutdown handling with configurable delay

Developer-friendly

  • Both sync and async operations supported
  • Clean client registration/cleanup
  • Comprehensive API for tool and resource access

Next Steps