Menu

Integrations / Frameworks & SDKs

Letta

MillionShort search for Letta agents, registered as an MCP server in Python or TypeScript.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

MCPPython and TypeScriptNothing of ours to installWorks with no keyChecked 2026-11-19

Letta connects to MCP servers in two ways. With the Letta API client (the V1 SDK, Python and TypeScript), you register the MillionShort server once, and Letta's servers call it for any agent you attach its tools to. With the newer Letta Agent SDK (TypeScript only), your Node.js process connects to the server for one session. Either way the agent gets the server's tools (the MCP page lists them).

Letta marks the V1 SDK as legacy and recommends the Agent SDK for new work; the V1 SDK is the one with a Python client.

1Install

Choose one
Shell
pip install letta-client
export MILLIONSHORT_API_KEY=ms-YOUR_API_KEY

The second npm line is only for the Agent SDK session in step 3. The Letta clients read your Letta key from LETTA_API_KEY. Get a MillionShort key in the dashboard; an agent can ask for a trial key by itself.

2Register the server

Register MillionShort as a streamable HTTP server, then list its tools. Letta stores the key with the server and sends it as the Authorization header. Without a key, leave auth_header and auth_token out.

Choose one
Python
import os

from letta_client import Letta

client = Letta()  # reads LETTA_API_KEY

server = client.mcp_servers.create(
    server_name="millionshort",
    config={
        "mcp_server_type": "streamable_http",
        "server_url": "https://mcp.millionshort.com/mcp",
        "auth_header": "Authorization",
        "auth_token": f"Bearer {os.environ['MILLIONSHORT_API_KEY']}",
    },
)
tools = client.mcp_servers.tools.list(server.id)
for tool in tools:
    print(tool.name)  # search, get_domain_info, list_sources, ...

Letta's MCP page writes the tool list as mcp_servers.list_tools / mcpServers.listTools; in the current clients (1.12) it is mcp_servers.tools.list / mcpServers.tools.list, as above.

3Give the tools to an agent

Attach the tool ids when you create the agent, then send it a message:

Choose one
Python
from letta_client import Letta

client = Letta()
server = next(s for s in client.mcp_servers.list() if s.server_name == "millionshort")
tools = client.mcp_servers.tools.list(server.id)

agent = client.agents.create(
    name="researcher",
    model="openai/gpt-4.1",
    system="Use the millionshort search tool for anything recent or niche, and cite the URLs.",
    tool_ids=[tool.id for tool in tools],
)
response = client.agents.messages.create(agent.id, input="Find independent blogs about home espresso.")
for message in response.messages:
    print(message)

Or: a session in the Agent SDK

The Agent SDK (TypeScript only) takes MCP servers per session. Your process holds the connection, and the tools are named mcp__millionshort__search and so on:

TypeScript
import { LettaAgentClient } from '@letta-ai/letta-agent-sdk';

const client = new LettaAgentClient({ backend: 'cloud', apiKey: process.env.LETTA_API_KEY });
const agentId = await client.createAgent();

const session = client.resumeSession(agentId, {
  mcpServers: {
    millionshort: {
      type: 'http',
      url: 'https://mcp.millionshort.com/mcp',
      headers: { Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}` },
    },
  },
});
try {
  await session.send('Find independent blogs about home espresso, and cite the URLs.');
  for await (const message of session.stream()) {
    if (message.type === 'assistant') process.stdout.write(message.content);
  }
} finally {
  await session[Symbol.asyncDispose](); // closes the MCP connection
  await client.close();
}

Letta's docs write this with await using session = ..., which does the same disposal where your runtime supports it.

If you pass allowedTools, include mcp__millionshort__* in it, or the tools are hidden.

4Check it works

The tool list in step 2 should print search, get_domain_info, list_sources and the tools of the other endpoints (with no key, fewer, search and list_sources among them). Then run step 3: the agent's messages should include a call to search and an answer that cites pages. If the agent answers from memory, say when to search in 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.

ModeHowWhat the agent gets
API keySend Authorization: Bearer ms-YOUR_API_KEYEvery tool, at your plan's limits; calls use your credits
No keySend no Authorization headersearch, list_sources and a few more; one source and up to 5 results a search, 10 free searches a day

Tools

ToolWhat it doesWithout a keyCost
searchSearches the web and the specialist sources, with the popularity, domain, page-type, topic, site and date filtersYes: one source, up to 5 results1 credit per source searched, first 10 results
get_domain_infoPopularity and risk for up to 25 sitesNo1 credit
list_sourcesThe sources, page types and topics search acceptsYes: source namesFree
The tools of the other endpointsextract, map, crawl, places and more: the MCP page lists themA few, such as placesWhat the API call behind each costs

Settings

VariableMeaning
MILLIONSHORT_API_KEYYour key, read by the examples above. Leave the auth fields or 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 has the numbers.

When it fails

What you seeWhyFix
The server does not connect, or no tools are listedThe address or the transport is not the one the server speaksUse 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 upAdd a key: it is free in the dashboard
INSUFFICIENT_CREDITSThe plan's credits are used upStop and add credits; retrying does not help
The agent answers from memory, or uses another searchNothing told it when to use this oneTurn off its own search where it can be (this page says how), and add the line for its instructions
list_tools is not found on mcp_serversThe docs' method name is older than the clientUse client.mcp_servers.tools.list(server.id)
The agent never calls the toolsThe tool ids were not attached, or allowedTools leaves them outPass tool_ids when creating the agent, or add mcp__millionshort__* to allowedTools

This page as Markdown ยท llms.txt