Prerequisites
- An AnyAPI key. Create one in the dashboard under API keys.
- A funded USD wallet.
run_apibills it; discovery is free. - An MCP client that speaks Streamable HTTP, such as Claude Code, Claude Desktop, Cursor, or Codex.
The MCP surface accepts API keys only, not session tokens. Send
Authorization: Bearer <your-key>. initialize, tools/list, and the catalog tools
(list_apis, search_apis, get_api, quote_api) answer without a key. Running an API
and reading account data need the key; without one they return unauthorized. The same
catalog is public over REST at GET /catalog and GET /catalog/search.Connect
- Claude Code
- Claude Desktop
- Cursor
- Codex
- Any MCP client
Add the server with the CLI:Confirm it registered:
Run it locally over stdio
For clients that can only launch a local stdio server, AnyAPI publishes one that forwards every listing and call tohttps://api.getanyapi.com/mcp.
It declares no tools of its own, so catalog changes reach you without an upgrade.
- npx
- Claude Code
- Docker
ANYAPI_API_KEY is optional at startup: the catalog tools work without it. run_api and
the account tools need it.
The server is listed in the official MCP Registry
as io.github.getanyapi-com/anyapi, with the hosted endpoint and both packages. If your
client speaks remote Streamable HTTP, use the hosted endpoint instead; there is nothing to
install.
Tools
Onlyrun_api touches your wallet. The tools run on the same gateway as REST, so
validation, routing, failover, pricing, and billing are identical.
list_apis - browse the catalog
list_apis - browse the catalog
Browse API summaries, optionally filtered by category. Summaries omit descriptions and
schemas, so listing the whole catalog is cheap in tokens.Input
Returns
scrapers, an array containing id, slug, name, category,
provider, nested pricing, failover, and optional heavy and
excludesCallerDelay. failover reports whether AnyAPI currently has an alternate
route. Use search_apis for free-text queries and get_api for schemas.search_apis - find an API by intent
search_apis - find an API by intent
Search by meaning and keyword across name, slug, and description. Matches include
descriptions but not schemas.Input
Pass at least one of
query, category, or platform. category or platform
without query enumerates that scope, ordered by slug.Returns results with the list fields, including failover, plus description
and response-relative relevance, total before the limit, and ranking
(semantic or keyword). Lanes, health, schemas, latency, and eligibility are
omitted.get_api - inspect input and output schemas
get_api - inspect input and output schemas
Get the full definition of one API by SKU.Input
Returns the list fields, including
failover, plus description, anonymous lane
pricing, input/output JSON schemas, nullable latency, and optional tryEligible.
Lane health is omitted. Build the run_api payload from the input schema.latency describes successful end-to-end requests after AnyAPI failover over the
trailing 30 days:The value is
null when there are no observations or metrics could not be read. A p99
is an observation, not a maximum or a recommended timeout. If excludesCallerDelay is
true, add any wait your input requests to estimate wall-clock time.run_api - execute an API
run_api - execute an API
Execute an API by SKU. Requires an AnyAPI key and bills your USD wallet (see
Errors for what is free). Check
get_api latency before choosing a tool
deadline.InputThe last three keep a large result out of your context window.
costUsd still
reflects the full result.Returns the normalized output, provider (always AnyAPI), costUsd, items
(the number of results returned), and replayed. Most APIs are priced per result
(baseUsd + perUnitUsd × items), so a result cap in the input schema, when it declares
one, also caps cost. Simple lookups are flat per request. Invalid input and insufficient
funds are not charged. Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error message shows the amount charged.Duplicate calls are not charged twice. When a client re-issues the same tool call,
AnyAPI detects it automatically; you pass nothing.For long-running work, run_api waits briefly, then returns a Request ID with a
nextAction. Call get_request instead of repeating run_api.linkedin.ads_search may also return a date_adjusted: hint with the dates used
for your search. These dates remain unchanged on replay. See
LinkedIn ad date filters.get_request - resume durable work
get_request - resume durable work
Retrieve a durable Request by ID. It never repeats the paid operation.Input
Returns the Request status and either its terminal result or a
nextAction telling the
agent when to call get_request again.get_balance - check your wallet
get_balance - check your wallet
Requires an AnyAPI key; free. No input.Returns
balanceUsd, the remaining wallet balance in USD.report_bug - tell us something is broken
report_bug - tell us something is broken
Report wrong, empty, or malformed data for valid input, a misleading error, or a price or
schema that looks wrong. Free.
Returns the stored report
id. Pass request_id when you have one so you need not
paste the payload, then continue with your best alternative.send_feedback - tell us what is missing
send_feedback - tell us what is missing
Send feedback that is not a defect: a missing API or field, confusing docs, or what would
have made a task easier. Same fields as
report_bug; free.How an agent uses it
1
Discover
search_apis with a query such as “instagram” finds a SKU. list_apis browses instead.2
Inspect
get_api returns the input schema and observed latency.3
Run
run_api with the sku_id and input. AnyAPI routes, normalizes, and falls back on error.Worked example
Tool results carry a JSON text block andstructuredContent with these shapes:
list_apis returns the same fields without description or relevance, wrapped in
scrapers.
This API’s pricing.from.model is flat, so maxUsd is what one request is billed. A
linear offer instead carries unit (for example "result"), baseUsd, perUnitUsd,
maxUsd, and maxPer1kUsd; the charge is the base plus the per-unit amount, capped at
maxUsd. failover is authoritative; do not infer it from lanes. Show people
maxPer1kUsd as $0.90/1k req and read it rather than multiplying maxUsd; see
every static price in two denominations.
Errors
Tool failures come back as MCP tool errors with a short machine-readable prefix:
Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error message shows the amount charged.
A normalized empty result such as
found: false is a successful answer, not a tool error:
the thing does not exist, was removed or suspended, or the search matched nothing.
output.reason says which (not_found; suspended for a suspended account; too_long for a
video longer than a transcript API’s source can transcribe). A miss no
source billed is free. When AnyAPI asks more than one source, each source that charged is
billed at its price for that request, capped at the API’s published maximum. costUsd is the actual
charge, 0 when nothing was charged.