Skip to content

Commit d123a81

Browse files
committed
docs: update builtin_tools config
1 parent 31890f1 commit d123a81

11 files changed

Lines changed: 409 additions & 10 deletions

File tree

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ docs: deps/panvimdoc
3030
-t deps/panvimdoc/scripts/panvimdoc.lua \
3131
scripts/vimdoc.md \
3232
-o doc/mcphub.txt
33-
@echo Generating Help Tags...
34-
@nvim --headless --cmd "helptags doc" --cmd "quit"
3533

3634
deps: deps/plenary.nvim deps/nvim-treesitter deps/mini.nvim deps/panvimdoc
3735
@echo Pulling...

doc/.vitepress/config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ export default withMermaid(
9797
collapsed: false,
9898
items: [
9999
{ text: "servers.json", link: "/mcp/servers_json" },
100+
{
101+
text: "Builtin Servers",
102+
collapsed: true,
103+
items: [
104+
{ text: "Overview", link: "/mcp/builtin/" },
105+
{ text: "Neovim Server", link: "/mcp/builtin/neovim" },
106+
{ text: "MCPHub Server", link: "/mcp/builtin/mcphub" },
107+
],
108+
},
100109
{
101110
text: "Lua MCP Servers",
102111
collapsed: true,

doc/configuration.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,29 @@ All options are optional with sensible defaults. See below for each option in de
3333

3434
--- Plugin specific options-------------------
3535
native_servers = {}, -- add your custom lua native servers here
36+
builtin_tools = {
37+
edit_file = {
38+
parser = {
39+
track_issues = true,
40+
extract_inline_content = true,
41+
},
42+
locator = {
43+
fuzzy_threshold = 0.8,
44+
enable_fuzzy_matching = true,
45+
},
46+
ui = {
47+
go_to_origin_on_complete = true,
48+
keybindings = {
49+
accept = ".",
50+
reject = ",",
51+
next = "n",
52+
prev = "p",
53+
accept_all = "ga",
54+
reject_all = "gr",
55+
},
56+
},
57+
},
58+
},
3659
ui = {
3760
window = {
3861
width = 0.8, -- 0-1 (ratio); "50%" (percentage); 50 (raw number)
@@ -257,6 +280,21 @@ Default: `{}`
257280

258281
Define custom Lua native MCP servers that run directly in Neovim without external processes. Each server can provide tools, resources, and prompts. Please see [native servers guide](/mcp/native/index) to create MCP Servers in lua.
259282

283+
### builtin_tools
284+
285+
Default:
286+
287+
```lua
288+
{
289+
builtin_tools = {
290+
edit_file = {
291+
},
292+
},
293+
}
294+
```
295+
296+
Configuration options for MCPHub's builtin tools like `edit_file` tool. View complete [Builtin Tools Documentation](/mcp/builtin/) for all available tools and their configuration options.
297+
260298
### ui
261299

262300
Default:

doc/extensions/codecompanion.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ You can add all the enabled tools from a specific server with server groups. Unl
6565

6666
Server groups are automatically created based on your connected MCP servers when enabled via `make_tools`. Check your MCP Hub UI to see which servers you have connected.
6767

68+
MCPHub includes powerful [builtin servers](/mcp/builtin/) like `@neovim` (file operations, terminal, LSP) and `@mcphub` (server management) that are always available.
69+
6870
#### 3. Individual Tools (when `make_tools = true`)
6971
You can just provide a single tool from a server for fine-grained functionality. Tool names depend on your connected servers:
7072
```

doc/index.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ Just configure them to use MCP Hub's unified endpoint:
8383
- Toggle servers, tools, and resources etc
8484
- Test tools and resources directly in Neovim
8585

86+
### Builtin Native Servers
87+
88+
MCPHub includes two native servers that run directly within Neovim:
89+
90+
- **Neovim Server**: Comprehensive file operations, terminal access, LSP integration, and buffer management
91+
- **MCPHub Server**: Plugin management utilities, server lifecycle control, and documentation access
92+
93+
These servers provide essential functionality without external dependencies and offer deep Neovim integration.
94+
8695
### Chat Integrations
8796

8897
- MCP Hub provides integrations with popular chat plugins like [Avante](https://github.com/yetone/avante.nvim), [CodeCompanion](https://github.com/olimorris/codecompanion.nvim), [CopilotChat](https://github.com/CopilotC-Nvim/CopilotChat.nvim).
@@ -131,8 +140,3 @@ Just configure them to use MCP Hub's unified endpoint:
131140

132141
- [Installation Guide](/installation) - Set up MCPHub in your Neovim
133142
- [Configuration Guide](/configuration) - Learn about configuring MCP Hub
134-
135-
136-
137-
138-

doc/mcp/builtin/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Builtin Native Servers
2+
3+
MCPHub.nvim includes two native MCP servers that run directly within Neovim, providing essential functionality without external dependencies.
4+
5+
## Available Servers
6+
7+
### 1. Neovim Server (`neovim`)
8+
9+
The primary server providing comprehensive file operations, terminal access, LSP integration, and buffer management.
10+
11+
**Key Features:**
12+
- File system operations (read, write, edit, search)
13+
- Terminal command execution and Lua code execution
14+
- LSP diagnostics and buffer inspection
15+
- Interactive file editing with diff preview
16+
- Environment and workspace information
17+
18+
[View Neovim Server Documentation](./neovim)
19+
20+
### 2. MCPHub Server (`mcphub`)
21+
22+
Management utilities for the MCPHub plugin itself, allowing LLMs to control MCP server lifecycle and access documentation.
23+
24+
**Key Features:**
25+
- Start/stop MCP servers dynamically
26+
- Query server status and capabilities
27+
- Access plugin documentation and guides
28+
- Native server creation assistance
29+
30+
[View MCPHub Server Documentation](./mcphub)
31+

doc/mcp/builtin/mcphub.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# MCPHub Server
2+
3+
The MCPHub server (`mcphub`) provides management utilities for the MCPHub plugin itself. It allows LLMs to dynamically control MCP server lifecycle, query system state, and access comprehensive documentation.
4+
5+
## Tools
6+
7+
#### `get_current_servers`
8+
Retrieve the current state of all MCP servers, including both connected and disabled servers.
9+
10+
**Parameters:**
11+
- `include_disabled` (boolean, optional): Whether to include disabled servers (default: true)
12+
- `format` (string, optional): Response format - "detailed" or "summary" (default: "detailed")
13+
14+
**Response Formats:**
15+
16+
**Summary Format:**
17+
```
18+
# Current MCP Server Status
19+
20+
Connected servers (3): github, filesystem, search
21+
Disabled servers (2): database, analytics
22+
```
23+
24+
**Detailed Format:**
25+
Provides complete server information including:
26+
- Server capabilities (tools, resources, prompts)
27+
- Connection status and uptime
28+
- Configuration details
29+
- Available tools with descriptions
30+
31+
#### `toggle_mcp_server`
32+
Start or stop MCP servers dynamically based on task requirements.
33+
34+
**Parameters:**
35+
- `server_name` (string, required): Name of the MCP server to control
36+
- `action` (string, required): Action to perform - "start" or "stop"
37+
38+
## Resources
39+
40+
#### `MCPHub Plugin Docs` (`mcphub://docs`)
41+
Comprehensive documentation for the mcphub.nvim plugin.
42+
43+
#### `MCPHub Native Server Guide` (`mcphub://native_server_guide`)
44+
Complete guide for creating Lua Native MCP servers.
45+
46+
**Intended For:**
47+
- LLMs helping users create custom servers
48+
- Developer documentation and reference
49+
- Advanced plugin customization
50+
51+
#### `MCPHub Changelog` (`mcphub://changelog`)
52+
Version history and feature updates for the plugin.
53+
54+
55+
## Prompts
56+
57+
#### `create_native_server`
58+
Assists users in creating custom native MCP servers with guided prompts.
59+
60+
**Parameters:**
61+
- `mcphub_setup_file` (string, required): Path to file where `mcphub.setup({})` is called (default: Neovim config directory)
62+
63+
**Functionality:**
64+
- Loads comprehensive native server creation guide
65+
- Provides context about user's Neovim configuration
66+
- Integrates with chat plugins for seamless assistance

0 commit comments

Comments
 (0)