> ## Documentation Index
> Fetch the complete documentation index at: https://hastekit.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Servers

> Attach Model Context Protocol servers to give an agent external tools and resources

[Model Context Protocol](https://modelcontextprotocol.io) servers expose tools and resources over a standard wire format. Attach one (or several) to an agent and every tool the server exposes becomes callable by the agent — no custom code.

<Frame>
  <img src="https://mintcdn.com/hastekit/890s5wy2NHvxQLSN/images/agent-builder/mcp-servers.png?fit=max&auto=format&n=890s5wy2NHvxQLSN&q=85&s=d233208b1610069fb94f026abc035ba2" alt="MCP Servers tab" width="3886" height="1618" data-path="images/agent-builder/mcp-servers.png" />
</Frame>

## Adding an MCP server

1. Open your agent → **Tools** tab → **MCP Servers** section.
2. Click **Add MCP Server**.
3. Configure the connection:

| Field                        | Description                                                                                                                                                                  |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Endpoint**                 | The MCP server URL.                                                                                                                                                          |
| **Transport**                | `Streamable HTTP` or `SSE`. Pick whichever your server speaks.                                                                                                               |
| **Headers**                  | Optional HTTP headers — typically used for auth (e.g. `Authorization: Bearer <token>`).                                                                                      |
| **Tool Filter**              | Optional. Comma-separated tool names to include. Empty = all tools exposed by the server are available.                                                                      |
| **Tools Requiring Approval** | Optional. Comma-separated tool names that must be confirmed by a human before execution. See [Human in the Loop](/docs/gateway/agent-builder/human-in-the-loop).                  |
| **Deferred Tools**           | Optional. Comma-separated tool names whose definitions are loaded only when the agent explicitly asks for them. See [Deferred Tools](/docs/gateway/agent-builder/deferred-tools). |

4. Save. The agent will now see those tools on its next run.

## Transports

* **Streamable HTTP** — modern transport; supports streaming responses over a single HTTP connection. Use this if your server supports it.
* **SSE** — Server-Sent Events. Fine for many existing servers, slightly older shape.

## Tool filtering

By default, every tool the MCP server advertises is exposed to the agent. For big servers (10+ tools), that can bloat the prompt and confuse the model. Two ways to trim:

* **Tool Filter** — explicit allowlist. Only the named tools are exposed.
* **Deferred Tools** — keeps definitions out of the system prompt until the agent calls `load_tool(name)`. Lets you attach huge tool catalogs without paying for them in every turn. See [Deferred Tools](/docs/gateway/agent-builder/deferred-tools).

## Approval gating

Mark any sensitive tool (delete, send, transfer, …) as **Requires Approval**. When the agent tries to call it, the run pauses and the tool call is queued for human review. See [Human in the Loop](/docs/gateway/agent-builder/human-in-the-loop) for the full workflow.

## Multiple servers

You can attach as many MCP servers as you need — internal corporate MCPs, third-party developer MCPs, single-purpose helpers. Each is configured independently and contributes its filtered tool set to the agent's combined tool catalog.

## Relation to other tool types

* [Connectors](/docs/gateway/agent-builder/connectors) — HasteKit-managed, first-class OAuth integrations (Gmail, Slack, Jira, …) with per-user authorization. Use these when you'd rather not run an MCP server.
* [API Servers](/docs/gateway/agent-builder/api-servers) — point at an OpenAPI 3.x spec and every operation becomes a tool. Use these when you control an HTTP API but don't want to wrap it in MCP.
* [Provider Tools](/docs/gateway/agent-builder/provider-tools) — built-in tools (image, speech, web search, etc.).
