Added mcphub

This commit is contained in:
2025-05-01 23:38:24 +02:00
parent 49c6440d2b
commit b7f1d498da
2 changed files with 37 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
"ravitemer/mcphub.nvim",
}, },
config = function() config = function()
require("avante").setup({ require("avante").setup({
@@ -23,6 +24,15 @@ return {
temperature = 0, temperature = 0,
max_tokens = 8192, max_tokens = 8192,
}, },
system_prompt = function()
local hub = require("mcphub").get_hub_instance()
return hub:get_active_servers_prompt()
end,
custom_tools = function()
return {
require("mcphub.extensions.avante").mcp_tool(),
}
end,
}) })
end, end,
} }

View File

@@ -0,0 +1,27 @@
--- @type LazyPluginSpec
return {
"ravitemer/mcphub.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
cmd = "MCPHub",
-- build = "npm install -g mcp-hub@latest",
build = "bundled_build.lua",
init = function()
local mcphublocation = vim.fn.expand("~/.config/mcphub")
if vim.fn.isdirectory(mcphublocation) == 0 then
vim.fn.system("mkdir -p " .. mcphublocation)
end
end,
config = function()
require("mcphub").setup({
extensions = {
avante = {
make_slash_commands = true,
},
},
use_bundled_binary = true,
})
end,
}