SkillAgentSearch skills...

wikidata-mcp-server

Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers via MCP. STDIO or Streamable HTTP.

Install / Use

claude mcp add cyanheads -- npx -y github:cyanheads/wikidata-mcp-server

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

83/100

Category

Marketing

Supported Platforms

Claude Code
Claude Desktop

Our assessment of wikidata-mcp-server

wikidata-mcp-server scores 83/100 on our quality scale, 499th of 642 Marketing skills we index.

Its MCP Server is 15 KB long, well organised into 28 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated today, so wikidata-mcp-server is actively maintained.
  • Our last check on 2026-09-23 found the source still online.
  • It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-06. Automated pattern scan on 2026-10-06. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

wikidata-mcp-server compared with similar skills

All 4 of these similar skills score higher than wikidata-mcp-server; compare them before choosing.

SkillScoreStarsUpdatedFormat
wikidata-mcp-server (this skill)by cyanheads833todayMCP Server
Agent-Reachby Panniantong100112.3k8d agoCLAUDE.md
rufloby ruvnet10081.9ktodayCLAUDE.md
headroomby headroomlabs-ai10079.8ktodayCLAUDE.md
CowAgentby zhayujie10048.0ktodayCLAUDE.md

Frequently asked questions

How do I install wikidata-mcp-server?
Run claude mcp add cyanheads -- npx -y github:cyanheads/wikidata-mcp-server. The install tabs above show the steps for each supported agent.
Which AI agents does wikidata-mcp-server work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is wikidata-mcp-server safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is wikidata-mcp-server still maintained?
The repository was last updated today, so wikidata-mcp-server is actively maintained.
<div align="center"> <h1>@cyanheads/wikidata-mcp-server</h1> <p><b>Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers via MCP. STDIO or Streamable HTTP.</b> <div>7 Tools • 1 Resource</div> </p> </div> <div align="center">

Version License Docker MCP SDK npm TypeScript Bun

</div> <div align="center">

Install in Claude Desktop Install in Cursor Install in VS Code

Framework

</div> <div align="center">

Public Hosted Server: https://wikidata.caseyjhand.com/mcp

</div>

Overview

Wikidata's knowledge graph — entity search and lookup over the REST API v1, graph traversal via SPARQL against the Query Service, batch label resolution through MediaWiki, and external identifier resolution (DOI, PMID, ORCID, OpenAlex, IMDb). Search, fetch, and traverse entities from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.

Tools

| Tool | Description | |:---|:---| | wikidata_search_entities | Search for items or properties by text query, returning QIDs/PIDs with labels, descriptions, and match metadata | | wikidata_get_entity | Fetch a full entity by QID or PID with optional field and language filtering | | wikidata_get_labels | Batch-resolve up to 50 QIDs or PIDs to human-readable labels and descriptions | | wikidata_get_statements | Fetch property claims for an entity with qualifier detail and QID label resolution | | wikidata_get_sitelinks | Fetch Wikipedia and Wikimedia project article URLs for a Wikidata item | | wikidata_sparql_query | Execute a SPARQL SELECT query against the Wikidata Query Service | | wikidata_resolve_external_id | Look up a Wikidata entity by an external identifier (DOI, PubMed ID, ORCID, OpenAlex ID, etc.) |

Resources

| Resource | Description | |:---|:---| | wikidata://entity/{id} | Compact markdown summary of a Wikidata entity — labels, English description, instance-of, Wikipedia link, image, and statement count |

All resource data is also reachable via tools.

Capability reference

wikidata_search_entities <sub>tool</sub>

  • Searches labels, aliases, and descriptions
  • type="item" for real-world concepts (people, places, works); type="property" for predicate P-IDs
  • Language-aware results (BCP 47 language codes)
  • Offset-based pagination, up to 50 results per call
  • Returns match metadata indicating whether the hit was on a label or alias

wikidata_get_entity <sub>tool</sub>

  • Q-IDs (e.g. Q76) fetch items; P-IDs (e.g. P31) fetch properties — endpoint routing is automatic
  • fields parameter selects labels, descriptions, aliases, statements, or sitelinks
  • fields narrows the upstream fetch, not just the response — Q76 is 344,114 bytes whole, 6,703 for labels alone
  • languages parameter filters multilingual maps to specific language codes, client-side (the entity endpoint takes no language parameter)
  • An entity too large to inline returns a field-category outline with byte sizes instead of the data — follow its retrieval_notice: it names a literal fields set already measured to fit (category sizes are additive, so requesting every name listed would overflow again), defers the remainder to a further call, and redirects a category too large to deliver whole (statements or sitelinks on a major item) to the tool that can narrow it

wikidata_get_labels <sub>tool</sub>

  • Up to 50 IDs per call, batched via the MediaWiki wbgetentities API
  • Supports multiple language codes per request
  • Reports found count and notFound IDs for partial-result handling
  • Designed for the common agent pattern: run a SPARQL query, then humanize the QID results

wikidata_get_statements <sub>tool</sub>

  • properties parameter fetches only specific P-IDs — omit to return all statements
  • Value QIDs are resolved to human-readable labels by default via a batched label call
  • Set resolve_labels=false for raw QIDs only (faster, smaller payload)
  • A statement set too large to inline returns an outline of the available P-IDs with byte sizes, largest first, instead of the statements — re-call with properties for the ones you need (unfiltered, Q30 carries 467 properties across 1,717 statements)
  • Preferred-rank statements represent the most current values
  • Designed for fact verification: "what does Wikidata say about this entity's {property}?"

wikidata_get_sitelinks <sub>tool</sub>

  • Maps site codes (e.g., enwiki) to article titles and URLs
  • sites parameter filters to specific site codes
  • wikis_only=true returns only Wikipedia links (excludes Wiktionary, Wikiquote, Wikisource, etc.)
  • Major items can have 300+ sitelinks across languages
  • Only Q-IDs (items) have sitelinks — P-IDs are not supported

wikidata_sparql_query <sub>tool</sub>

  • Full graph power over the Wikidata Query Service (Blazegraph): multi-hop traversals, aggregations, subqueries, OPTIONAL, FILTER, UNION, BIND
  • Standard Wikidata prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:) are auto-injected
  • wikibase:label SERVICE auto-injected when language is set and the query uses ?<var>Label variables
  • Results in SPARQL 1.1 JSON format: each binding is { type, value, "xml:lang"? }
  • Hard server timeout is 60s; client-side timeout parameter (1–55s) applies earlier
  • Rate-limited at 60 requests/min and 5 concurrent requests per IP

wikidata_resolve_external_id <sub>tool</sub>

  • Common use cases: CrossRef DOI → QID (P356), PubMed PMID → QID (P698), ORCID → author QID (P496), OpenAlex ID → entity QID (P10283), IMDb ID (P345)
  • Automatic value normalization: surrounding whitespace trimmed, resolver URL prefixes stripped (https://doi.org/, https://pubmed.ncbi.nlm.nih.gov/, https://orcid.org/), DOIs uppercased, PMID prefixes stripped, ORCID hyphens normalized
  • The property's data type must be external-id — item-valued or media properties (e.g. P31, P18) are rejected rather than returning an empty match
  • Returns match=null when not found (the Query Service lags the live wiki, so a null is not proof of absence)
  • Returns multipleMatches when a Wikidata data integrity issue causes more than one entity to claim the same external ID
  • Designed for cross-server joins with pubmed-mcp-server, crossref-mcp-server, and openalex-mcp-server

wikidata://entity/{id} <sub>resource</sub>

  • Compact markdown summary — labels (all languages), English description, instance-of (P31), enwiki Wikipedia link, image (P18), and statement count
  • Returned as text/markdown; for full entity data, use wikidata_get_entity
  • id is a Q-ID or P-ID, the same identifiers the tools take

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

Wikidata-specific:

  • Wikidata REST API v1 for entity and statement fetches — no SPARQL overhead for lookup operations
  • MediaWiki wbgetentities API for efficient batch label resolution
  • Wikidata Query Service (Blazegraph) for SPARQL with auto-injected prefix headers and label SERVICE
  • Configurable User-Agent per Wikimedia policy (WIKIDATA_USER_AGENT)
  • Separate timeout configuration for REST and SPARQL endpoints (WIKIDATA_REST_TIMEOUT_MS, WIKIDATA_SPARQL_TIMEOUT_MS)

Agent-friendly output:

  • All tools echo relevant input parameters in the response for traceability
  • wikidata_get_labels designed to follow SPARQL result sets — run the query, then humanize in one call
  • wikidata_resolve_external_id returns multipleMatches instead of a false null when a Wikidata data-integrity issue puts duplicate claims on one external ID
  • Oversized entities and statement sets return a kind: "outline" payload — field/property sizes plus a retrieval_notice naming the exact re-call — instead of a truncated or oversized response

Getting started

Public Hosted Instance

A public instance is available at https://wikidata.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

{
  "mcpServers": {
    "wikidata-mcp-server": {
      "type": "streamable-http",
      "url": "https://wikidata.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file.

{
  "mcpServers": {
    "wikidata-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/wikidata-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "wikidata-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/wikidata-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "wikidata-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/wikidata-mcp-server:latest"]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/wikidata-mcp-server.git
  1. Navigate into the directory:
cd wikidata-mcp-server
  1. Install dependencies:
bun install
  1. Configure environment:
cp .env.example .env
# edit .env and set any overrides

Configuration

All configuration is validated at startup via Zod schemas. Key environment variables:

| Variable | Description | Default | |:---|:---|:---| | MCP_TRANSPORT_TYPE | Trans

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategoryMarketing
Updated19h ago
Forks2

Languages

TypeScript

Trust signals

92/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low
wikidata-mcp-server — MCP Server: Install & Safety Check | SkillAgent