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