How to use MCP servers from Neovim via Avante or CodeCompanion
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 managerAdd 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 AvanteIn 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