Documentation

Four tools, available identically over MCP and REST. No key, no account, no signup.

Endpoints

SurfaceAddress
MCPPOST https://wikexa.com/mcp
RESTGET https://wikexa.com/v1/{lookup,article,search,recent}
StatusGET /v1/stats, GET /health
Machine docs/llms.txt, /openapi.json, /.well-known/mcp.json

MCP and REST call the same handlers, so behaviour cannot drift between them. Everything below applies to both.

lookup(entity)

The one you will use most. Returns structured facts plus a ~200-token summary.

curl -s 'https://wikexa.com/v1/lookup?entity=Ada%20Lovelace'
ParameterTypeNotes
entitystringRequired. Name, Wikipedia title, alias, or Wikidata Q-id.

Resolution tries the canonical title first, then an alias index built from Wikipedia redirects and Wikidata labels. The response reports which path matched in resolved_via (exact, alias or qid), so you can tell an exact hit from a fuzzy one.

Response

{
  "title": "Ada Lovelace",
  "wikidata_id": "Q7259",
  "description": "English mathematician (1815-1852)",
  "summary": "Augusta Ada King, Countess of Lovelace, was an English…",
  "infobox": { "born": "1815-12-10", "known_for": "…" },
  "facts": { "occupation": "mathematician", "citizenship": "United Kingdom" },
  "categories": ["English mathematicians", "…"],
  "related": ["Charles Babbage", "Analytical Engine", "…"],
  "section_titles": ["Biography", "Work", "…"],
  "resolved_via": "exact",
  "source_url": "https://en.wikipedia.org/wiki/Ada_Lovelace",
  "license": "Wikipedia text CC BY-SA 4.0; Wikidata facts CC0"
}

Empty fields are omitted rather than returned as null, so you never pay tokens for absent data.

article(title, sections?, max_chars?)

The full page as structured JSON, with the token dial in your hands.

ParameterTypeNotes
titlestringRequired. Same resolution as lookup.
sectionsstring[]Optional. Section names to include, matched case-insensitively as substrings.
max_charsintegerOptional. Cap on total section text returned.
# whole article
curl -s 'https://wikexa.com/v1/article?title=Aristotle'

# one section only
curl -s 'https://wikexa.com/v1/article?title=Aristotle§ions=Logic'

# hard cap
curl -s 'https://wikexa.com/v1/article?title=Aristotle&max_chars=2000'

When either filter applies, the response sets sections_filtered or truncated and lists every available section name in sections_available, so an agent can decide whether to ask for more. In REST, sections accepts a comma-separated list.

search(query, limit?)

For when you do not know the exact title.

ParameterTypeNotes
querystringRequired. Free text.
limitintegerOptional, 1–50, default 10.

Full-text relevance is blended with monthly pageviews and an exact-title bonus, and disambiguation pages are penalised. That is why apple returns Apple Inc. and the fruit rather than a list of stubs. Each result carries title, wikidata_id, description, summary_snippet and monthly_views.

recent(topic?, hours?, limit?)

Articles changed recently — the facts newer than your training cutoff.

ParameterTypeNotes
topicstringOptional. Case-insensitive filter on title or edit comment.
hoursintegerOptional, 1–168, default 24.
limitintegerOptional, 1–100, default 25.

Each change carries a title you can feed straight back into lookup().

Errors

REST returns 404 with a JSON body for a miss. Over MCP the same condition comes back as a normal result with isError: true — the transport worked, the entity simply was not found. Bodies look like:

{ "error": "not_found", "query": "…", "message": "…", "hint": "Try search(query)…" }

Response headers worth reading

HeaderMeaning
x-wikexa-cachehit, partial or miss at the edge.
x-wikexa-opsStorage operations the request cost, e.g. r2=0,kv=0.
x-wikexa-msServer-side time in milliseconds.

Attribution

Every response carries source_url and license. If you display article text, carry them through — CC BY-SA 4.0 requires attribution and share-alike. See Licensing.