● Communauté
ravitemer
⚡ Instantané
mcphub.nvim
par ravitemer · ravitemer/mcphub.nvim
Neovim plugin that turns your editor into a first-class MCP client — marketplace installs, Avante/CodeCompanion integration, OAuth PKCE.
ravitemer/mcphub.nvim integrates MCP servers into Neovim workflows. Discover + install via a verified marketplace, chat through Avante/CodeCompanion/CopilotChat, manage OAuth, hot-reload dev servers. Supports stdio, SSE, and Streamable HTTP.
Pourquoi l'utiliser
Fonctionnalités clés
- Verified marketplace of MCP servers with one-command install
- Full MCP feature support: tools, resources, templates, prompts
- OAuth PKCE + API key auth
- Integration with Avante.nvim, CodeCompanion.nvim, CopilotChat.nvim
- Project-local config merging, JSON5 config syntax
Démo en direct
Aperçu en pratique
mcphub-nvim.replay
▶ prêt
Cas d'usage
Usages concrets : mcphub.nvim
Quand l'utiliser : You live in Neovim and don't want to switch to VS Code for MCP access.
Prérequis
- Neovim 0.10+ — brew install neovim
- Avante.nvim or CodeCompanion.nvim installed — Via your plugin manager (lazy.nvim/packer)
- mcphub.nvim + its Node dependency — See ravitemer.github.io/mcphub.nvim for install snippet
Déroulement
-
Install via plugin manager
Add ravitemer/mcphub.nvim to your lazy.nvim config with opts = { ... }.✓ Copié
→ :MCPHub opens the management UI
-
Install a server from the marketplace
:MCPHub marketplace — search 'github' and install.✓ Copié
→ Server starts, tools registered
-
Use via Avante
In Avante chat, ask a question — Avante picks up MCP tools.✓ Copié
→ Tool calls visible in Avante output
Résultat : MCP tools usable inside your editor, no context switch.
Pièges
- Node not on PATH inside Neovim — Use an absolute path in config or ensure Neovim inherits your shell env
Quand l'utiliser : One project needs postgres MCP, another needs a bespoke internal MCP.
Déroulement
-
Create .mcphub.json5 at project root
Define project-specific servers in .mcphub.json5.✓ Copié
→ Servers auto-load when you open the project
-
Verify merge
:MCPHub status — see which servers are global vs project.✓ Copié
→ Merged view
Résultat : Context-aware tool loadout per project.
Pièges
- Committing secrets in .mcphub.json5 — Use env var references, gitignore the file if it must contain tokens
Quand l'utiliser : You're building a server and want fast iteration.
Déroulement
-
Enable dev mode
Add your server with dev=true in mcphub config.✓ Copié
→ Hot-reload on file save
-
Iterate
Edit server code; mcphub restarts it transparently.✓ Copié
→ Updated tools without Neovim restart
Résultat : Tight dev loop inside Neovim.
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
Use GitHub MCP from Neovim via Avante chat
Install github MCP via marketplace, then ask Avante to show PRs assigned to me.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- None (plugin itself)
- Tokens par appel
- Adds a tools list to Avante/CC prompts
- Monétaire
- Free (MIT)
- Astuce
- Disable unused marketplace servers — each one adds tools to your prompt budget.
Sécurité
Permissions, secrets, portée
Portées minimales : Whatever each installed MCP needs
Stockage des identifiants : Env var references in mcphub config
Sortie de données : Per downstream MCP
Ne jamais accorder : Don't commit .mcphub.json5 with inline secrets
- Marketplace entries are community-submitted — verify publisher before installing.
Dépannage
Erreurs courantes et correctifs
mcphub fails to start Node subprocess
Neovim's PATH may not include Node. Set vim.env.PATH or use absolute path.
Vérifier : :!which node
Avante doesn't see MCP tools
Check Avante adapter version — older versions don't support MCP. Update.
Marketplace shows empty list
Network/firewall blocking marketplace URL. Check :MCPHub logs.
OAuth flow stuck in browser
Copy the URL from :MCPHub logs and paste manually; localhost redirect may not fire from Neovim context.
Alternatives
mcphub.nvim vs autres
| Alternative | Quand l'utiliser | Compromis |
| CodeCompanion.nvim (native) | You want LLM chat without MCP management | No marketplace, no OAuth flows |
| VS Code MCP | You prefer VS Code | Not Neovim |