Skip to content
7 changes: 7 additions & 0 deletions lua/astrocommunity/editing-support/mcphub-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Mcphub.nvim

A powerful Neovim plugin for managing MCP (Model Context Protocol) servers

_Note_: This plugin requires [mcp-hub](https://www.npmjs.com/package/mcp-hub) to be installed. This can be done with `npm`, `bun`, `yarn`, or `pnpm`.

**Repository:** <https://github.com/ravitemer/mcphub.nvim/tree/main>
36 changes: 36 additions & 0 deletions lua/astrocommunity/editing-support/mcphub-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
"ravitemer/mcphub.nvim",
dependencies = {
"nvim-lua/plenary.nvim", -- Required for Job and HTTP requests
},
event = "User AstroFile",
cmd = "MCPHub",
opts = {
port = 3000,
config = vim.fn.expand "~/mcpservers.json",
log = {
level = vim.log.levels.WARN,
to_file = false,
file_path = nil,
prefix = "MCPHub",
},
},
specs = {
{
"yetone/avante.nvim",
optional = true,
opts = {
system_prompt = function()
local hub = require("mcphub").get_hub_instance()
return hub:get_active_servers_prompt()
end,
-- The custom_tools type supports both a list and a function that returns a list. Using a function here prevents requiring mcphub before it's loaded
custom_tools = function()
return {
require("mcphub.extensions.avante").mcp_tool(),
}
end,
},
},
},
}