Skip to content

Commit e80a577

Browse files
ptelangclaude
andcommitted
Add comprehensive usage guide for meta-mcp MCP server
This guide documents how to use the meta-mcp server with ToolHive for intelligent tool discovery and unified access to multiple MCP servers. Includes setup instructions along with practical examples and best practices. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f2a5126 commit e80a577

File tree

1 file changed

+238
-0
lines changed

1 file changed

+238
-0
lines changed
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
---
2+
title: meta-mcp server guide
3+
sidebar_label: meta-mcp
4+
description:
5+
Using the meta-mcp server with ToolHive for intelligent tool discovery and
6+
unified MCP server access.
7+
last_update:
8+
author: stacklok-claude
9+
date: 2025-09-18
10+
---
11+
12+
import Tabs from '@theme/Tabs';
13+
import TabItem from '@theme/TabItem';
14+
import MCPMetadata from '@site/src/components/MCPMetadata';
15+
16+
## Overview
17+
18+
The meta-mcp server acts as an intelligent intermediary between AI clients and
19+
multiple MCP servers. It provides semantic tool discovery, unified access to
20+
multiple MCP servers through a single endpoint, and intelligent routing of
21+
requests to appropriate MCP tools.
22+
23+
Key features include:
24+
25+
- **Semantic Tool Discovery**: Uses embeddings and hybrid search (semantic +
26+
BM25) to find the right tools for your tasks
27+
- **Unified Access**: Single endpoint to access all your MCP servers without
28+
managing multiple connections
29+
- **Tool Management**: Seamlessly manage large numbers of MCP tools across
30+
different servers
31+
- **Intelligent Routing**: Automatically routes requests to the appropriate MCP
32+
server based on tool requirements
33+
34+
The meta-mcp server is developed by
35+
[StacklokLabs](https://github.com/StacklokLabs/meta-mcp) and requires Python
36+
3.13+.
37+
38+
## Metadata
39+
40+
<MCPMetadata name='meta-mcp' />
41+
42+
## Usage
43+
44+
<Tabs groupId='mode' queryString='mode'>
45+
<TabItem value='ui' label='UI' default>
46+
47+
:::info[Prerequisites]
48+
49+
- ToolHive UI (version >= 0.6.0) must be running
50+
- ToolHive CLI (version >= 0.3.1) :::
51+
52+
1. **Create a dedicated group for meta-mcp**:
53+
54+
Navigate to the Groups section and create a new group called `meta`. This
55+
ensures that AI clients are configured with only the meta-mcp server while
56+
other MCP servers remain available but not directly configured in clients.
57+
58+
2. **Install meta-mcp in the dedicated group**:
59+
60+
In the UI, select the `meta` group and add the meta-mcp server from the
61+
registry.
62+
63+
3. **Configure your AI client**:
64+
65+
Use the client configuration feature in the UI to register your AI client
66+
(like Cursor or Claude Desktop) with the `meta` group only.
67+
68+
4. **Add other MCP servers to the default group**:
69+
70+
Install other MCP servers you want to access through meta-mcp in the default
71+
group. These will be discovered automatically by meta-mcp.
72+
73+
</TabItem>
74+
<TabItem value='cli' label='CLI'>
75+
76+
:::info[Prerequisites]
77+
78+
- ToolHive UI (version >= 0.6.0) must be running for setup
79+
- ToolHive CLI (version >= 0.3.1) :::
80+
81+
**Step 1: Create a dedicated group and run meta-mcp**
82+
83+
```bash
84+
# Create the meta group
85+
thv group create meta
86+
87+
# Run meta-mcp in the dedicated group
88+
thv run --group meta meta-mcp
89+
```
90+
91+
**Step 2: Configure your AI client for the meta group**
92+
93+
```bash
94+
# Register your AI client with the meta group
95+
# Examples for different clients:
96+
thv client register cursor --group meta
97+
thv client register claude-desktop --group meta
98+
99+
# Verify the configuration
100+
thv client list-registered
101+
```
102+
103+
**Step 3: Add MCP servers to the default group**
104+
105+
```bash
106+
# Add MCP servers that you want to access through meta-mcp
107+
thv run github
108+
thv run filesystem
109+
thv run time
110+
111+
# Verify the configuration - meta-mcp should be in 'meta' group, others in 'default'
112+
thv ls
113+
```
114+
115+
**Advanced Usage: Custom configuration**
116+
117+
If you need custom configuration for meta-mcp, you can specify environment
118+
variables:
119+
120+
```bash
121+
# Run with custom ToolHive connection settings
122+
TOOLHIVE_HOST=localhost TOOLHIVE_PORT=8080 thv run --group meta meta-mcp
123+
124+
# Run with custom polling interval (default: 60 seconds)
125+
thv run --group meta --env POLLING_INTERVAL=30 meta-mcp
126+
```
127+
128+
</TabItem>
129+
<TabItem value='k8s' label='Kubernetes'>
130+
131+
```yaml title="meta-mcp.yaml"
132+
apiVersion: toolhive.stacklok.dev/v1alpha1
133+
kind: MCPServer
134+
metadata:
135+
name: meta-mcp
136+
namespace: toolhive-system
137+
labels:
138+
app.kubernetes.io/name: meta-mcp
139+
spec:
140+
name: meta-mcp
141+
registry: stacklok
142+
group: meta
143+
env:
144+
- name: TOOLHIVE_HOST
145+
value: 'toolhive-api-server'
146+
- name: TOOLHIVE_PORT
147+
value: '8080'
148+
- name: POLLING_INTERVAL
149+
value: '60'
150+
```
151+
152+
Apply the configuration:
153+
154+
```bash
155+
kubectl apply -f meta-mcp.yaml
156+
```
157+
158+
Then configure other MCP servers in the default group:
159+
160+
```yaml title="other-mcp-servers.yaml"
161+
apiVersion: toolhive.stacklok.dev/v1alpha1
162+
kind: MCPServer
163+
metadata:
164+
name: github
165+
spec:
166+
name: github
167+
registry: stacklok
168+
# group defaults to "default" if not specified
169+
---
170+
apiVersion: toolhive.stacklok.dev/v1alpha1
171+
kind: MCPServer
172+
metadata:
173+
name: filesystem
174+
spec:
175+
name: filesystem
176+
registry: stacklok
177+
```
178+
179+
</TabItem>
180+
</Tabs>
181+
182+
## Sample prompts
183+
184+
Once meta-mcp is configured and running, you can use it with natural language
185+
prompts. The server will automatically discover and route to appropriate tools:
186+
187+
**Direct Task Examples:**
188+
189+
- "Get the details of GitHub issue 1911 from stacklok/toolhive repo"
190+
- "List recent PRs from stacklok/toolhive repo"
191+
192+
**The meta-mcp workflow:**
193+
194+
1. Your AI client sends the request to meta-mcp
195+
2. Meta-mcp uses hybrid semantic and keyword search to find relevant tools
196+
across all connected MCP servers
197+
3. Meta-mcp server returns the short list of matching tools to the client
198+
4. Client selects one tool from the short list and uses meta-mcp to call that
199+
tool
200+
5. Results are returned from meta-mcp to the client
201+
202+
## Available tools
203+
204+
The meta-mcp server provides two main tools:
205+
206+
### find_tool
207+
208+
Discovers available tools that match your requirements using hybrid semantic and
209+
keyword search.
210+
211+
**Parameters:**
212+
213+
- `tool_description`: Description of the task or capability needed (e.g., "web
214+
search", "analyze CSV file")
215+
- `tool_keywords`: Space-separated keywords of the task or capability needed
216+
(e.g., "list issues github", "SQL query postgres")
217+
218+
### call_tool
219+
220+
Executes a specific tool with provided parameters after discovery.
221+
222+
**Parameters:**
223+
224+
- `server_name`: Name of the MCP server providing the tool
225+
- `tool_name`: Name of the tool to execute
226+
- `parameters`: Dictionary of arguments required by the tool
227+
228+
## Recommended practices
229+
230+
- **Use descriptive group names**: Keep meta-mcp in a dedicated group to
231+
maintain clean client configurations
232+
- **Regular updates**: Keep both ToolHive and meta-mcp updated for the latest
233+
features and compatibility
234+
235+
:::tip[Best Practice] Start with a small set of MCP servers in the default group
236+
and gradually add more as you become familiar with meta-mcp's tool discovery
237+
capabilities. This makes it easier to understand which tools are being used for
238+
different tasks. :::

0 commit comments

Comments
 (0)