How to use MCP servers from Neovim via Avante or CodeCompanion
Wann einsetzen: You live in Neovim and don't want to switch to VS Code for MCP access.
Voraussetzungen
- 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
Ablauf
-
Install via plugin managerAdd ravitemer/mcphub.nvim to your lazy.nvim config with opts = { ... }.✓ Kopiert→ :MCPHub opens the management UI
-
Install a server from the marketplace:MCPHub marketplace — search 'github' and install.✓ Kopiert→ Server starts, tools registered
-
Use via AvanteIn Avante chat, ask a question — Avante picks up MCP tools.✓ Kopiert→ Tool calls visible in Avante output
Ergebnis: MCP tools usable inside your editor, no context switch.
Fallstricke
- Node not on PATH inside Neovim — Use an absolute path in config or ensure Neovim inherits your shell env