{
  "access": "public",
  "type": "reference",
  "format": "markdown",
  "title": "Multiplexing",
  "chunked": true,
  "url": "https://library.datagrout.ai/multiplexing",
  "summary": "**All your integrations behind one endpoint**",
  "content_markdown": "# Multiplexing\n\n**All your integrations behind one endpoint**\n\nA DataGrout server multiplexes every integration you add behind a single MCP/JSONRPC URL. Your agents connect once and get access to all tools from all integrations — with a single credential, unified discovery, and consistent policy enforcement.\n\n---\n\n## How It Works\n\nAdd integrations to a server. Your agent connects to the server's endpoint. Every tool from every integration becomes available through that one URL.\n\n```\nAgent\n  └── connects to: gateway.datagrout.ai/servers/{uuid}/mcp\n        ├── salesforce@1/get_leads@1\n        ├── salesforce@1/create_opportunity@1\n        ├── quickbooks@1/create_invoice@1\n        ├── sap@1/get_purchase_orders@1\n        ├── data-grout@1/discovery.discover@1\n        └── ... (all tools from all integrations)\n```\n\nDataGrout handles authentication to upstream integrations transparently. Your agent carries one credential; DataGrout carries the rest.\n\n---\n\n## Tool Namespacing\n\nEvery tool is prefixed with its integration name and version to prevent collisions and make provenance clear:\n\n```\nsalesforce@1/get_lead@1\nquickbooks@1/create_invoice@1\nsap@1/get_purchase_orders@1\ndata-grout@1/discovery.discover@1\n```\n\nCall `tools/list` once to see every tool across all integrations. Call a tool by its full namespaced name and DataGrout routes it automatically.\n\n---\n\n## Setup\n\n### 1. Create a Server\n\nIn the server dropdown (top-left), select **Create New Server**. Give it a name and choose an auth method. You receive:\n\n```\nMCP endpoint:   https://gateway.datagrout.ai/servers/{uuid}/mcp\nJSONRPC endpoint: https://gateway.datagrout.ai/servers/{uuid}/rpc\n```\n\n### 2. Add Integrations\n\nGo to the **Home** page (the integrations marketplace) and click **Add** on any integration. OAuth integrations prompt you to authenticate. MCP server integrations take a URL and optional credentials.\n\nOnce added, the integration's tools immediately appear in your server.\n\n### 3. Connect Your Agent\n\n```python\nfrom datagrout.conduit import Client\n\nclient = Client(\n    \"https://gateway.datagrout.ai/servers/{uuid}/mcp\",\n    auth={\"bearer\": \"your-token\"},\n)\nawait client.connect()\n\n# All tools from all integrations\ntools = await client.list_tools()\n```\n\n---\n\n## Discovery Over the Multiplexed Surface\n\nWith hundreds of tools available, you rarely want your agent to reason over the full list. Use `discovery.discover` with a goal to find the right tool:\n\n```python\nmatches = await client.discover(goal=\"create an invoice for a customer\", limit=5)\n# Returns: quickbooks@1/create_invoice@1, xero@1/create_invoice@1, etc.\n```\n\nThe discovery engine works across all integrations simultaneously, ranked by semantic similarity to your goal.\n\n---\n\n## Advanced Features\n\n### Selective Tool Enabling\n\nEach integration has a list of its tools. Disable tools you don't need — only enabled tools appear in `tools/list` and discovery results. This keeps the surface focused and follows least-privilege principles.\n\nGo to **Integration → Tools** and toggle individual tools.\n\n### Dynamic Addition\n\nAdd a new integration while agents are connected. The new tools appear in `tools/list` on the next call — no agent reconfiguration needed.\n\n### Intelligent Interface\n\nFor agents that should never reason over the raw tool list, enable **Intelligent Interface** in server settings. This reduces `tools/list` to just `discovery.discover` and `discovery.perform`. The agent discovers tools by goal and executes them — never seeing the full catalog.\n\nSee [Intelligent Interface](intelligent-interface) for details.\n\n### Private and Cloud Hybrid\n\nCloud integrations (Salesforce, QuickBooks) and on-premise systems (SAP via Private Connector) appear side-by-side in the same multiplexed endpoint. The agent doesn't need to know the difference.\n\n---\n\n## Performance\n\n- Routing overhead: under 50ms per call\n- Tool list cached: 5 minutes (invalidated when integrations change)\n- Concurrent upstream calls: handled via connection pooling\n\n---\n\n## Related\n\n- [Discovery Tools](discovery-tools) -- Semantic search across the multiplexed surface\n- [Intelligent Interface](intelligent-interface) -- Reduce tools/list to just discover and perform\n- [Private Connectors](private-connectors) -- On-premise systems in the multiplexed endpoint\n- [Demultiplexing](demultiplexer) -- Broadcast one call across multiple servers\n"
}