Repository navigation
Expand file tree
/
Copy pathmcphub.lua
More file actions
57 lines (52 loc) · 1.78 KB
/
Copy pathmcphub.lua
File metadata and controls
57 lines (52 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
local M = {
'ravitemer/mcphub.nvim',
build = 'npm install -g mcp-hub@latest', -- Installs `mcp-hub` node binary globally
config = function(config)
require('mcphub').setup(config.mcphub)
end,
}
M.keymaps = {
{ 'n', '<leader>m', ':MCPHub<CR>' },
}
M.defaultConfig = { 'mcphub', {
--- `mcp-hub` binary related options-------------------
config = vim.fn.expand('~/.config/mcphub/servers.json'), -- Absolute path to MCP Servers config file (will create if not exists)
port = 37373, -- The port `mcp-hub` server listens to
shutdown_delay = 60 * 10 * 000, -- Delay in ms before shutting down the server when last instance closes (default: 10 minutes)
use_bundled_binary = false, -- Use local `mcp-hub` binary (set this to true when using build = "bundled_build.lua")
---Chat-plugin related options-----------------
auto_approve = false, -- Auto approve mcp tool calls
auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically
extensions = {
avante = {
make_slash_commands = true, -- make /slash commands from MCP server prompts
},
},
--- Plugin specific options-------------------
native_servers = {}, -- add your custom lua native servers here
ui = {
window = {
width = 0.8, -- 0-1 (ratio); "50%" (percentage); 50 (raw number)
height = 0.8, -- 0-1 (ratio); "50%" (percentage); 50 (raw number)
relative = 'editor',
zindex = 50,
border = 'rounded', -- "none", "single", "double", "rounded", "solid", "shadow"
},
wo = { -- window-scoped options (vim.wo)
winhl = 'Normal:MCPHubNormal,FloatBorder:MCPHubBorder',
},
},
on_ready = function(hub)
-- Called when hub is ready
end,
on_error = function(err)
-- Called on errors
end,
log = {
level = vim.log.levels.WARN,
to_file = false,
file_path = nil,
prefix = 'MCPHub',
},
} }
return M