# Vapi

MillionShort search for a Vapi voice assistant, as an MCP tool with the key in a header, from the dashboard or the API.

MCP · Dashboard and API · 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.

A Vapi MCP tool points an assistant at one MCP server. When a call or chat starts, Vapi asks the MillionShort server for its tools and gives them to the model: `search`, `get_domain_info`, `list_sources` and the tools of the other endpoints, such as `extract`, `places`, `map` and `crawl` ([the MCP page](https://millionshort.com/docs/mcp#tools) lists them all). Every tool call then opens its own short session with the server.

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. Vapi passes the whole result to the model without shortening it. Each search also adds a little latency to the turn it runs in.

## 1. Connect the server

In the Vapi dashboard:

1. Go to **Tools**, click **Create Tool**, and select **MCP**.
2. Under **Tool Settings**, enter a **Tool Name** (`MillionShort`) and a **Description** (`Web search`). These only identify the tool for you; the model sees the server's own tools.
3. Under **Server Settings**, set **Server URL** to `https://mcp.millionshort.com/mcp`. Leave **Timeout** at 20 seconds.
4. Under **HTTP Headers**, add `Authorization` with the value `Bearer ms-YOUR_API_KEY`. Leave it out for the no-key mode. Or select a saved Bearer token credential under **Authorization**, so the key is not in the tool itself.
5. Under **Messages**, click **Add Message** and set what the caller hears while a search runs, for example "Let me look that up."
6. Under **MCP Settings**, keep **Streamable HTTP** selected.
7. Save. Vapi asks the server for its tools and lists them under **Available Tools**.

## 2. Or create it with the API

Only `type` and `server.url` are required. The key goes in `server.headers`, or a saved credential's ID goes in `server.credentialId`:

```bash
curl -X POST https://api.vapi.ai/tool \
  -H "Authorization: Bearer $VAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mcp",
    "server": {
      "url": "https://mcp.millionshort.com/mcp",
      "timeoutSeconds": 20,
      "headers": { "Authorization": "Bearer ms-YOUR_API_KEY" }
    },
    "metadata": { "protocol": "shttp" },
    "messages": [{ "type": "request-start", "content": "Let me look that up." }]
  }'
```

Here VAPI_API_KEY is your Vapi private key. Creating the tool does not contact our server; the first request comes when a call or chat uses it. The answer carries the tool's `id`.

## 3. Give the tools to an assistant

Open your assistant, add the MCP tool to its tools, and publish. With the API, put the tool's ID in the assistant's `model.toolIds`:

```json
{
  "model": {
    "provider": "openai",
    "model": "gpt-4.1",
    "toolIds": ["YOUR_MCP_TOOL_ID"]
  }
}
```

Vapi puts the main part of the server's domain in front of each tool name, so the model sees `millionshort-search`, `millionshort-get_domain_info`, `millionshort-list_sources` and so on. Use those names in the system prompt:

> 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.

Vapi has no setting to offer only some of a server's tools, so the assistant gets every tool of the server (fewer in the no-key mode).

## 4. Check it works

After you save, **Available Tools** lists the server's 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. If the list is empty, check the URL and the header, save again and click refresh.

Then place a test call and ask a question that needs the web. On the call's page, **Messages** shows a `tool_calls` message for `millionshort-search`, followed by a `tool_call_result` message with what our server returned.

If the assistant 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.

## 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

| Field | Meaning |
|---|---|
| `server.headers` | `Authorization: Bearer ms-YOUR_API_KEY`. Leave it out for the no-key mode |
| `server.credentialId` | A saved Bearer token credential, in place of the header. A header named `Authorization` wins over the credential |
| `server.timeoutSeconds` | How long Vapi waits for each request to the server. The default, 20, is enough for a search |

## 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 |
| **Available Tools** stays empty, or the assistant says it cannot search | The tool list request failed when the call started; Vapi's call logs do not show this | Check the URL, `metadata.protocol` and the header. Do not put a Vapi variable in the `Authorization` header: variables are not filled in for the tool list |
| A search fails with a connection error | The URL or protocol is wrong, or the request took longer than the timeout | Use `https://mcp.millionshort.com/mcp` with `shttp`, and raise `server.timeoutSeconds` |
| The caller hears "Give me a moment" before each search | Vapi's default phrase plays when no `request-start` message is set | Set a `request-start` message |
| Long pauses before spoken answers | Many results or long text for the model to read | Ask for `num_results` 3 and `max_highlights` 1 in the system prompt |

## Related

- [ElevenLabs Agents](https://millionshort.com/docs/integrations/elevenlabs), [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).
- Vapi's own documentation, read on 2026-11-19: [MCP tools](https://docs.vapi.ai/tools/mcp), [Configure MCP tools](https://docs.vapi.ai/tools/mcp/configure), [Messages and results](https://docs.vapi.ai/tools/mcp/messages-and-results), [Troubleshooting](https://docs.vapi.ai/tools/mcp/troubleshooting).
