add mcphub
This commit is contained in:
@@ -3,21 +3,21 @@
|
||||
"any-jump.vim": { "branch": "master", "commit": "f95674d9a4251ac02f452d5f1861e4422f4652c7" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
|
||||
"cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" },
|
||||
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "9654cb31f10c9eda3e777d03d32b29df606ab0fe" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "d71d8b96c0b1ec8c047fb938552035864d530bb1" },
|
||||
"conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
|
||||
"copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" },
|
||||
"copilot.lua": { "branch": "master", "commit": "c62a2a7616a9789a7676b6b7a8d9263b1082cdc8" },
|
||||
"copilot.lua": { "branch": "master", "commit": "891aee91eaca360b6d709ef3e8e684e764aa5513" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "31f2a2657b6261724313281fe0d8ba6f43f4a4fa" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "fcfa7a989cd6fed10abf02d9880dc76d7a38167d" },
|
||||
"goto-preview": { "branch": "main", "commit": "d1faf6ea992b5bcaaaf2c682e1aba3131a01143e" },
|
||||
"image.nvim": { "branch": "master", "commit": "2e2d28b7734b5efdfc1219f4da8a46c761587bc2" },
|
||||
@@ -27,21 +27,22 @@
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "a92c755f182b89ea91bd8a6a2227208026f27b4d" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" },
|
||||
"mcphub.nvim": { "branch": "main", "commit": "d0e71f8cdc999d6d661818ea20b56eb9d7dcb15d" },
|
||||
"mini.diff": { "branch": "main", "commit": "7e268d0241255abaa07b8aa0ddff028f7315fe21" },
|
||||
"mini.nvim": { "branch": "main", "commit": "b418d585d99bd1c1a4b04dc8b2c585471665173a" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "8d99472fcccffd73d7501e54e9018bab5cb0c4ad" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "1280b7965b6ed17787ffab1d4e3d9795ecdd0f51" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-html-css": { "branch": "main", "commit": "1294109cba1dcc3ca1c0fc4f8e13e46e8951a4fd" },
|
||||
"nvim-lint": { "branch": "master", "commit": "5b1bdf306bd3e565908145279e8bbfc594dac3b3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b6936cb85d1e95b5ff00016b1185ab1a14450579" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "81920264a264144bd075f7f48f0c4356fc2c6236" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "7bbed4b548d9a81c14351bda93d16336edefd067" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "439789a9a8df9639ecd749bb3286b77117024a6f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||
|
||||
@@ -132,6 +132,15 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
tools = {
|
||||
["mcp"] = {
|
||||
-- Prevent mcphub from loading before needed
|
||||
callback = function()
|
||||
return require("mcphub.extensions.codecompanion")
|
||||
end,
|
||||
description = "Call tools and resources from the MCP Servers",
|
||||
},
|
||||
},
|
||||
},
|
||||
inline = {
|
||||
-- adapter = "copilot",
|
||||
|
||||
@@ -20,6 +20,7 @@ return {
|
||||
lualine_x = {
|
||||
{
|
||||
"seachcount",
|
||||
{ require("mcphub.extensions.lualine") },
|
||||
"copilot",
|
||||
symbols = {
|
||||
status = {
|
||||
|
||||
51
lua/plugins/mcphub.lua
Normal file
51
lua/plugins/mcphub.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
return {
|
||||
"ravitemer/mcphub.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
cmd = "MCPHub",
|
||||
build = "bundled_build.lua", -- Bundles mcp-hub locally
|
||||
config = function()
|
||||
vim.notify = require("notify")
|
||||
require("mcphub").setup({
|
||||
use_bundled_binary = true, -- Use local binary
|
||||
port = 37373, -- Port for MCP Hub Express API
|
||||
config = vim.fn.expand("~/.config/mcphub/servers.json"), -- Config file path
|
||||
native_servers = {}, -- add your native servers here
|
||||
auto_approve = true,
|
||||
extensions = {
|
||||
avante = {},
|
||||
codecompanion = {
|
||||
show_result_in_chat = true, -- Show tool results in chat
|
||||
make_vars = true, -- Create chat variables from resources
|
||||
make_slash_commands = true, -- make /slash_commands from MCP server prompts
|
||||
},
|
||||
},
|
||||
|
||||
-- UI configuration
|
||||
ui = {
|
||||
window = {
|
||||
width = 0.8, -- Window width (0-1 ratio)
|
||||
height = 0.8, -- Window height (0-1 ratio)
|
||||
border = "rounded", -- Window border style
|
||||
relative = "editor", -- Window positioning
|
||||
zindex = 50, -- Window stack order
|
||||
},
|
||||
},
|
||||
|
||||
-- Event callbacks
|
||||
on_ready = function(hub) end, -- Called when hub is ready
|
||||
on_error = function(err)
|
||||
vim.notify(err, "ERROR")
|
||||
end, -- Called on errors
|
||||
|
||||
-- Logging configuration
|
||||
log = {
|
||||
level = vim.log.levels.WARN, -- Minimum log level
|
||||
to_file = false, -- Enable file logging
|
||||
file_path = nil, -- Custom log file path
|
||||
prefix = "MCPHub", -- Log message prefix
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user