1- *mcphub.nvim.txt* For NVIM v0.10.0 Last change: 2025 July 12
1+ *mcphub.nvim.txt* For NVIM v0.10.0 Last change: 2025 July 14
22
33==============================================================================
44Table of Contents *mcphub.nvim-table-of-contents*
@@ -939,7 +939,7 @@ Given `API_KEY=secret` in the environment:
939939 "HOME": "/home/ubuntu" "HOME": "/home/ubuntu" Used as-is
940940 -------------------------------------------------------------------------------------------------------
941941
942- �� ️ **Legacy Syntax**: `$VAR ` (args) and `$: command` (env) are deprecated
942+ ⚠ ️ **Legacy Syntax**: `$VAR ` (args) and `$: command` (env) are deprecated
943943 but still supported with warnings. Use `$ {VAR}` and `${cmd: command}` instead.
944944
945945CWD EXAMPLE:
@@ -2262,7 +2262,7 @@ Here’s a simple chat prompt:
22622262<
22632263
22642264
2265- REAL EXAMPLE: NEOVIM� S PARROT PROMPT
2265+ REAL EXAMPLE: NEOVIM’ S PARROT PROMPT
22662266
22672267Here’s how the built-in Neovim server implements a fun parrot prompt:
22682268
@@ -2786,26 +2786,7 @@ Register MCP Hub as an extension in your CodeCompanion configuration:
27862786 show_server_tools_in_chat = true, -- Show individual tools in chat completion (when make_tools=true)
27872787 add_mcp_prefix_to_tool_names = false, -- Add mcp__ prefix (e.g `@m cp__github` , `@m cp__neovim__list_issues` )
27882788 show_result_in_chat = true, -- Show tool results directly in chat buffer
2789- format_tool = function(display_name, tool)
2790- local args = vim.deepcopy(tool.args)
2791- -- Replace 'use_mcp_tool' with actual tool name and params.
2792- if name == 'use_mcp_tool' then
2793- name = string.format('%s__%s', args.server_name, args.tool_name)
2794- args = args.tool_input
2795- end
2796-
2797- if name == 'filesystem__edit_file' then
2798- if type(args.edits) == 'table' then
2799- args.edits = ''
2800- end
2801- elseif name == 'filesystem__write_file' then
2802- if type(args.content) == 'string' then
2803- args.content = ''
2804- end
2805- end
2806-
2807- return name .. ' ' .. vim.inspect(args):gsub('%s+', ' ')
2808- end,
2789+ format_tool = nil, -- function(tool_name:string, tool: CodeCompanion.Agent.Tool) : string Function to format tool names to show in the chat buffer
28092790 -- MCP Resources
28102791 make_vars = true, -- Convert MCP resources to #variables for prompts
28112792 -- MCP Prompts
@@ -2891,7 +2872,7 @@ Example configuration for custom tool groups:
28912872 description = "GitHub operations from issue to PR",
28922873 tools = {
28932874 -- File operations
2894- "neovim__read_files ", "neovim__write_file", "neovim__replace_in_file ",
2875+ "neovim__read_multiple_files ", "neovim__write_file", "neovim__edit_file ",
28952876 -- GitHub operations
28962877 "github__create_issue", "github__create_pull_request", "github__get_file_contents",
28972878 "github__create_or_update_file", "github__list_issues", "github__search_code"
@@ -2916,7 +2897,7 @@ Example configuration for custom tool groups:
29162897Then use your custom groups:
29172898
29182899>
2919- @github_pr_workflow Fix this bug, create tests, and submit a PR with proper documentation
2900+ @{ github_pr_workflow} Fix this bug, create tests, and submit a PR with proper documentation
29202901<
29212902
29222903**Important Notes:** - Tool names depend on your connected MCP servers - Use
@@ -2933,8 +2914,8 @@ If `make_vars = true`, MCP resources become available as variables prefixed
29332914with `#` :
29342915
29352916>
2936- Fix diagnostics in the file #neovim://diagnostics/current
2937- Analyze the current buffer #neovim:buffer
2917+ Fix diagnostics in the file #{mcp: neovim://diagnostics/buffer}
2918+ Analyze the current buffer #{mcp: neovim:buffer}
29382919<
29392920
29402921_Example: Accessing LSP diagnostics_:
@@ -2960,27 +2941,10 @@ By default, whenever codecompanion calls `use_mcp_tool` or
29602941confirm dialog with tool name, server name and arguments.
29612942
29622943
2963- GLOBAL AUTO-APPROVAL
2964-
2965- You can set `auto_approve` to `true` to automatically approve all MCP tool
2966- calls without user confirmation:
2967-
2968- >lua
2969- require("mcphub").setup({
2970- -- This sets vim.g.mcphub_auto_approve to true by default (can also be toggled from the HUB UI with `ga` )
2971- auto_approve = true,
2972- })
2973- <
2974-
2975- This also sets `vim .g .mcphub_auto_approve` variable to `true` . You can also
2976- toggle this option in the MCP Hub UI with `ga` keymap. You can see the current
2977- auto approval status in the Hub UI.
2978-
2979-
29802944FINE-GRAINED AUTO-APPROVAL
29812945
2982- For more control, configure auto-approval per server or per tool in your
2983- `servers.json` :
2946+ For fine-grained control, configure auto-approval per server or per tool in
2947+ your `servers.json` :
29842948
29852949>json
29862950 {
@@ -3005,6 +2969,23 @@ individual tool to toggle auto-approval for just that tool - Resources are
30052969always auto-approved (no configuration needed)
30062970
30072971
2972+ GLOBAL AUTO-APPROVAL
2973+
2974+ You can set `auto_approve` to `true` to automatically approve all MCP tool
2975+ calls without user confirmation:
2976+
2977+ >lua
2978+ require("mcphub").setup({
2979+ -- This sets vim.g.mcphub_auto_approve to true by default (can also be toggled from the HUB UI with `ga` )
2980+ auto_approve = true,
2981+ })
2982+ <
2983+
2984+ This also sets `vim .g .mcphub_auto_approve` variable to `true` . You can also
2985+ toggle this option in the MCP Hub UI with `ga` keymap. You can see the current
2986+ auto approval status in the Hub UI.
2987+
2988+
30082989FUNCTION-BASED AUTO-APPROVAL
30092990
30102991For maximum control, provide a function that decides approval based on the
@@ -3325,9 +3306,9 @@ doc/other/architecture.md doc/other/troubleshooting.md
3325330615. *image*: doc/extensions/https:/github.com/user-attachments/assets/fb04393c-a9da-4704-884b-2810ff69f59a
3326330716. *image*: doc/extensions/https:/github.com/user-attachments/assets/678a06a5-ada9-4bb5-8f49-6e58549c8f32
3327330817. *Image*: doc/extensions/https:/github.com/user-attachments/assets/201a5804-99b6-4284-9351-348899e62467
3328- 18. *Image*: doc/extensions/https:/github.com/user-attachments/assets/64708065-3428-4eb3-82a5-e32d2d1f98c6
3329- 19. *Image*: doc/extensions/https:/github.com/user-attachments/assets/131bfed2-c4e7-4e2e-ba90-c86e6ca257fd
3330- 20. *Image*: doc/extensions/https:/github.com/user-attachments/assets/befd1d44-bca3-41f6-a99a-3d15c6c8a5f5
3309+ 18. *Image*: doc/extensions/https:/github.com/user-attachments/assets/131bfed2-c4e7-4e2e-ba90-c86e6ca257fd
3310+ 19. *Image*: doc/extensions/https:/github.com/user-attachments/assets/befd1d44-bca3-41f6-a99a-3d15c6c8a5f5
3311+ 20. *Image*: doc/extensions/https:/github.com/user-attachments/assets/64708065-3428-4eb3-82a5-e32d2d1f98c6
3331331221. *Image*: doc/extensions/https:/github.com/user-attachments/assets/7c16bc7e-a9df-4afc-9736-2ee6a39919a9
3332331322. *Image*: doc/extensions/https:/github.com/user-attachments/assets/adc556bb-7d5f-4d22-820a-a7daeb0ac72c
3333331423. *Image*: doc/extensions/https:/github.com/user-attachments/assets/7f77bf1e-12b7-4745-a87b-40181a619733
0 commit comments