# n8n

MillionShort search as a step in n8n, through the hosted MCP server or the API.

MCP · Hosted MCP server, nothing to install · Key in a form field · 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.

> **Node coming soon.** A MillionShort node for n8n is not published yet. Everything below works today without it.

## 1. Add the MCP server

For an **AI Agent** node: click **+** under **Tool**, choose **MCP Client Tool**, and set:

```text With a key
Endpoint:          https://mcp.millionshort.com/mcp
Server Transport:  HTTP Streamable
Authentication:    Bearer Auth
Credential:        a new Bearer Auth credential, Bearer Token = ms-YOUR_API_KEY
Tools to Include:  All
```

```text Without a key
Endpoint:          https://mcp.millionshort.com/mcp
Server Transport:  HTTP Streamable
Authentication:    None
```

The **Server Transport** field came with version 1.2 of the node; n8n's docs page still shows the older single SSE field, so these names come from the node itself.

## 2. Or call the API in an HTTP step

Anywhere in a workflow, an **HTTP Request** node:

```text HTTP Request node
Method:             POST
URL:                https://api.millionshort.com/v1/search
Authentication:     Generic Credential Type, Bearer Auth (Bearer Token = ms-YOUR_API_KEY)
Send Body:          on
Body Content Type:  JSON
Specify Body:       Using JSON
```

```json JSON
{"query": "{{ $json.query }}", "remove_top_sites": 1000, "num_results": 5}
```

In the next node, an expression reads the results from `$json.data.results`. Keep the key in the credential, not in the node: an exported workflow carries its nodes' fields.

## 3. Try it

Ask n8n's agent, or run the step with this as the query:

> Search MillionShort for forum threads about restoring a cast iron skillet, with the 1,000 most popular sites removed. List the five most useful with their links.

A good answer comes from a `search` call (the client shows the tool call) and links to pages you may not have seen before.

## 4. Tell it when to search

n8n's AI Agent has no search of its own and uses only the tools you attach, so say which search to use.

Add this line to the AI Agent node's **System Message**:

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

## 5. Check it works

In the MCP Client Tool node, switch **Tools to Include** to **Selected**: the server's tools are listed once the credential works. For the HTTP Request node, **Execute step** and read the output.

With a key you should see `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.

## The server

One address for every client: `https://mcp.millionshort.com/mcp`, streamable HTTP. A key is optional.

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

## 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 |
| Numbers arrive as strings | The node was made with **Import cURL**, which turns every value into a string | Set the body to **Using JSON**, as above |

## Related

- [MCP server](https://millionshort.com/docs/mcp): the address, every tool, and what the no-key mode allows.
- [Filters for agents](https://millionshort.com/docs/search/filters): what to ask `search` for, with recipes.
- More low-code builders: [Zapier](https://millionshort.com/docs/integrations/zapier), [Make](https://millionshort.com/docs/integrations/make), [Dify](https://millionshort.com/docs/integrations/dify), [Langflow](https://millionshort.com/docs/integrations/langflow), and [every integration](https://millionshort.com/docs/integrations).
- n8n's own documentation, read on 2026-11-19: [MCP Client Tool node](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/), [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/), [MCP Client Tool node (source)](https://github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/nodes/mcp/McpClientTool/McpClientTool.node.ts).
