Skip to main content
The AnyAPI Model Context Protocol server lets an agent discover and run every API in the catalog through the same small set of tools.

Prerequisites

  • An AnyAPI key. Create one in the dashboard under API keys.
  • A funded USD wallet. run_api bills 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

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 to https://api.getanyapi.com/mcp. It declares no tools of its own, so catalog changes reach you without an upgrade.
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

Only run_api touches your wallet. The tools run on the same gateway as REST, so validation, routing, failover, pricing, and billing are identical.
Browse API summaries, optionally filtered by category. Summaries omit descriptions and schemas, so listing the whole catalog is cheap in tokens.InputReturns 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 by meaning and keyword across name, slug, and description. Matches include descriptions but not schemas.InputPass 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 the full definition of one API by SKU.InputReturns 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.
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.
Retrieve a durable Request by ID. It never repeats the paid operation.InputReturns the Request status and either its terminal result or a nextAction telling the agent when to call get_request again.
Requires an AnyAPI key; free. No input.Returns balanceUsd, the remaining wallet balance in USD.
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 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 and structuredContent 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.
The agent skill teaches your agent the workflow and cost discipline; MCP provides the live tools. Help: support@getanyapi.com.