wikidata-mcp-server
MCP server by cyanheads Community
Searches and fetches Wikidata entities, runs SPARQL SELECT queries, and resolves external identifiers such as DOI and ORCID. It is an MCP server for AI assistants that need Wikidata's knowledge graph.
Install wikidata-mcp-server
Built from the published package, never by AI.
claude mcp add wikidata-mcp-server -- npx -y @cyanheads/wikidata-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"wikidata-mcp-server": {
"args": [
"-y",
"@cyanheads/wikidata-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"wikidata-mcp-server": {
"args": [
"-y",
"@cyanheads/wikidata-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"wikidata-mcp-server": {
"args": [
"-y",
"@cyanheads/wikidata-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add wikidata-mcp-server -- npx -y @cyanheads/wikidata-mcp-server{
"mcpServers": {
"wikidata-mcp-server": {
"args": [
"-y",
"@cyanheads/wikidata-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install wikidata-mcp-server in Antigravity CLI
gemini mcp add wikidata-mcp-server npx -y @cyanheads/wikidata-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the wikidata-mcp-server block.
About
wikidata-mcp-server is an MCP server by cyanheads that gives AI assistants access to Wikidata's knowledge graph. It provides seven tools to search and fetch entities, read statements and sitelinks, batch-resolve labels, run SPARQL SELECT queries, and resolve external identifiers such as DOI, PMID, ORCID, OpenAlex and IMDb to Wikidata items. It runs over STDIO or Streamable HTTP and requires no API key.
Entity and statement lookups use the Wikidata REST API, label batches use the MediaWiki wbgetentities API, and SPARQL goes to the Wikidata Query Service. Oversized entities and statement sets return an outline with a notice on how to narrow the request. A public hosted instance is available, and a published wikidata-guide skill covers entity disambiguation, qualified statements and SPARQL. It suits users who want structured Wikidata data inside an AI assistant.
Written from the project's README and checked against it.
Tools it gives your assistant
wikidata_search_entitiesSearches items or properties by text query and returns QIDs or PIDs with labels and descriptions.wikidata_get_entityFetches a full entity by QID or PID, with optional field and language filtering.wikidata_get_labelsBatch-resolves up to 50 QIDs or PIDs to human-readable labels and descriptions.wikidata_get_statementsFetches property claims for an entity, with qualifiers and QID label resolution.wikidata_get_sitelinksFetches Wikipedia and Wikimedia project article URLs for a Wikidata item.wikidata_sparql_queryExecutes a SPARQL SELECT query against the Wikidata Query Service.wikidata_resolve_external_idLooks up a Wikidata entity by an external identifier such as a DOI, PubMed ID or ORCID.
What you need
- Node.js 24.0.0 or higher, or Bun v1.4.0 or higher, for local runs
- Docker, for the container image
- No API key required
| Setting | Needed | What it is |
|---|---|---|
WIKIDATA_Environment variable | Optional | User-Agent string for Wikimedia requests. Wikimedia policy requires a descriptive value. Default: wikidata-mcp-server/0.1 (https://github.com/cyanheads/wikidata-mcp-server) |
WIKIDATA_Environment variable | Optional | Max time to wait for a SPARQL response in milliseconds. Default: 55000 |
WIKIDATA_Environment variable | Optional | Max time to wait for REST API responses in milliseconds. Default: 10000 |
WIKIDATA_Environment variable | Optional | Serve a count above its per-call cap at the cap, with a notice; false rejects it instead. Default: true |
MCP_Environment variable | Optional | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). Default: info |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Find the Wikidata item for the DOI 10.1038/nature14539.
- Run a SPARQL query listing paintings by Vincent van Gogh with their labels.
- Show the statements for Q76 limited to the P31 and P106 properties.
Good to know
- SPARQL accepts SELECT queries only; ASK, CONSTRUCT, DESCRIBE and updates are rejected.
- SPARQL is rate limited to 60 requests per minute and 5 concurrent requests per IP.
- A null external ID result is not proof of absence, because the Query Service can lag the live wiki.
- Sitelinks support Q-IDs only, not P-IDs.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to wikidata-mcp-server
All alternatives →Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.
ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.
Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.
MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.
Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.
MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.
Compare with Supabase, ArcadeDB MCP Server or DBHub
wikidata-mcp-server: common questions
Does wikidata-mcp-server need an API key?
The source says no API key is required. It can be used through the hosted instance or run locally with npx.
Can it write changes to Wikidata?
The source describes read-oriented tools only. SPARQL updates are rejected, and no edit tool is listed.
What is the wikidata-guide skill?
It is a published guide covering entity disambiguation, qualified statements, external identifiers and SPARQL. It is included in plugin installs and served over MCP as skill://wikidata-guide/SKILL.md.
How do I install wikidata-mcp-server?
In Claude Code run claude mcp add wikidata-mcp-server -- npx -y @cyanheads/wikidata-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is wikidata-mcp-server the official server?
wikidata-mcp-server is a community project by cyanheads, not verified by a company domain.
Is wikidata-mcp-server free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is wikidata-mcp-server safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to wikidata-mcp-server?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does wikidata-mcp-server work with ChatGPT?
Yes. Add its server URL in ChatGPT as a custom connector. See MCP in ChatGPT.
