Connect your agent. Copy one thing.
One MCP server, https://api.threefold.eco/mcp, works in chat apps and coding agents.
Claude Code
claude mcp add --transport http --scope user threefold https://api.threefold.eco/mcp
To use an API key instead of browser sign-in:
claude mcp add --transport http --scope user threefold https://api.threefold.eco/mcp \
--header "Authorization: Bearer tf_live_your_key"Claude (claude.ai and Claude Desktop)
Add a custom connector with the URL https://api.threefold.eco/mcp. Claude registers itself with threefold (OAuth 2.1 dynamic client registration), then opens threefold's sign-in page (an emailed link) and a consent screen where you pick the workspace and scopes. threefold is not in the Connectors Directory yet, so add it by URL.
ChatGPT
In developer mode, create a custom app or connector with the URL https://api.threefold.eco/mcp and sign in when asked. The same OAuth 2.1 flow applies. threefold is not in the ChatGPT app directory yet.
Codex
~/.codex/config.toml:
[mcp_servers.threefold]
url = "https://api.threefold.eco/mcp"
With a key, add http_headers = { "Authorization" = "Bearer tf_live_your_key" } to the same section.
Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"threefold": {
"url": "https://api.threefold.eco/mcp"
}
}
}
Or open this install link in Cursor: cursor://anysphere.cursor-deeplink/mcp/install?name=threefold&config=eyJ0aHJlZWZvbGQiOnsidXJsIjoiaHR0cHM6Ly9hcGkudGhyZWVmb2xkLmVjby9tY3AifX0=
VS Code
User profile mcp.json (macOS ~/Library/Application Support/Code/User/mcp.json, Linux ~/.config/Code/User/mcp.json, Windows %APPDATA%\Code\User\mcp.json):
{
"servers": {
"threefold": {
"type": "http",
"url": "https://api.threefold.eco/mcp"
}
}
}Gemini CLI
~/.gemini/settings.json:
{
"mcpServers": {
"threefold": {
"url": "https://api.threefold.eco/mcp"
}
}
}Grok
At grok.com/connectors, add a custom connector with the URL https://api.threefold.eco/mcp and sign in.
Chat-app sign-in follows the MCP authorization spec (protected resource metadata, PKCE with S256, dynamic client registration, refresh and revocation) and passes our in-process tests. We have not yet recorded a test in each chat app.
OpenCode
~/.config/opencode/opencode.json:
{
"mcp": {
"servers": {
"threefold": {
"type": "remote",
"url": "https://api.threefold.eco/mcp"
}
}
}
}
For Cursor, VS Code, Gemini CLI and OpenCode, an API key goes in a headers object next to url: "headers": { "Authorization": "Bearer tf_live_your_key" }.
One command for coding agents
npx threefold mcp install
With no flags it writes a threefold entry for Claude Code, Codex, Cursor, Gemini CLI, OpenCode and VS Code. Pick one client with --client. Existing config files are copied to <file>.bak before they change, and running the command again changes nothing.
The installer's options
| Flag | What it does |
|---|---|
--client <name> | claude-code, codex, cursor, gemini, opencode, vscode or all (default) |
--key tf_live_… | Writes your API key into the entry as an Authorization: Bearer header |
--oauth | Writes the URL only; your client signs in through the browser |
--url <url> | Server URL (default https://api.threefold.eco/mcp) |
--dry-run | Prints what would change and writes nothing |
Without --key, the entry is just the server URL. The first request gets an OAuth challenge, and clients that support MCP authorization open a browser to sign in.
If npx threefold reports that the package does not exist, the npm package has not been published yet. Use the per-client settings below: they are exactly what the installer writes.
How it signs in
- Browser
- Your client opens threefold's sign-in page. You get an emailed link, then choose the workspace once. Chat apps use this.
- API key
- A
tf_live_…key as a Bearer header, for agents that run without you and for CI. - Sample key
- A
tf_test_…key answers with sample data, read only and never charged. For tests. - No account
- Add
?keyless=1to the address: library reads, up to 50 a day.
Or use the command line, REST or an SDK.
Library reads work without signing in.
CLI
Sign in once, and every command uses the saved login. Library reads also work without one.
npx threefold login # browser sign-in, refreshed automatically
npx threefold login --key tf_live_your_key # or save an API key instead
npx threefold discover "compare meditation apps in DE and JP"
npx threefold schema compare_markets
npx threefold call compare_markets --from de --to jp --niche health-fitnessThe npm package is not published yet, so these commands do not run today: use MCP, REST or an SDK. More in the CLI docs.
REST
Every tool is also an HTTP route. Library reads work without a key, up to the daily cap.
curl "https://api.threefold.eco/api/compare?from=de&to=jp&niche=health-fitness"
# with a key
curl "https://api.threefold.eco/api/compare?from=es&to=mx&niche=finance" \
-H "Authorization: Bearer tf_live_your_key"The OpenAPI document and llms.txt list every route. See the REST API docs, the API reference, or try a call in the Playground.
TypeScript
import { ThreefoldClient } from "@threefold/client";
const tf = new ThreefoldClient({ apiKey: process.env.THREEFOLD_API_KEY });
const comparison = await tf.compareMarkets({ from: "de", to: "jp", niche: "health-fitness" });
console.log(comparison.shared, comparison.localOnly);
Methods: libraryMeta, compareMarkets, searchApps, searchStore, topApps, getApp, marketBrief, b2bChecklist, searchPaidCreatives, searchOrganicPosts, trackApp, usage, plus get(path) and post(path, body) for any other route. Errors are ThreefoldError.
Python
from threefold import ThreefoldClient
with ThreefoldClient(api_key="tf_live_your_key") as tf:
comparison = tf.compare_markets("de", "jp", "health-fitness")
print(comparison["shared"])
Methods: library_meta, compare_markets, search_apps, search_store, top_apps, get_app, market_brief, b2b_checklist, search_paid_creatives, search_organic_posts, track_app, usage, plus get and post. Needs Python 3.9 or later; depends on httpx and pydantic.
Both clients are generated from the OpenAPI document, default to https://api.threefold.eco, and raise a typed error that carries the API's code, whose_error, retryable and hint. Use a tf_test_… key to run them against fixture data in tests.
The TypeScript package (@threefold/client) and the Python package (threefold) are not on npm or PyPI yet. Until they are, the REST examples on this page do the same job with any HTTP client.
Then ask it something.
It answers from the top charts of ten countries, every week.
Questions people ask.
Questions
What is the fastest way to connect threefold to Claude, ChatGPT or Cursor?
Add the remote Streamable HTTP MCP URL https://api.threefold.eco/mcp in your chat app or coding agent and complete the browser OAuth 2.1 sign-in. The npx threefold mcp install command, which configures supported coding agents for you, is built but not published yet, so it does not run today.
Can I try the MCP server or REST API without creating an account?
Yes. Append ?keyless=1 to the MCP URL (https://api.threefold.eco/mcp?keyless=1) or call read-only GET routes such as /api/compare and /api/chart directly. Keyless reads are capped at 50 requests per IP address per day by default.
Should CI and automated tests use a live key or a sandbox key?
Use a sandbox key (tf_test_…) in tests and CI pipelines. Sandbox keys are read-only, return deterministic fixture data, never contact upstream data suppliers and are never charged. Use a scoped tf_live_… key with a monthly spend cap for production workflows.
Do the MCP server, CLI, SDKs and REST API return the same data?
Yes. All four interfaces read from the same shared library and endpoint registry. The MCP server exposes four consolidated agent tools (app, market, check, workspace) that combine multiple library reads into a token-budgeted markdown digest with citations.
See what wins in every country.
Check your own app first. Then let your agent take it from there.