# ElevenLabs Agents

MillionShort search for an ElevenLabs voice agent, as a custom MCP server with the key in a header, or as a webhook tool.

MCP · Dashboard, Python and TypeScript · Nothing of ours to install · Works with no key · Checked 2026-11-19

> **For agents.** Read the API key from the `MILLIONSHORT_API_KEY` environment variable. Never print it; where a client needs it in a settings file, use a file that is not committed.
> The MCP address is https://mcp.millionshort.com/mcp (streamable HTTP; send `Authorization: Bearer <key>`, or no header for the no-key mode).
> On `INSUFFICIENT_CREDITS` stop and ask a person; on `RATE_LIMITED` or `CAPACITY` wait the `Retry-After` seconds, then retry once.
> Set-up steps written for agents: https://millionshort.com/docs/auth.md. Every integration: https://millionshort.com/docs/integrations.md.

ElevenLabs agents connect to external MCP servers that you add to the workspace once and then attach to agents. Added that way, the MillionShort server gives the agent its tools ([the MCP page](https://millionshort.com/docs/mcp#tools) lists them). A webhook tool that calls the API is the other route, and the one to use where MCP is not available.

Spoken answers work best with few results: ask for `num_results` 3 and `max_highlights` 1, so the model reads short passages rather than long text. Each search also adds a little latency to the turn it runs in.

MCP is off by default in every ElevenLabs workspace, and ElevenLabs does not offer it to workspaces in Zero Retention Mode or with HIPAA compliance turned on.

## 1. Install

Nothing to install for the dashboard steps. For the API form, the ElevenLabs SDK:

```bash Python
pip install elevenlabs
export MILLIONSHORT_API_KEY=ms-YOUR_API_KEY
```

```bash TypeScript
npm install @elevenlabs/elevenlabs-js
export MILLIONSHORT_API_KEY=ms-YOUR_API_KEY
```

The SDKs read your ElevenLabs key from ELEVENLABS_API_KEY. Get a MillionShort key in the [dashboard](https://millionshort.com/app/).

## 2. Connect the server

In the dashboard:

1. Open the **MCP server integrations** dashboard (`elevenlabs.io/app/agents/integrations`) and click **Add Custom MCP Server**. The first time anyone in the workspace does this, ElevenLabs asks you to accept its MCP server terms, which turns MCP on for the whole workspace.
2. **Name**: `MillionShort`.
3. **Description**: `Web search, including sites beyond the most popular ones`.
4. **Server URL**: `https://mcp.millionshort.com/mcp`.
5. **HTTP Headers**: add `Authorization` with the value `Bearer ms-YOUR_API_KEY`. Leave it out for the no-key mode.
6. Click **Add Integration**. ElevenLabs saves the server, tests the connection and lists its tools.

ElevenLabs describes the optional **Secret Token** field only as "Authorization header value" and does not say whether it adds `Bearer ` itself, so these steps use **HTTP Headers**, where the value is sent as written.

Or with the API: create the server, then attach it to an agent. Set `transport` to STREAMABLE_HTTP, as below, because the API's default is SSE.

```python Python
import os

from elevenlabs import ElevenLabs

elevenlabs = ElevenLabs()

server = elevenlabs.conversational_ai.mcp_servers.create(
    config={
        "url": "https://mcp.millionshort.com/mcp",
        "name": "MillionShort",
        "description": "Web search, including sites beyond the most popular ones",
        "transport": "STREAMABLE_HTTP",
        "approval_policy": "auto_approve_all",
        "request_headers": {"Authorization": f"Bearer {os.environ['MILLIONSHORT_API_KEY']}"},
    },
)
elevenlabs.conversational_ai.agents.update(
    agent_id="YOUR_AGENT_ID",
    conversation_config={"agent": {"prompt": {"mcp_server_ids": [server.id]}}},
)
```

```ts TypeScript
import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';

const elevenlabs = new ElevenLabsClient();

const server = await elevenlabs.conversationalAi.mcpServers.create({
  config: {
    url: 'https://mcp.millionshort.com/mcp',
    name: 'MillionShort',
    description: 'Web search, including sites beyond the most popular ones',
    transport: 'STREAMABLE_HTTP',
    approvalPolicy: 'auto_approve_all',
    requestHeaders: { Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}` },
  },
});
await elevenlabs.conversationalAi.agents.update('YOUR_AGENT_ID', {
  conversationConfig: { agent: { prompt: { mcpServerIds: [server.id] } } },
});
```

`auto_approve_all` lets every tool of the server run without asking, `crawl`, `crawl_cancel` and `create_space` included; step 2 below says how to keep approval on those three.

A header value can also be a reference to a workspace secret, `{"secret_id": "..."}`, in place of the plain string. To turn MCP on for the workspace from code, call `conversational_ai.settings.update(can_use_mcp_servers=True)`.

## 3. Give the tools to an agent

1. Open your agent and add the **MillionShort** MCP server to it (the API form above has already done this).
2. Pick an approval mode. Most of the tools only read; `crawl` spends credits, `crawl_cancel` stops a crawl and `create_space` saves a Space. With **Fine-Grained Tool Approval** you can set each tool to **Auto-approved** or **Disabled**: auto-approve the read-only tools and keep approval on those three, or offer only `search`. The default, **Always Ask**, asks before every call.
3. In the agent's system prompt, say when to search and how to answer:

> Use the MillionShort search tool for anything recent, niche, or that needs a source, with num_results 3 and max_highlights 1. Answer in two or three short sentences and name the site you used.

## 4. Check it works

After **Add Integration**, the server's page lists its tools: with a key, `search`, `get_domain_info`, `list_sources` and the tools of the other endpoints ([the MCP page](https://millionshort.com/docs/mcp#tools) lists them); with no key, fewer, `search` and `list_sources` among them. Then talk to the agent and ask a question that needs the web: the answer should name pages it found.

If the agent answers from memory, add this line to its system prompt:

> Use the MillionShort `search` tool for anything recent, niche, or that needs a source. To reach lesser-known sites, set `remove_top_sites` (for example 1000). Cite the URLs it returns.

## Without MCP: a webhook tool

A webhook tool calls `POST /v1/search` directly and fixes the result count, so the agent cannot ask for more than a spoken answer needs.

In the dashboard, in the **Agent** section of the agent's settings, choose **Add Tool**, then **Webhook** as the tool type:

1. **Name**: `millionshort_search`.
2. **Description**: `Search the web for current or niche information. Returns titles, links and short passages.`
3. **Method**: `POST`. **URL**: `https://api.millionshort.com/v1/search`.
4. Add a header `Authorization`, choose **Secret** as its type, click **Create New Secret** and store the whole value, `Bearer ms-YOUR_API_KEY`.
5. Add a body parameter: data type `string`, identifier `query`, value type `LLM Prompt`, description `What to search for`.

The dashboard pages we read do not show how to set a fixed body value, so the dashboard tool leaves `num_results` at the API's default. The API form sets fixed values with `constant_value`:

```python Python
import os

from elevenlabs import ElevenLabs, ToolRequestModel

elevenlabs = ElevenLabs()

tool = elevenlabs.conversational_ai.tools.create(
    request=ToolRequestModel(
        tool_config={
            "type": "webhook",
            "name": "millionshort_search",
            "description": "Search the web for current or niche information. Returns titles, links and short passages.",
            "api_schema": {
                "url": "https://api.millionshort.com/v1/search",
                "method": "POST",
                "request_headers": {"Authorization": f"Bearer {os.environ['MILLIONSHORT_API_KEY']}"},
                "request_body_schema": {
                    "type": "object",
                    "required": ["query"],
                    "properties": {
                        "query": {"type": "string", "description": "What to search for"},
                        "num_results": {"type": "integer", "constant_value": 3},
                        "max_highlights": {"type": "integer", "constant_value": 1},
                        "remove_top_sites": {"type": "integer", "constant_value": 1000},
                    },
                },
            },
        }
    )
)
elevenlabs.conversational_ai.agents.update(
    agent_id="YOUR_AGENT_ID",
    conversation_config={"agent": {"prompt": {"tool_ids": [tool.id]}}},
)
```

## MCP configuration

The same address for every client: `https://mcp.millionshort.com/mcp`, streamable HTTP.

| Mode | How | What the agent gets |
|---|---|---|
| API key | Send `Authorization: Bearer ms-YOUR_API_KEY` | Every tool, at your plan's limits; calls use your credits |
| No key | Send no `Authorization` header | `search`, `list_sources` and a few more; one source and up to 5 results a search, 10 free searches a day |

## Tools

| Tool | What it does | Without a key | Cost |
|---|---|---|---|
| `search` | Searches the web and the specialist sources, with the popularity, domain, page-type, topic, site and date filters | Yes: one source, up to 5 results | 1 credit per source searched, first 10 results |
| `get_domain_info` | Popularity and risk for up to 25 sites | No | 1 credit |
| `list_sources` | The sources, page types and topics `search` accepts | Yes: source names | Free |
| The tools of the other endpoints | `extract`, `map`, `crawl`, `places` and more: [the MCP page](https://millionshort.com/docs/mcp#tools) lists them | A few, such as `places` | What the API call behind each costs |

## Settings

| Variable | Meaning |
|---|---|
| `MILLIONSHORT_API_KEY` | Your key, read by the API examples above. In the dashboard, type it into the header value. Leave the header out for the no-key mode |

## Costs and limits

A tool call costs what the API call behind it costs: 1 credit per source searched for the first 10 results, 1 credit for a domain lookup, nothing for the list of sources, the price of the endpoint for the other tools, and nothing at all in the no-key mode. An agent that loops can make many calls: give it a step limit, and ask for fewer results when a few will do. [Credits and limits](https://millionshort.com/docs/credits-and-limits) has the numbers.

## When it fails

| What you see | Why | Fix |
|---|---|---|
| The server does not connect, or no tools are listed | The address or the transport is not the one the server speaks | Use exactly `https://mcp.millionshort.com/mcp` and the streamable HTTP transport (often called `http`), not SSE |
| `401` or "unauthorized" | The key is wrong, or it was sent without `Bearer ` | Send `Authorization: Bearer ms-...`, or leave the header out to use the no-key mode |
| "10 free searches a day without a key" | The no-key mode's daily searches are used up | Add a key: it is free in the [dashboard](https://millionshort.com/app/) |
| `INSUFFICIENT_CREDITS` | The plan's credits are used up | Stop and add credits; retrying does not help |
| The agent answers from memory, or uses another search | Nothing told it when to use this one | Turn off its own search where it can be (this page says how), and add the line for its instructions |
| You cannot add an MCP server | MCP is off for the workspace, or the workspace is in Zero Retention Mode or HIPAA mode | Accept the MCP server terms in the dashboard, or use the webhook tool |
| The server added with the API lists no tools | The API connects over SSE unless told otherwise | Set `transport` to STREAMABLE_HTTP |
| The agent asks for permission before each search | The approval mode is **Always Ask**, the default | Choose **No Approval**, or auto-approve `search` with **Fine-Grained Tool Approval** |
| Long pauses before spoken answers | Many results or long text for the model to read | Ask for `num_results` 3 and `max_highlights` 1, or use the webhook tool with fixed values |

## Related

- [Vapi](https://millionshort.com/docs/integrations/vapi), [LiveKit Agents](https://millionshort.com/docs/integrations/livekit-agents) and [Pipecat](https://millionshort.com/docs/integrations/pipecat): the same server in other voice agents.
- [Agent tool use](https://millionshort.com/docs/search/guides/agent-tool-use): when to give a model tools, and what to tell it.
- [MCP server](https://millionshort.com/docs/mcp) and [Filters for agents](https://millionshort.com/docs/search/filters).
- ElevenLabs' own documentation, read on 2026-11-19: [Model Context Protocol](https://elevenlabs.io/docs/eleven-agents/customization/tools/mcp), [Create MCP server](https://elevenlabs.io/docs/eleven-agents/api-reference/mcp/create), [Webhook tools](https://elevenlabs.io/docs/eleven-agents/customization/tools/webhook-tools), [Create tool](https://elevenlabs.io/docs/eleven-agents/api-reference/tools/create).
