feat(mcp): add mcps to avante
This commit is contained in:
@@ -3,7 +3,6 @@ return {
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
config = function(_, opts)
|
||||
-- Let the plugin load first
|
||||
require("avante").setup(opts)
|
||||
-- Then remove the default mappings
|
||||
vim.schedule(function()
|
||||
@@ -31,6 +30,16 @@ return {
|
||||
-- max_tokens = 4096,
|
||||
},
|
||||
},
|
||||
system_prompt = function()
|
||||
local hub = require("mcphub").get_hub_instance()
|
||||
return hub and hub:get_active_servers_prompt() or ""
|
||||
end,
|
||||
-- Using function prevents requiring mcphub before it's loaded
|
||||
custom_tools = function()
|
||||
return {
|
||||
require("mcphub.extensions.avante").mcp_tool(),
|
||||
}
|
||||
end,
|
||||
},
|
||||
build = "make",
|
||||
keys = {
|
||||
|
||||
16
nvim/lua/olinpin/plugins/mcphub.lua
Normal file
16
nvim/lua/olinpin/plugins/mcphub.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"ravitemer/mcphub.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
build = "npm install -g mcp-hub@latest", -- Installs `mcp-hub` node binary globally
|
||||
config = function()
|
||||
require("mcphub").setup({
|
||||
extensions = {
|
||||
avante = {
|
||||
make_slash_commands = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user