|
| 1 | +--- |
| 2 | +title: Meta-mcp 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: ptelang |
| 9 | + date: 2025-09-18 |
| 10 | +--- |
| 11 | + |
| 12 | +## Overview |
| 13 | + |
| 14 | +The meta-mcp server acts as an intelligent intermediary between AI clients and |
| 15 | +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. |
| 18 | + |
| 19 | +Key features include: |
| 20 | + |
| 21 | +- **Tool Discovery**: Uses hybrid search (semantic + keyword) to find the right |
| 22 | + tools for your tasks |
| 23 | +- **Unified Access**: Single endpoint to access all your MCP servers without |
| 24 | + managing multiple connections |
| 25 | +- **Tool Management**: Seamlessly manage large numbers of MCP tools across |
| 26 | + different servers |
| 27 | +- **Intelligent Routing**: Automatically routes requests to the appropriate MCP |
| 28 | + server based on tool requirements |
| 29 | + |
| 30 | +## Metadata |
| 31 | + |
| 32 | +<MCPMetadata name='meta-mcp' /> |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +<Tabs groupId='mode' queryString='mode'> |
| 37 | + |
| 38 | +<TabItem value='ui' label='UI' default> |
| 39 | + |
| 40 | +See the next section for details on setup. |
| 41 | + |
| 42 | +</TabItem> |
| 43 | + |
| 44 | +<TabItem value='cli' label='CLI'> |
| 45 | + |
| 46 | +:::info[Prerequisites] |
| 47 | + |
| 48 | +Both of the following are needed. |
| 49 | + |
| 50 | +- ToolHive UI (version >= 0.6.0) must be running for setup |
| 51 | +- ToolHive CLI (version >= 0.3.1) |
| 52 | + |
| 53 | +::: |
| 54 | + |
| 55 | +**Step 1: Create a dedicated group and run meta-mcp** |
| 56 | + |
| 57 | +```bash |
| 58 | +# Create the meta group |
| 59 | +thv group create meta |
| 60 | + |
| 61 | +# Run meta-mcp in the dedicated group |
| 62 | +thv run --group meta meta-mcp |
| 63 | +``` |
| 64 | + |
| 65 | +**Step 2: Configure your AI client for the meta group** |
| 66 | + |
| 67 | +```bash |
| 68 | +# Register your AI client with the meta group |
| 69 | +thv client setup |
| 70 | + |
| 71 | +# Verify the configuration |
| 72 | +thv client list-registered |
| 73 | +``` |
| 74 | + |
| 75 | +**Step 3: Add MCP servers to the default group** |
| 76 | + |
| 77 | +```bash |
| 78 | +# Add MCP servers that you want to access through meta-mcp |
| 79 | +thv run github |
| 80 | +thv run filesystem |
| 81 | +thv run time |
| 82 | + |
| 83 | +# Verify the configuration - meta-mcp should be in 'meta' group, others in 'default' |
| 84 | +thv list |
| 85 | +``` |
| 86 | + |
| 87 | +</TabItem> |
| 88 | +</Tabs> |
| 89 | + |
| 90 | +## Sample prompts |
| 91 | + |
| 92 | +Once meta-mcp is configured and running, you can use it with natural language |
| 93 | +prompts. The server will automatically discover and route to appropriate tools: |
| 94 | + |
| 95 | +**Direct Task Examples:** |
| 96 | + |
| 97 | +- "Get the details of GitHub issue 1911 from stacklok/toolhive repo" |
| 98 | +- "List recent PRs from stacklok/toolhive repo" |
| 99 | + |
| 100 | +**The meta-mcp workflow:** |
| 101 | + |
| 102 | +1. Your AI client sends the request to meta-mcp |
| 103 | +2. Meta-mcp uses hybrid search (semantic + keyword) to find relevant tools |
| 104 | + across all connected MCP servers |
| 105 | +3. Meta-mcp server returns the short list of matching tools to the client |
| 106 | +4. Client selects one tool from the short list and uses meta-mcp to call that |
| 107 | + tool |
| 108 | +5. Results are returned from meta-mcp to the client |
| 109 | + |
| 110 | +## Available tools |
| 111 | + |
| 112 | +The meta-mcp server provides two main tools: |
| 113 | + |
| 114 | +### find_tool |
| 115 | + |
| 116 | +Discovers available tools that match your requirements using hybrid search |
| 117 | +(semantic + keyword). |
| 118 | + |
| 119 | +**Parameters:** |
| 120 | + |
| 121 | +- `tool_description`: Description of the task or capability needed (e.g., "web |
| 122 | + search", "analyze CSV file") |
| 123 | +- `tool_keywords`: Space-separated keywords of the task or capability needed |
| 124 | + (e.g., "list issues github", "SQL query postgres") |
| 125 | + |
| 126 | +### call_tool |
| 127 | + |
| 128 | +Executes a specific tool with provided parameters after discovery. |
| 129 | + |
| 130 | +**Parameters:** |
| 131 | + |
| 132 | +- `server_name`: Name of the MCP server providing the tool |
| 133 | +- `tool_name`: Name of the tool to execute |
| 134 | +- `parameters`: Dictionary of arguments required by the tool |
| 135 | + |
| 136 | +## Recommended practices |
| 137 | + |
| 138 | +- **Use descriptive group names**: Keep meta-mcp in a dedicated group to |
| 139 | + maintain clean client configurations |
| 140 | +- **Regular updates**: Keep both ToolHive and meta-mcp updated for the latest |
| 141 | + features and compatibility |
| 142 | + |
| 143 | +:::tip[Best Practice] |
| 144 | + |
| 145 | +Start with a small set of MCP servers in the default group and gradually add |
| 146 | +more as you become familiar with meta-mcp's tool discovery capabilities. This |
| 147 | +makes it easier to understand which tools are being used for different tasks. |
| 148 | + |
| 149 | +::: |
0 commit comments