# wikidata-mcp-server

Connects an agent to Wikidata: entity search, SPARQL queries, external identifier lookups. No API key needed.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 399 installs · ★ 3 repo stars
- Author: cyanheads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cyanheads/wikidata-mcp-server
- Updated: 2026-10-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/wikidata-mcp-server

## What it does

The server exposes seven tools that read from Wikidata. Search entities by text, fetch a full record by QID or PID, batch-resolve up to 50 IDs into labels. Statement tools pull property claims with qualifiers and sitelinks to Wikipedia and other Wikimedia projects. `wikidata_resolve_external_id` turns a DOI, PMID, ORCID, OpenAlex or IMDb identifier into a Wikidata item.

SPARQL SELECT queries run against the Wikidata Query Service through `wikidata_sparql_query`. ASK, CONSTRUCT and DESCRIBE get rejected before they leave. Prefixes are added for you, and `?xLabel`-style variables resolve through the label service. Responses cap at 64,000 bytes, cut between rows, so big results need paging with `ORDER BY`, `LIMIT` and `OFFSET`. Rate limit sits at 60 requests per minute per IP.

No API key. Runs through `npx` or as a Docker image, with a public hosted endpoint available. A bundled `wikidata-guide` skill covers entity disambiguation, qualified statements and external identifiers. Watch out for oversized records: a large item returns field categories with byte sizes instead of data, and you then fetch only the fields you need through `fields`.

## Requirements
- Remote server: `https://wikidata-mcp-server--cyanheads.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http wikidata-mcp-server https://wikidata-mcp-server--cyanheads.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add wikidata-mcp-server --url https://wikidata-mcp-server--cyanheads.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "wikidata-mcp-server": {
            "url": "https://wikidata-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "wikidata-mcp-server": {
            "type": "http",
            "url": "https://wikidata-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http wikidata-mcp-server https://wikidata-mcp-server--cyanheads.run.tools
```

## When to use it
- find a QID by entity name
- read statements and qualifiers for an item
- list Wikipedia pages linked to an entity
- run a SELECT query against Wikidata Query Service
- map a DOI or PMID to its Wikidata item

## Example prompts
- Find the QID for the film Blade Runner on Wikidata
- Run a SPARQL query: cities with more than 5 million people
- Which DOI does the article linked to Q3813849 have?

## Similar
- [Quipu](https://affpapa.org/en/nevibecode/mcp/quipu.md) — MCP server · ★ 19 repo stars
- [entity-registry](https://affpapa.org/en/nevibecode/skills/entity-registry.md) — skill · 1100 installs
- [bgee-skill](https://affpapa.org/en/nevibecode/skills/bgee-skill.md) — skill · 13 installs
- [wikipedia-mcp-server](https://affpapa.org/en/nevibecode/mcp/wikipedia-mcp-server.md) — MCP server · 6422 installs
- [fedlex-mcp](https://affpapa.org/en/nevibecode/mcp/fedlex-mcp.md) — MCP server · ★ 7 repo stars
- [open-ontologies](https://affpapa.org/en/nevibecode/plugins/open-ontologies.md) — plugin · ★ 2941 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
