Integrations / Frameworks & SDKs
Composio
MillionShort search as a Composio custom MCP toolkit, next to an agent's other apps.
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
Composio's Custom MCP feature turns a remote MCP server into a toolkit with a CUSTOM_ slug. You create the MillionShort toolkit once; Composio syncs its tools (search, get_domain_info, list_sources and the tools of the other endpoints; the MCP page lists them), and any session that names the toolkit can use them beside Composio's own toolkits. Composio calls our server; your app never holds your users' MillionShort keys.
Plans. A toolkit shared with every user of your Composio project (user_id="all") works on every Composio plan. A toolkit private to one user needs Composio's Pro plan; on the free plan, creating one returns 403.
1Install
pip install composio composio-openai-agents openai-agents
export MILLIONSHORT_API_KEY=ms-YOUR_API_KEYnpm install @composio/core @composio/openai-agents @openai/agents
export MILLIONSHORT_API_KEY=ms-YOUR_API_KEYThe Composio SDKs read your Composio key from COMPOSIO_API_KEY. The Python SDK needs Python 3.11 or later; the TypeScript SDK is ESM only. The examples use the OpenAI Agents SDK, as Composio's quickstart does; Composio has providers for other frameworks. Get a MillionShort key in the dashboard.
2Create the toolkit
Do this once per Composio project. With the API key mode, each user connects their own MillionShort key, and Composio puts it in the header where the code has generic_api_key:
from composio import Composio
composio = Composio() # reads COMPOSIO_API_KEY
toolkit = composio.custom_toolkits.create(
name="MillionShort",
mcp_url="https://mcp.millionshort.com/mcp",
auth_schemes=[
{
"mode": "API_KEY",
"headers": {"Authorization": "Bearer {{generic_api_key}}"},
"api_key_field": {"display_name": "MillionShort API key"},
}
],
user_id="all", # shared with every user of the project
)
print(toolkit.slug) # CUSTOM_MILLIONSHORTimport { Composio } from '@composio/core';
const composio = new Composio(); // reads COMPOSIO_API_KEY
const toolkit = await composio.customToolkits.create({
name: 'MillionShort',
mcpUrl: 'https://mcp.millionshort.com/mcp',
authSchemes: [
{
mode: 'API_KEY',
headers: { Authorization: 'Bearer {{generic_api_key}}' },
apiKeyField: { displayName: 'MillionShort API key' },
},
],
userId: 'all', // shared with every user of the project
});
console.log(toolkit.slug); // CUSTOM_MILLIONSHORTFor the no-key mode, use auth_schemes=[{"mode": "NO_AUTH"}] (authSchemes: [{ mode: 'NO_AUTH' }]): no one connects anything, and the tools sync at once. mcp_url, auth_schemes and user_id cannot be changed later; to change them, delete the toolkit and create it again.
3Give the tools to an agent
Name the toolkit in a session. With the API key mode, the user connects their key the first time (Composio's hosted page asks for it), and the tools sync when the first account connects. session.authorize gives you that link; the session's own connection tool can also offer it in the chat.
from agents import Agent, Runner
from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
composio = Composio(provider=OpenAIAgentsProvider())
session = composio.sessions.create(user_id="user_123", toolkits=["CUSTOM_MILLIONSHORT"])
connection = session.authorize("CUSTOM_MILLIONSHORT")
print("Connect your MillionShort key:", connection.redirect_url)
connection.wait_for_connection()
agent = Agent(
name="Researcher",
instructions="Use the MillionShort tools for anything recent or niche, and cite the URLs.",
model="gpt-5.2",
tools=session.tools(),
)
print(Runner.run_sync(agent, "Find independent blogs about home espresso.").final_output)import { Composio } from '@composio/core';
import { OpenAIAgentsProvider } from '@composio/openai-agents';
import { Agent, run } from '@openai/agents';
const composio = new Composio({ provider: new OpenAIAgentsProvider() });
const session = await composio.sessions.create('user_123', { toolkits: ['CUSTOM_MILLIONSHORT'] });
const connection = await session.authorize('CUSTOM_MILLIONSHORT');
console.log('Connect your MillionShort key:', connection.redirectUrl);
await connection.waitForConnection();
const agent = new Agent({
name: 'Researcher',
instructions: 'Use the MillionShort tools for anything recent or niche, and cite the URLs.',
model: 'gpt-5.2',
tools: await session.tools(),
});
console.log((await run(agent, 'Find independent blogs about home espresso.')).finalOutput);A session does not hand the model every tool up front: the agent finds the MillionShort tools through Composio's tool search (COMPOSIO_SEARCH_TOOLS) and runs them through the session. With a no-auth toolkit, leave out the three connection lines.
4Check it works
custom_toolkits.create prints the slug. After the first connection, run the agent: its run should include a MillionShort search call and an answer that cites pages. If the tools never synced (for example, the first sync failed), sync again with composio.custom_toolkits.sync("CUSTOM_MILLIONSHORT", connected_account_id=...). If the agent answers from memory, say when to search in its instructions:
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. Composio needs the final address, with no redirects and no key in the URL.
| 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 lists them | A few, such as places | What the API call behind each costs |
Settings
| Variable | Meaning |
|---|---|
MILLIONSHORT_API_KEY | Your own key, for trying the toolkit. In the API key mode, each user enters theirs on Composio's connection page; in the no-auth mode, no key is sent |
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.
In the API key mode, each user's searches count against their own key. A no-auth toolkit runs in the no-key mode, with its limits.
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 |
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 |
| Creating the toolkit returns 403 | A private toolkit (user_id set to one user) on a plan below Pro | Use user_id="all", or move to Composio's Pro plan |
| Creating the toolkit returns 409 | A shared toolkit for the same URL exists already | Use its slug, or delete it and create it again |
| The session has no MillionShort tools | No account has connected yet, so the tools have not synced | Connect a key with session.authorize, or sync the toolkit |
| The agent's tool search misses the tools | Composio's search can miss custom tools that synced | Name the tool in the prompt, or check the toolkit's tool list in Composio |
Related
- Agent tool use: when to give a model tools, and what to tell it.
- OpenAI Agents SDK: the same server connected straight from the SDK, without Composio.
- MCP server and Filters for agents.
- Composio's own documentation, read on 2026-11-19: Custom MCP, Quickstart, Authentication.