
Wikidata Mcp Server
Connects Claude to Wikidata's 100+ million structured entities through seven tools and SPARQL access. You get entity search, full entity fetches with field filtering, batch label resolution for up to 50 QIDs at once, statement extraction with automatic label resolution, sitelink lookup across Wikipedia projects, and direct SPARQL queries against Blazegraph with auto-injected prefixes. The external ID resolver is built for cross-referencing: pass a DOI, PubMed ID, ORCID, or OpenAlex ID and get back the Wikidata QID. Runs locally via stdio or from a public HTTP endpoint. Reach for this when you need structured knowledge graph queries, fact verification against canonical data, or identifier mapping between research databases.
- GitHub stars
- 3
- tools
- 7
- transport
- STDIO, HTTP
- env vars
- 9
- last updated
- Oct 28, 2026
Install
From registry metadata$ npx add-mcp https://wikidata.caseyjhand.com/mcp --name wikidataRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http wikidata https://wikidata.caseyjhand.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 7 toolsVerified live against the running server on Nov 6, 2026.
wikidata_search_entitiesSearch Wikidata for items or properties by text query. Returns QIDs or PIDs with labels, descriptions, and match metadata indicating whether the hit was on a label or alias. Use type="item" for real-world concepts (people, places, works) and type="property" to find predicate P...5 params
Search Wikidata for items or properties by text query. Returns QIDs or PIDs with labels, descriptions, and match metadata indicating whether the hit was on a label or alias. Use type="item" for real-world concepts (people, places, works) and type="property" to find predicate P...
languagestringlimitintegeroffsetintegerquery*stringtypestringitem · propertydefault: itemwikidata_get_entityFetch a Wikidata entity (item or property) by QID or PID. The fields parameter narrows the upstream fetch, not just the response — asking for labels alone costs a fraction of the whole entity, so name the fields you need. Omit fields for all data; a well-connected item is larg...3 params
Fetch a Wikidata entity (item or property) by QID or PID. The fields parameter narrows the upstream fetch, not just the response — asking for labels alone costs a fraction of the whole entity, so name the fields you need. Omit fields for all data; a well-connected item is larg...
fieldsarrayid*stringlanguagesarraywikidata_get_labelsResolve one or more QIDs or PIDs to their human-readable labels and descriptions. Lightweight — returns no claim data. Supports up to 50 IDs per call (batched automatically). Designed for the common agent pattern: receive QIDs from a SPARQL query, then humanize them.2 params
Resolve one or more QIDs or PIDs to their human-readable labels and descriptions. Lightweight — returns no claim data. Supports up to 50 IDs per call (batched automatically). Designed for the common agent pattern: receive QIDs from a SPARQL query, then humanize them.
ids*arraylanguagesarraywikidata_get_statementsFetch property claims for a Wikidata entity with qualifier and reference detail. Item QIDs and quantity units — in values, qualifiers, and references — are resolved to human-readable labels by default. Use the properties parameter to fetch only specific P-IDs — omitting it ret...4 params
Fetch property claims for a Wikidata entity with qualifier and reference detail. Item QIDs and quantity units — in values, qualifiers, and references — are resolved to human-readable labels by default. Use the properties parameter to fetch only specific P-IDs — omitting it ret...
id*stringlanguagestringpropertiesarrayresolve_labelsbooleanwikidata_get_sitelinksFetch Wikipedia and Wikimedia project article URLs for a Wikidata item. A sitelink maps a site code (e.g., "enwiki") to a Wikipedia article title and URL. Major items can have 300+ sitelinks across languages. Use sites to filter to specific language editions, or wikis_only to...3 params
Fetch Wikipedia and Wikimedia project article URLs for a Wikidata item. A sitelink maps a site code (e.g., "enwiki") to a Wikipedia article title and URL. Major items can have 300+ sitelinks across languages. Use sites to filter to specific language editions, or wikis_only to...
id*stringsitesarraywikis_onlybooleanwikidata_sparql_queryExecute a SPARQL SELECT query against the Wikidata Query Service. Full graph power: multi-hop traversals, aggregations, subqueries, OPTIONAL, FILTER, UNION, BIND. Standard Wikidata prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:, rdfs:, schema:) are auto-injected. The wikiba...3 params
Execute a SPARQL SELECT query against the Wikidata Query Service. Full graph power: multi-hop traversals, aggregations, subqueries, OPTIONAL, FILTER, UNION, BIND. Standard Wikidata prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:, rdfs:, schema:) are auto-injected. The wikiba...
languagestringquery*stringtimeoutintegerwikidata_resolve_external_idLook up a Wikidata entity by an external identifier such as a DOI, PubMed ID, ORCID iD, or OpenAlex ID. Returns match=<entity> on success, match=null when not found, and match=null with multipleMatches populated when a Wikidata data integrity issue causes more than one entity...3 params
Look up a Wikidata entity by an external identifier such as a DOI, PubMed ID, ORCID iD, or OpenAlex ID. Returns match=<entity> on success, match=null when not found, and match=null with multipleMatches populated when a Wikidata data integrity issue causes more than one entity...
languagestringproperty*stringvalue*stringSponsors
Configuration
WIKIDATA_USER_AGENTdefault: wikidata-mcp-server/0.1 (https://github.com/cyanheads/wikidata-mcp-server)User-Agent string for Wikimedia requests. Wikimedia policy requires a descriptive value.
WIKIDATA_SPARQL_TIMEOUT_MSdefault: 55000Max time to wait for a SPARQL response in milliseconds.
WIKIDATA_REST_TIMEOUT_MSdefault: 10000Max time to wait for REST API responses in milliseconds.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPEdefault: httpSelects the HTTP transport.
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
Readme
@cyanheads/wikidata-mcp-server
Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers via MCP. STDIO or Streamable HTTP.
Details
- Repository
- github.com/cyanheads/wikidata-mcp-server
- Category
- Search & Web Crawling
- Package
@cyanheads/wikidata-mcp-server- Transport
- STDIO, HTTP
- Registry
- MCP registry, active
- Resources
- 4
- Tools verified
- Nov 6, 2026
More from cyanheads
- Worldbank Mcp Server3
- Mcp Ts Core153
- Arxiv Mcp Server7
- Bluesky Mcp Server2
- Fbi Crime Mcp Server2
- Fema Mcp Server2
- Imf Mcp Server2
- Nonprofit Explorer Mcp Server2
- Onebusaway Mcp Server2
- Openfec Mcp Server2
- Openfoodfacts Mcp Server2
- Reliefweb Mcp Server2
- Smithsonian Mcp Server2
- Stackexchange Mcp Server2
- Wsdot Mcp Server2
- Oecd Mcp Server4
- Socrata Mcp Server4
- Census Mcp Server3
- Who Gho Mcp Server3
- Bls Labor Mcp Server1
- College Scorecard Mcp Server1
- Cpsc Recalls Mcp Server1
- Cyanheads Mcp Server1
- Exchange Rates Mcp Server1