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