John Howard 2371a5f37d
Docs: use URL for schemas (#954)
Makes it much more practical to use these
2026-02-12 14:52:28 -08:00
..
2025-07-09 12:51:59 -07:00
2026-02-12 14:52:28 -08:00
2025-07-09 12:51:59 -07:00

Multiplex Example

In the basic example, we exposed a single MCP server. Agentgateway can also multiplex multiple MCP servers, and expose them as a single MCP server to clients.

This can centralize and simplify client configuration -- as we add and remove tools, only the gateway configuration needs to change, rather than all MCP clients.

Running the example

cargo run -- -f examples/multiplex/config.yaml

Multiplexing is only a matter of adding multiple targets. Here we will serve the everything and time server.

targets:
- name: time
  stdio:
    cmd: uvx
    args: ["mcp-server-time"]
- name: everything
  stdio:
    cmd: npx
    args: ["@modelcontextprotocol/server-everything"]

Now when we open the MCP inspector we can see the tools from both time and everything. Because we have multiple tools, each tool is prefixed with the <name>_ to avoid collisions.

Tools List