# The Hub Endpoint

The Hub is a single MCP URL that gives your AI access to **every tool from every enabled MCP server** — no need to configure multiple endpoints.

```
https://mcp.mcpbundles.com/hub/
```

Enable an MCP server, and its tools instantly appear in the Hub. Disable it, and they disappear. One URL, all your tools.

## Hub vs MCP server endpoints

|                 | Hub (`/hub/`)                       | MCP server (`/bundle/{slug}`)   |
| --------------- | ----------------------------------- | ------------------------------- |
| **Scope**       | All enabled MCP servers             | Single MCP server               |
| **Tools**       | Everything you've enabled           | Only that MCP server's tools    |
| **Execution**   | Always Dynamic                      | Direct or Dynamic               |
| **Best for**    | Cross-service workflows             | Focused, single-domain work     |
| **Credentials** | Uses each MCP server's own bindings | Uses that MCP server's bindings |

Both are valid MCP endpoints. Use whichever fits your workflow.

## How it works

The Hub uses [Dynamic execution mode](/docs/concepts/execution-modes.md) — the same system that powers large MCP servers. Instead of dumping hundreds of tool definitions into your AI's context, the Hub starts with a small set of discovery and execution tools:

* **`list_connected_mcp_servers`** — See which MCP servers you have connected
* **`discover_mcp_servers`** — Find MCP servers you can add to your workspace
* **`describe_tool`** — Get the full schema for a specific tool before calling it
* **`code_execution`** — Run tools programmatically in a Python sandbox
* **`test_connected_mcp_server`** — Test that an MCP server's credentials are working
* **`health_check`** — Diagnose connectivity issues

Your AI discovers what it needs, executes it, and returns the result — without flooding context with tool definitions it won't use.

**Discovery split:** Inside the Hub’s `code_execution` sandbox, use `await list_tools("server-slug")` to list tools for one connected MCP server. The standalone Hub MCP tool **`describe_tool`** fetches a full schema when your client calls Hub meta-tools directly (outside the sandbox).

## The code execution model

When your AI needs to call a tool through the Hub, it writes Python code that runs in a sandboxed environment:

```
# Step 1: Choose a server, then list its tools
servers = await list_connected_mcp_servers(search="email")
tools = await list_tools("resend")

# Step 2: Call it — server parameter routes to the correct credentials
result = await resend_send_email_a1b(
    server="resend",
    to="team@example.com",
    subject="Weekly report",
    html="<p>Report attached.</p>"
)
print(result['data'])
```

Key rules:

* Every MCP server tool call requires a **`server` parameter** to route to the correct credentials
* Only **`print()` output** returns to the conversation — intermediate results stay in the sandbox
* Tool functions have unique hash suffixes (e.g., `resend_send_email_a1b`) — choose a server first, then discover the exact name with `list_tools`
* The sandbox has a **120-second timeout** per execution

This means your AI can chain multiple tools, transform data between calls, and return only the final result — keeping the conversation clean.

## Cross-service workflows

The Hub's real power is combining tools from different services in a single execution:

```
# Pull data from HubSpot, analyze with PostHog, send via Resend
contacts = await hubspot_list_contacts_f2c(server="hubspot-crm")
events = await posthog_get_events_d4a(server="posthog", person_id=contacts['data'][0]['id'])

summary = f"Contact has {len(events['data'])} events this week"
await resend_send_email_a1b(server="resend", to="sales@example.com", subject="Weekly sync", html=summary)
print("Done — email sent")
```

Each tool call uses that MCP server's own credential bindings (`server=` routes by MCP server slug; `bundle=` is a legacy alias with the same value). No credential conflicts, no manual routing.

## When to use Hub vs an MCP server endpoint

**Use the Hub when:**

* You want one URL configured in your AI client
* Your workflows span multiple services
* You prefer dynamic discovery over a fixed tool list

**Use an MCP server endpoint when:**

* You want a small, focused tool set (Direct mode — tools load instantly)
* You're building an Agent that only needs one service
* You want the simplest possible setup

You can use both at the same time — the Hub and individual `/bundle/{slug}` endpoints don't conflict.

## Setting up the Hub

1. **Connect MCP servers** — Open [**MCP Servers**](https://www.mcpbundles.com/w/%7Bworkspace%7D/bundles) (or the how-to [Choosing MCP Servers](/docs/how-to/choosing-bundles.md)), use **Directory** or search, **Connect** each server, and bind credentials on the server page
2. **Add credentials** — Each MCP server needs valid credentials for its providers before tools run
3. **Copy the Hub URL** — Available on your **MCP Servers** page or from `https://mcp.mcpbundles.com/hub/`
4. **Add to your AI client** — Paste the URL into Cursor, Claude Desktop, or any MCP-compatible client

See [Connecting Your AI](/docs/how-to/connecting-your-ai.md) for client-specific setup instructions.

## Related

* [Execution Modes (Direct vs Dynamic)](/docs/concepts/execution-modes.md) — How Dynamic execution works under the hood
* [Understanding MCP Servers](/docs/concepts/bundles.md) — What MCP servers are and how they're organized
* [Connecting Your AI](/docs/how-to/connecting-your-ai.md) — Client-specific setup guides
