Wikidata MCP — wraps Wikidata API (wikidata.org/w/api.php)
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add mcp-wikidata -- npx -y @pipeworx/mcp-wikidata{
"mcpServers": {
"mcp-wikidata": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-wikidata"]
}
}
}MCP Servers overview
# Wikidata — Structured Knowledge Graph
Wikidata 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.
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1684+ live data sources.
## Why this matters for AI agents
For 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.
Common flows:
- **Entity lookup.** "Who is Paul McCartney?" → Q2599 with structured facts (birth date, nationality, occupation, band memberships).
- **Property query.** "What's the population of France?" → Q142, property P1082 (population), with references and timestamps.
- **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.
- **Graph traversal.** SPARQL: "All Nobel laureates in Physics born in Italy" → joinable across structured properties.
## Tools
| Tool | What it returns |
|---|---|
| `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. |
| `get_entity` | Full entity by Q-id — labels, descriptions, aliases, raw P-coded claims, sitelinks, plus `lastrevid` / `modified`. Takes `language`. |
| `get_entities` | The same, for up to 50 Q-ids in ONE call. Returns a per-QID map plus a `not_found` list, so one bad id doesn't fail the batch — see "One bad id used to zero the batch" below. Takes `language`. |
| `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>". Takes `language`. |
| `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. |
### Reading labels in another language
`search_entities`, `get_entity`, `get_entities` and `get_wikidata_facts` all take
`language`. It is passed straight to the API's own `languages` param, so a single code
(`"ka"`) or a comma/pipe-joined list (`"ka,ru,en"`) both work, and a list returns every
requested language's label, description and aliases **side by side in one upstream call** —
the shape you need to decide whether two records in different languages are the same entity.
Omit it and you get English, exactly as before.
Two fields, and the difference matters:
- `labels` / `descriptions` / `aliases_by_language` are keyed by language and contain **only
what Wikidata actually has**. Ask for a language the entity has no label in and the key is
simply absent — that absence is the honest answer, and it is how you detect a translation gap.
- `label` / `description` are the single best value, and they **fall back to English** when the
requested language is missing. So `get_entity({id:"Q162887", language:"zu"})` returns
`label: "Enguri HPP"` with an empty `labels` map: there is no Zulu label, and you can tell.
`get_wikidata_facts` localizes both halves — property names and their values — so
`{id:"Q162887", language:"ka"}` comes back with Georgian keys (`ქვეყანა` → `საქართველო`),
not English keys with Georgian values.
**`mul` is a real language code here, and you will see it.** Wikidata moved
language-neutral labels — personal names, most Latin binomials, many place names — to
the `mul` ("multiple languages") code, and `wbgetentities` then returns an *empty* `en`
label map for those items. Q42 (Douglas Adams) is one: it has an English description and
no English label. The fallback chain is therefore **requested → `en` → `mul`**, and when
the name came from `mul` you see it under a `mul` key in the `labels` map:
```json
{"id":"Q42","label":"Douglas Adams","labels":{"mul":"Douglas Adams"},
"description":"British science fiction writer and humorist (1952–2001)"}
```
That key is the provenance: the name is not attributed to a language the entity does not
carry. Before this the pack returned `label: null` for Q42 — a clean 200 with a null
where the answer was.
### One bad id used to zero the batch
`wbgetentities` is inconsistent about unknown ids, and the two cases look nothing alike:
- An unknown but **well-formed** id (`Q999999999`) comes back marked `missing`, and every
other id in the request still resolves.
- An id **outside the item-id range** or plainly malformed (`Q99999999999`, `NOTAQID`)
makes the API refuse the **entire request** — HTTP 200, no `entities` at all, a
top-level `{"error":{"code":"no-such-entity","id":"Q99999999999"}}`.
Read naively the second case is an empty map, so one typo in a 50-id batch reported all
50 as `not_found`: a clean 200 saying nothing resolved. The error names the offending id,
so `get_entities` drops it and retries (bounded, one id per pass). A batch of
`["Q162887","Q99999999999","Q90","NOTAQID","Q1326165"]` now resolves the three real
entities and returns the two bad ids in `not_found`.
### Pinning statements to an edit
Wikidata is live and continuously edited, so "the current statements" is only meaningful
relative to a revision. Both entity tools return `lastrevid`, `modified` and a
`revision_url`, so an answer built from them can be pinned to the exact edit it was read
at, and re-checked later for drift.
`wikidata_recent_changes` answers the other half of that: which items changed, and when.
Namespace `0` is items (Q-ids), `120` is properties (P-ids), `146` is lexemes. `type` is
`new` (freshly created), `edit` (edits to existing items) or `all`. Use `since` for a time
window and `cursor` to page further back.
## Auth
None. Wikidata is fully open. Wikidata's SPARQL endpoint has fair-use rate limits but generous for most agent traffic.
## Identifier scheme
| Prefix | Type |
|---|---|
| Q | Item (an entity — person, place, thing) |
| P | Property (a relationship type — "spouse," "instance of," "located in") |
| L | Lexeme (a word/sense, for linguistic data) |
Every 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.
## Common pitfalls
- **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.
- **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.
- **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.
- **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.
- **Translation gaps.** Labels exist in many languages but not always in the one you asked for. `label` falls back to English, then to the language-neutral `mul` label, when that happens, so a non-English request never comes back empty — but it also means a returned `label` is not proof the entity HAS a label in that language. Read the `labels` map for that: a missing key is a real gap, and a `mul` key means the name is language-neutral rather than translated. See "Reading labels in another language" above.
- **SPARQL timeouts.** Complex graph queries can hit the SPARQL endpoint's 60-second timeout. Decompose into smaller queries or use property-specific lookups.
- **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.
## Data sources
- MediaWiki Action API — `https://www.wikidata.org/w/api.php`
- `action=wbsearchentities` (search), `action=wbgetentities` (entity read, `props=info|labels|descriptions|aliases|claims|sitelinks`, `languages=` for the language filter, up to 50 pipe-joined ids per call)
- `action=query&list=recentchanges` (recent changes feed)
- API docs: https://www.wikidata.org/w/api.php and https://www.mediawiki.org/wiki/API:Recentchanges
- Entity pages: `https://www.wikidata.org/wiki/<QID>`; a specific revision: `https://www.wikidata.org/w/index.php?oldid=<revid>`
All endpoints are keyless. Wikidata asks callers to send a descriptive User-Agent; this
pack sends `Pipeworx-Wikidata-MCP/1.0`.
## Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
```json
{
"mcpServers": {
"wikidata": {
"url": "https://gateway.pipeworx.io/wikidata/mcp"
}
}
}
```
### What this endpoint actually serves
`tools/list` at `https://gateway.pipeworx.io/wikidata/mcp` returns the tools in the table
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's `initialize` response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meWhat people ask about mcp-wikidata
What is pipeworx-io/mcp-wikidata?
+
pipeworx-io/mcp-wikidata is mcp servers for the Claude AI ecosystem. Wikidata MCP — wraps Wikidata API (wikidata.org/w/api.php) It has 0 GitHub stars and its last recorded update is dated 2026-09-26.
How do I install mcp-wikidata?
+
You can install mcp-wikidata by cloning the repository (https://github.com/pipeworx-io/mcp-wikidata) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is pipeworx-io/mcp-wikidata safe to use?
+
Our security agent has analyzed pipeworx-io/mcp-wikidata and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains pipeworx-io/mcp-wikidata?
+
pipeworx-io/mcp-wikidata is maintained by pipeworx-io. The last recorded GitHub activity is dated 2026-09-26, with 0 open issues.
Are there alternatives to mcp-wikidata?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-wikidata to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/pipeworx-io-mcp-wikidata)<a href="https://claudewave.com/repo/pipeworx-io-mcp-wikidata"><img src="https://claudewave.com/api/badge/pipeworx-io-mcp-wikidata" alt="Featured on ClaudeWave: pipeworx-io/mcp-wikidata" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
The fastest path to AI-powered full stack observability, even for lean teams.