{
  "markdown": "# Wikidata — Structured Knowledge Graph\n\nWikidata is the free, structured-data sister of Wikipedia. ~110 million items (people, places, works, concepts) with machine-readable properties and relationships. The closest thing the open web has to a universal knowledge graph. Free, no auth, supports SPARQL queries.\n\nPart of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1476+ live data sources.\n\n## Why this matters for AI agents\n\nFor entity disambiguation, structured facts about anything notable, or graph traversal (\"what books did this author write that won prizes?\"), Wikidata is the canonical open source. Pair with [Wikipedia](/docs/reference/wikipedia) (prose) and [OpenAlex](/docs/reference/openalex) (academic specifics) for full open-knowledge coverage.\n\nCommon flows:\n\n- **Entity lookup.** \"Who is Paul McCartney?\" → Q2599 with structured facts (birth date, nationality, occupation, band memberships).\n- **Property query.** \"What's the population of France?\" → Q142, property P1082 (population), with references and timestamps.\n- **Disambiguation.** \"Paris\" → Q90 (capital of France), Q830149 (Paris, Texas), Q3296 (Paris, Greek mythology). Wikidata's structured types resolve which \"Paris\" the agent is asking about.\n- **Graph traversal.** SPARQL: \"All Nobel laureates in Physics born in Italy\" → joinable across structured properties.\n\n## Tools\n\n| Tool | What it returns |\n|---|---|\n| `search_entities` | Q-ids matching a label or alias, with labels, descriptions and aliases. Start here when you have a name and need an id. |\n| `get_entity` | Full entity by Q-id — labels, descriptions, aliases, raw P-coded claims, sitelinks, plus `lastrevid` / `modified`. |\n| `get_wikidata_facts` | The same statements with property names and values resolved to human-readable labels, plus `lastrevid` / `modified`. Prefer this for \"what is X's <attribute>\". |\n| `wikidata_recent_changes` | Items created or edited most recently, newest-first, from `list=recentchanges` — Q-id, revision ids, UTC timestamp, user, comment, byte size, plus a `cursor` for paging further back. |\n\n### Pinning statements to an edit\n\nWikidata is live and continuously edited, so \"the current statements\" is only meaningful\nrelative to a revision. Both entity tools return `lastrevid`, `modified` and a\n`revision_url`, so an answer built from them can be pinned to the exact edit it was read\nat, and re-checked later for drift.\n\n`wikidata_recent_changes` answers the other half of that: which items changed, and when.\nNamespace `0` is items (Q-ids), `120` is properties (P-ids), `146` is lexemes. `type` is\n`new` (freshly created), `edit` (edits to existing items) or `all`. Use `since` for a time\nwindow and `cursor` to page further back.\n\n## Auth\n\nNone. Wikidata is fully open. Wikidata's SPARQL endpoint has fair-use rate limits but generous for most agent traffic.\n\n## Identifier scheme\n\n| Prefix | Type |\n|---|---|\n| Q | Item (an entity — person, place, thing) |\n| P | Property (a relationship type — \"spouse,\" \"instance of,\" \"located in\") |\n| L | Lexeme (a word/sense, for linguistic data) |\n\nEvery entity has a stable Q-number that serves as a permanent identifier across Wikipedia language editions. Embed Q-numbers in agent output as canonical citations.\n\n## Common pitfalls\n\n- **Quality varies wildly by entity.** A famous person (Einstein, Q937) has hundreds of well-sourced properties. A small-town politician may have 5 properties, half from auto-imported sources. Always check the `references` field on properties you're acting on.\n- **Multiple values for \"current\" properties.** \"President of company X\" may have 8 historical values plus a current one. Wikidata uses qualifier properties (start time, end time, \"preferred rank\") to indicate which is current — but agents often grab the first value naively.\n- **Property duplication.** Multiple properties can express related concepts (\"country\" P17, \"country of origin\" P495, \"country of citizenship\" P27). Picking the right one matters for accuracy.\n- **Vandalism risk.** Wikidata is editable like Wikipedia. High-profile entities are watched, but obscure ones can carry vandalism for days. Don't quote a single Wikidata fact as ground truth without a `references` chain to an authoritative source.\n- **Translation gaps.** Labels exist in many languages but not always in the language you queried. Default fallback to English (`en`) when label is missing.\n- **SPARQL timeouts.** Complex graph queries can hit the SPARQL endpoint's 60-second timeout. Decompose into smaller queries or use property-specific lookups.\n- **Identifiers, not facts.** Wikidata is best for \"what's the canonical ID of this entity\" and \"what does it link to.\" For deep biographical or historical narrative, follow the linked Wikipedia article.\n\n## Data sources\n\n- MediaWiki Action API — `https://www.wikidata.org/w/api.php`\n  - `action=wbsearchentities` (search), `action=wbgetentities` (entity read, `props=info|labels|descriptions|aliases|claims|sitelinks`)\n  - `action=query&list=recentchanges` (recent changes feed)\n- API docs: https://www.wikidata.org/w/api.php and https://www.mediawiki.org/wiki/API:Recentchanges\n- Entity pages: `https://www.wikidata.org/wiki/<QID>`; a specific revision: `https://www.wikidata.org/w/index.php?oldid=<revid>`\n\nAll endpoints are keyless. Wikidata asks callers to send a descriptive User-Agent; this\npack sends `Pipeworx-Wikidata-MCP/1.0`.\n\n## Quick Start\n\nAdd to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"wikidata\": {\n      \"url\": \"https://gateway.pipeworx.io/wikidata/mcp\"\n    }\n  }\n}\n```\n\n### What this endpoint actually serves\n\n`tools/list` at `https://gateway.pipeworx.io/wikidata/mcp` returns the tools in the table\nabove **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,\n`discover_tools`, `search_within`, `remember`/`recall` and the rest of the\ngateway-wide set. So the tool count you see is larger than this table: a\nsingle-pack endpoint currently lists roughly 30 shared tools alongside the\npack's own. The connection's `initialize` response states its exact scope, and\nis the authoritative answer for a given day.\n\nThis is deliberate, not multiplexing by accident. The meta-tools are what let a\nscoped connection answer a question this pack does not cover — via\n`ask_pipeworx`, which routes across the whole catalog — without you adding a\nsecond MCP server. There is currently no way to mount a pack endpoint without\nthem; if the extra schemas cost you more context than the routing is worth,\nconnect to the full gateway once rather than to several pack endpoints.\n\nOr connect to the full Pipeworx gateway to get every pack's tools listed\ndirectly, instead of just this one's:\n\n```json\n{\n  \"mcpServers\": {\n    \"pipeworx\": {\n      \"url\": \"https://gateway.pipeworx.io/mcp\"\n    }\n  }\n}\n```\n\nBoth URLs reach the same gateway and the same 1476+ data sources. The\nonly difference is which pack's tools are listed **directly**; `ask_pipeworx`\nreaches all of them from either one.\n\n## Using with ask_pipeworx\n\nInstead of calling tools directly, you can ask questions in plain English —\nthis works on the pack endpoint above as well as on the full gateway:\n\n```\nask_pipeworx({ question: \"your question about Wikidata data\" })\n```\n\nThe gateway picks the right tool and fills the arguments automatically.\n\n## More\n\n- [Docs and guides](https://pipeworx.io/docs)\n- [pipeworx.io](https://pipeworx.io)\n\n## License\n\nMIT\n",
  "bytes": 7454,
  "sha": "f4844afd16f05bd8d1fb2b9d27ee3e6987b8a7b267a58178ca7909f69e3851de",
  "repo_slug": "pipeworx-io/mcp-wikidata",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pipeworx_io_wikidata_8c03bd6e/readme"
}