You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make_slash_commands = true, -- make /slash commands from MCP server prompts
281
-
},
282
-
codecompanion = {
283
-
show_result_in_chat = true, -- Show the mcp tool result in the chat buffer
284
-
make_vars = true, -- make chat #variables from MCP server resources
285
-
make_slash_commands = true, -- make /slash commands from MCP server prompts
286
-
},
282
+
}
287
283
},
288
284
289
285
@@ -347,6 +343,7 @@ EXAMPLE CONFIGURATION
347
343
"env": {
348
344
"API_KEY": "", // Falls back to process.env.API_KEY
349
345
"SERVER_URL": null, // Falls back to process.env.SERVER_URL
346
+
"OP_KEY": "$: cmd:op read op://example/secret", // use $: at the beginning to indicate that this is a command
350
347
"AUTH_HEADER": "BEARER ${API_KEY}", // ${API_KEY} is replaced with resolved value of API_KEY in the env field falling back to process.env
351
348
"DEBUG": "true" // Direct value, no fallback
352
349
}
@@ -373,6 +370,7 @@ MCP SERVERS CONFIG
373
370
- `env`: Optional environment variables. Special values:
374
371
- `""` (empty string): Falls back to process.env.[VAR_NAME]
375
372
- `null`: Falls back to process.env.[VAR_NAME]
373
+
- `$:` values that start with `$:` are executed as shell commands e.g to use op cli `$: cmd:op read op://personal/secret`
376
374
- `${ENV_VAR}`: Replaces with the resolved value of ENV_VAR in the env field, falling back to process.env
377
375
- Any other value is used as-is
378
376
- Remote Servers: (Supports `streamable-http`, `sse` with `OAuth`)
@@ -382,6 +380,60 @@ MCP SERVERS CONFIG
382
380
- There are other plugin specific options for each server like `disabled`, `disabled_tools`, `custom_instructions` etc which can be easily updated from the UI.
383
381
384
382
383
+
NIX *mcphub.nvim-mcp-hub-nix*
384
+
385
+
Nixpkgs install ~
386
+
387
+
388
+
coming…
389
+
Flake install ~
390
+
391
+
Just add it to your NixOS flake.nix or home-manager:
392
+
393
+
>nix
394
+
inputs = {
395
+
mcphub-nvim.url = "github:ravitemer/mcphub.nvim";
396
+
...
397
+
}
398
+
<
399
+
400
+
To integrate mcphub.nvim to your NixOS/Home Manager nvim configs, add the
401
+
following to your neovim.plugins
402
+
<https://nixos.wiki/wiki/Neovim#Installing_Plugins> or your neovim.packages
Open the MCPHub UI to manage servers, test tools and monitor status:
@@ -507,58 +559,39 @@ Add MCP capabilities to CodeCompanion.
507
559
508
560
Set `config.auto_approve = true` or `vim.g.mcphub_auto_approve = true` to
509
561
automatically approve tool requests.
562
+
- Type @mcp in the chat (once submitted, it will add available MCP Servers to the system prompts and adds a tool so that the LLM can call tools, resources on MCP Servers etc)
563
+
510
564
511
565
Set `make_vars = true` to show resources as #variables in the chat buffer
512
566
513
567
Set `make_slash_commands = true` to show prompts as /slash_commands in the chat
514
568
buffer
515
-
- Type @mcp in the chat (once submitted, it will add available MCP Servers to the
516
-
system prompts and adds a tool so that the LLM can call tools, resources on MCP
517
-
Servers etc)
518
-
- Server prompts become available as `/mcp:prompt_name` slash commands in chat
519
-
(_Currently very few servers provide prompts, but you can add your own using
520
-
mcphub.add_prompt_)
521
-
- Prompts with arguments are handled using vim.ui.input (cancelling input for
522
-
required arguments will abort the slash command)
523
-
- If the last message from the `/mcp:prompt_name` message is of `user` role, it
524
-
will be added to the chat buffer.
525
-
- Whenever the servers are updated, the variables and slash_commands will also be
526
-
updated in realtime
527
-
- E.g LSP current file diagnostics
569
+
- Server prompts become available as `/mcp:prompt_name` slash commands in chat (_Currently very few servers provide prompts, but you can add your own using mcphub.add_prompt_)
570
+
- Prompts with arguments are handled using vim.ui.input (cancelling input for required arguments will abort the slash command)
571
+
- If the last message from the `/mcp:prompt_name` message is of `user` role, it will be added to the chat buffer.
528
572
529
573
530
574
Set `show_result_in_chat = true` to view the mcp tool call result in the chat
531
575
buffer.
532
-
>lua
533
-
534
-
require("mcphub").setup({
535
-
extensions = {
536
-
codecompanion = {
537
-
-- Show the mcp tool result in the chat buffer
538
-
show_result_in_chat = true,
539
-
make_vars = true, -- make chat #variables from MCP server resources
540
-
make_slash_commands = true, -- make /slash_commands from MCP server prompts
541
-
},
542
-
}
543
-
})
544
-
<
545
-
546
576
>lua
547
577
require("codecompanion").setup({
548
-
strategies = {
549
-
chat = {
550
-
tools = {
551
-
["mcp"] = {
552
-
-- calling it in a function would prevent mcphub from being loaded before it's needed
0 commit comments