Breaking Changes
In view of v15 release of codecompanion, we have made some breaking changes to the mcphub.nvim plugin.
- Now mcphub provides
@mcp
as both an xml tool (when usinghas-xml-tools
branch of codecompanion) as well as a function tool (withmain
branch of codecompanion) automatically based on the codecompanion branch.
- 🚨 You need to remove the old mcp tool entry from codecompanion.config.strategies.chat.tools
require("codecompanion").setup({
-- other codecompanion config
strategies = {
chat = {
tools = {
-- Remove old mcp tool which will be auto added as a tool group with two individual tools.
-- ["mcp"] = {
-- callback = function()
-- return require("mcphub.extensions.codecompanion")
-- end,
-- description = "Call tools and resources from MCP Servers",
-- },
},
},
},
})
- codecompanion extension is now more streamlined in one place using the codecompanoin's extensions api.
require("codecompanion").setup({
--other config
extensions = {
mcphub = {
callback = "mcphub.extensions.codecompanion",
opts = {
make_vars = true,
make_slash_commands = true,
show_result_in_chat = true,
},
},
},
})
- The
@mcp
tool is split into two separate toolsuse_mcp_tool
andaccess_mcp_resource
- mcphub.config.extensions.codecompanion is deprecated as the options are now declared at codecompanion extension itself.