↗

For AI agents: Markdown docs, llms.txt, OpenAPI and MCP

The docs and the API are ready for AI: every page copies as Markdown, the specs are machine-readable, and agents can query events directly over MCP.

What MCP is

MCP (Model Context Protocol) is an open protocol for AI clients to call external tools. It is an API too, but the caller is the AI: once Claude, Cursor or a similar client connects to the MCP server it receives the tool list and parameter docs and queries as needed during a conversation, with no request code from you.

RESTMCPWebSocket
CallerYour codeAI clients (Claude, Cursor…)Your code
What it doesQuery historyQuery history (same data)Real-time push
AuthSame API keySame API keySame API key
Limit1 every 3sShared with REST1 connection(s) per key

Every MCP tool call (get_events, get_event, get_alerts, whoami) shares the key's REST limit, 1 call every 3 seconds in total; over the limit the tool returns a rate_limited error and the AI retries later. list_topics and get_schema do not count.

MCP server

Endpoint https://api.tokenearly.com/v1/mcp (Streamable HTTP). Authenticate with the Authorization: Bearer <key> header; trial keys work too. Every tool is read-only.

claude mcp add --transport http tokenearly https://api.tokenearly.com/v1/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
{
  "mcpServers": {
    "tokenearly": {
      "url": "https://api.tokenearly.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
{
  "mcpServers": {
    "tokenearly": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.tokenearly.com/v1/mcp",
        "--header",
        "Authorization:${TOKENEARLY_AUTH}"
      ],
      "env": {
        "TOKENEARLY_AUTH": "Bearer YOUR_API_KEY"
      }
    }
  }
}
curl -s https://api.tokenearly.com/v1/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_events","arguments":{"topics":"announcement.*","limit":3}}}'
ToolWhat it does
list_topicsList every subscribable topic (exchange announcements, news, signals and curated X (Twitter) KOL accounts) with id, type, source_id and names; with a key each topic also gets accessible. Same as REST GET /v1/topics; does not count against the rate limit.
get_eventsQuery structured events (exchange announcements, news, signals and posts from curated X (Twitter) KOLs), newest first by default. Same parameters as REST GET /v1/events; only the limit range differs. Shares the key's rate limit with REST.
get_eventFetch the latest revision of one event by id, like REST GET /v1/events/{id}. Counts against the rate limit.
get_alertsQuery this account's my alerts: what was actually pushed to you after your source, keyword, alert-language and delay settings, newest first. Different from get_events (every event of a topic). Same parameters as REST GET /v1/alerts; only the limit range differs. Requires the Developer API switch in the dashboard. Counts against the rate limit.
get_schemaJSON Schema of the event envelope and each data type, like REST GET /v1/schema. No key needed; does not count against the rate limit.
whoamiThe effective topics, limits, IP allowlist and access end date of the key in use, like REST GET /v1/me. Counts against the rate limit.
Try it · MCP
Get a trial key

Tool arguments

Arguments are checked strictly against each tool's definition, as REST does: an undefined argument, a missing required one, a wrong type or a value out of range returns JSON-RPC error -32602 (Invalid params) with the reason, without running the query or counting against the rate limit. get_events takes the same parameters as REST GET /v1/events except limit: over MCP it is 1–50, default 10.

list_topics

No arguments.

get_events

ArgumentTypeRequiredDefaultRangeDescription
topicsstringComma-separated, any combination (e.g. announcement.binance,news.*); each item is a topic or pattern: announcement.binance, announcement.*, news.*, signal.*, twitter.*, *. Omit for every topic your key can read.
limitinteger101–50How many events to return, 1–50, default 10 (REST allows 1–200). A value outside the range or not an integer is an invalid-params error (-32602).
afterstringReturn events newer than this event id, oldest first. Use it to catch up after a disconnect.
beforestringReturn events older than this event id, newest first. Use it to page backwards.
listings_onlybooleanfalseSet to true to return only exchange announcements classified as new listings (data.listing.is_listing = true); topics of other types return nothing. Works with after / before / updated_after. Because it filters on the classification, a page can hold fewer than limit events while has_more is still true: keep paging with next_cursor until has_more is false.
updated_afterinteger≥ 0Return events that got a new revision after this Unix time (seconds), even if the event itself is older, ordered by event id. Use it to pick up updates to older events missed while offline. To page, keep updated_after and pass the previous next_cursor as after. Cannot be combined with before. Omitting it or passing 0 means it is not used (a normal newest-first list).

get_event

ArgumentTypeRequiredDefaultRangeDescription
idstring✓Event id, as returned by the list endpoint.

get_alerts

ArgumentTypeRequiredDefaultRangeDescription
limitinteger101–50How many to return, 1–50, default 10; out of range is an invalid-params error.
afterstringOnly alerts after this alert id, oldest first.
beforestringOnly alerts before this alert id, newest first.

get_schema

No arguments.

whoami

No arguments.

Docs for AI to read

  • Every page has Copy Markdown at the top; you can also append .md to any docs URL for the plain-text version.
  • llms.txt: the docs index, for an AI to browse before reading what it needs.
  • llms-full.txt: all docs in one file, read in one go.

Machine-readable files: llms.txt, OpenAPI, AsyncAPI

These are the links at the bottom left of the docs. They are not pages for people but files for programs and AI: import them into tools to generate requests and client code, or let an AI understand the API.

FileUse
llms.txtDocs index (a list of Markdown links); an AI reads it first, then opens pages as needed
openapi.jsonOpenAPI 3.1: import into Postman, generate clients, configure GPT Actions
asyncapi.jsonAsyncAPI 3.0: stream message definitions
schemaJSON Schema: validate events, generate types

Prompt template

Hand this to an AI coding assistant; it reads the docs before writing code:

You are my coding assistant. First read the Tokenearly Developer API docs: https://tokenearly.com/en/developers/llms-full.txt
Then write a Python service that subscribes to announcement.* over WebSocket, handles only events where data.listing.is_listing is true, deduplicates on (id, revision), resumes with after on reconnect, and forwards titles to my Telegram group. Test it first with the trial key I got from the dashboard.