Skip to content

Commit bdba60d

Browse files
committed
Updated meta-mcp doc with the latest features
1 parent 514b20a commit bdba60d

File tree

1 file changed

+82
-8
lines changed

1 file changed

+82
-8
lines changed

docs/toolhive/guides-mcp/meta-mcp.mdx

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ last_update:
1313

1414
The meta-mcp server acts as an intelligent intermediary between AI clients and
1515
multiple MCP servers. It provides tool discovery, unified access to multiple MCP
16-
servers through a single endpoint, and intelligent routing of requests to
17-
appropriate MCP tools.
16+
servers through a single endpoint, and routing of requests to the MCP servers.
17+
When a required MCP server isn't installed, meta-mcp automatically searches the
18+
ToolHive registry and dynamically installs the necessary server to complete the
19+
task.
1820

1921
:::info[Status]
2022

@@ -31,29 +33,48 @@ Key features include:
3133
managing multiple connections
3234
- **Tool management**: Seamlessly manage large numbers of MCP tools across
3335
different servers
34-
- **Intelligent routing**: Automatically routes requests to the appropriate MCP
35-
server based on tool requirements
36+
- **Intelligent routing**: Routes requests to the requested MCP server and tool
37+
- **Dynamic Server Installation**: Automatically discovers and installs missing
38+
MCP servers from the ToolHive registry when needed for a task
3639

3740
This approach helps you avoid problems associated with context overload and tool
3841
confusion by narrowing down the toolset to only those relevant for a given task.
3942
It also simplifies client configurations by providing a single access point to
4043
multiple MCP servers.
4144

42-
The meta-mcp workflow:
45+
The meta-mcp workflow when relevant MCP server is installed:
4346

4447
1. Your AI client sends the request to meta-mcp
4548
2. Meta-mcp uses hybrid search (semantic + keyword) to find relevant tools
46-
across all connected MCP servers
49+
across all installed MCP servers
4750
3. Meta-mcp server returns the short list of matching tools to the client
4851
4. Client selects one tool from the short list and uses meta-mcp to call that
4952
tool
5053
5. Results are returned from meta-mcp to the client
5154

55+
The meta-mcp workflow when relevant MCP server is not installed:
56+
57+
1. Your AI client sends the request to meta-mcp
58+
2. Meta-mcp uses hybrid search (semantic + keyword) to find tools across all
59+
installed MCP servers
60+
3. Meta-mcp server returns the short list of matching tools to the client
61+
4. AI client finds that none of the tools are suitable for the request
62+
5. AI client sends a request to search the ToolHive registry for relevant
63+
servers
64+
6. Meta-mcp uses hybrid search (semantic + keyword) to find relevant servers
65+
7. Meta-mcp server returns the short list of matching servers to the client
66+
8. AI client requests installation of a MCP server
67+
9. Meta-mcp server installs the MCP server automatically if no security
68+
credentials are needed. If security credentials are needed, meta-mcp server
69+
guides the user to ToolHive for entering the credentials
70+
10. After installation, the flow is identical to the flow when a MCP server is
71+
installed.
72+
5273
## Metadata
5374

5475
<MCPMetadata name='meta-mcp' />
5576

56-
## Usage
77+
## Usage on local machine
5778

5879
The meta-mcp server is specifically designed to work with
5980
[ToolHive groups](../guides-cli/group-management.md). The recommended setup is
@@ -109,8 +130,12 @@ depends on the UI's API server for tool discovery and management.
109130
# Create the meta group
110131
thv group create meta
111132

112-
# Run meta-mcp in the dedicated group
133+
# Run meta-mcp in the dedicated group with access to server from all groups
113134
thv run --group meta meta-mcp
135+
136+
# Alternately, run meta-mcp in the dedicated group with access to servers
137+
# from the specified server groups
138+
thv run --group meta meta-mcp --env ALLOWED_GROUPS="default,test"
114139
```
115140

116141
**Step 2: Configure your AI client for the meta group**
@@ -149,6 +174,12 @@ thv list
149174
</TabItem>
150175
</Tabs>
151176

177+
## Deployment in Kubernetes
178+
179+
Meta-mcp is supported in Kubernetes enviornment. Follow
180+
[this guide](https://github.com/StacklokLabs/meta-mcp/blob/main/docs/kubernetes-integration.md)
181+
for deployment.
182+
152183
## Sample prompts
153184

154185
Once meta-mcp is configured and running, you can use the same prompts you would
@@ -189,6 +220,49 @@ Executes a specific tool with provided parameters after discovery.
189220
- `tool_name`: Name of the tool to execute
190221
- `parameters`: Dictionary of arguments required by the tool
191222

223+
### `list_tools`
224+
225+
List all available tools across all MCP servers.
226+
227+
**Parameters**
228+
229+
None
230+
231+
### `search_registry`
232+
233+
Search for tools in the ToolHive registry when find_tool doesn't return a
234+
relevant tool.
235+
236+
**Parameters:**
237+
238+
- `tool_description`: Description of the task or capability needed (e.g., "web
239+
search", "analyze CSV file")
240+
- `tool_keywords`: Space-separated keywords of the task or capability needed
241+
(e.g., "list issues github", "SQL query postgres")
242+
243+
### `install_server`
244+
245+
Install and start an MCP server from the ToolHive registry.
246+
247+
**Parameters:**
248+
249+
- `server_name`: Name of the server from search_registry() results (found in the
250+
mcp_server_name field)
251+
252+
## Advanced configuration using environment variables
253+
254+
Meta-mcp server can be configured using following enviornment variables.
255+
256+
- MAX_TOOLS_TO_RETURN: Number of tools to return from find_tool (default: 8)
257+
- TOOL_DISTANCE_THRESHOLD: Distance threshold for tool similarity (default: 1.0)
258+
- MAX_TOOL_RESPONSE_TOKENS: Maximum number of tokens to return from call_tool
259+
(default: None)
260+
- WORKLOAD_POLLING_INTERVAL: Polling interval for running MCP servers (default:
261+
60 seconds)
262+
- REGISTRY_POLLING_INTERVAL: Polling interval for ToolHive registry (default: 24
263+
hours)
264+
- RUNTIME_MODE: Runtime mode for MCP servers: docker or k8s (default: docker)
265+
192266
## Recommended practices
193267

194268
- **Use descriptive group names**: Keep meta-mcp in a dedicated group to

0 commit comments

Comments
 (0)