|
| 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'> |
| 39 | + |
| 40 | +The meta-mcp server uses ToolHive groups to function. While you need the |
| 41 | +ToolHive UI to run meta-mcp, it doesn't support group management yet, so you'll |
| 42 | +need to use the CLI for setup. |
| 43 | + |
| 44 | +</TabItem> |
| 45 | + |
| 46 | +<TabItem value='cli' label='CLI' default> |
| 47 | + |
| 48 | +:::info[Prerequisites] |
| 49 | + |
| 50 | +You need both the ToolHive CLI and UI to use the meta-mcp server because it |
| 51 | +depends on the UI's API server for tool discovery and management. |
| 52 | + |
| 53 | +- ToolHive UI (version >= 0.6.0) must be running for setup |
| 54 | +- ToolHive CLI (version >= 0.3.1) |
| 55 | + |
| 56 | +The meta-mcp server should run in a |
| 57 | +[dedicated group](../guides-cli/group-management.md) to keep client |
| 58 | +configurations clean. Other MCP servers that you want to access through meta-mcp |
| 59 | +should be in a separate group. |
| 60 | + |
| 61 | +::: |
| 62 | + |
| 63 | +**Step 1: Create a dedicated group and run meta-mcp** |
| 64 | + |
| 65 | +```bash |
| 66 | +# Create the meta group |
| 67 | +thv group create meta |
| 68 | + |
| 69 | +# Run meta-mcp in the dedicated group |
| 70 | +thv run --group meta meta-mcp |
| 71 | +``` |
| 72 | + |
| 73 | +**Step 2: Configure your AI client for the meta group** |
| 74 | + |
| 75 | +```bash |
| 76 | +# Register your AI client with the meta group |
| 77 | +thv client setup |
| 78 | + |
| 79 | +# Verify the configuration |
| 80 | +thv client list-registered |
| 81 | +``` |
| 82 | + |
| 83 | +**Step 3: Add MCP servers to the default group** |
| 84 | + |
| 85 | +```bash |
| 86 | +# Add MCP servers that you want to access through meta-mcp |
| 87 | +thv run github |
| 88 | +thv run filesystem |
| 89 | +thv run time |
| 90 | + |
| 91 | +# Verify the configuration - meta-mcp should be in 'meta' group, others in 'default' |
| 92 | +thv list |
| 93 | +``` |
| 94 | + |
| 95 | +</TabItem> |
| 96 | +</Tabs> |
| 97 | + |
| 98 | +## Sample prompts |
| 99 | + |
| 100 | +Once meta-mcp is configured and running, you can use it with natural language |
| 101 | +prompts. The server automatically discovers and routes to appropriate tools: |
| 102 | + |
| 103 | +**Direct task examples:** |
| 104 | + |
| 105 | +- "Get the details of GitHub issue 1911 from stacklok/toolhive repo" |
| 106 | +- "List recent PRs from stacklok/toolhive repo" |
| 107 | + |
| 108 | +**The meta-mcp workflow:** |
| 109 | + |
| 110 | +1. Your AI client sends the request to meta-mcp |
| 111 | +2. Meta-mcp uses hybrid search (semantic + keyword) to find relevant tools |
| 112 | + across all connected MCP servers |
| 113 | +3. Meta-mcp server returns the short list of matching tools to the client |
| 114 | +4. Client selects one tool from the short list and uses meta-mcp to call that |
| 115 | + tool |
| 116 | +5. Results are returned from meta-mcp to the client |
| 117 | + |
| 118 | +## Available tools |
| 119 | + |
| 120 | +The meta-mcp server provides two main tools: |
| 121 | + |
| 122 | +### find_tool |
| 123 | + |
| 124 | +Discovers available tools that match your requirements using hybrid search |
| 125 | +(semantic + keyword). |
| 126 | + |
| 127 | +**Parameters:** |
| 128 | + |
| 129 | +- `tool_description`: Description of the task or capability needed (e.g., "web |
| 130 | + search", "analyze CSV file") |
| 131 | +- `tool_keywords`: Space-separated keywords of the task or capability needed |
| 132 | + (e.g., "list issues github", "SQL query postgres") |
| 133 | + |
| 134 | +### call_tool |
| 135 | + |
| 136 | +Executes a specific tool with provided parameters after discovery. |
| 137 | + |
| 138 | +**Parameters:** |
| 139 | + |
| 140 | +- `server_name`: Name of the MCP server providing the tool |
| 141 | +- `tool_name`: Name of the tool to execute |
| 142 | +- `parameters`: Dictionary of arguments required by the tool |
| 143 | + |
| 144 | +## Recommended practices |
| 145 | + |
| 146 | +- **Use descriptive group names**: Keep meta-mcp in a dedicated group to |
| 147 | + maintain clean client configurations |
| 148 | +- **Regular updates**: Keep both ToolHive and meta-mcp updated for the latest |
| 149 | + features and compatibility |
| 150 | + |
| 151 | +:::tip[Best Practice] |
| 152 | + |
| 153 | +Start with a small set of MCP servers in the default group and gradually add |
| 154 | +more as you become familiar with meta-mcp's tool discovery capabilities. This |
| 155 | +makes it easier to understand which tools are being used for different tasks. |
| 156 | + |
| 157 | +::: |
0 commit comments