Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 76
  • 3 stars
  • 194 a week
  • Apache-2.0
  • Updated

Install wikidata-mcp-server

Built from the published package, never by AI.

claude mcp add wikidata-mcp-server -- npx -y @cyanheads/wikidata-mcp-server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install wikidata-mcp-server in Claude Code

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
SettingNeededWhat it is
WIKIDATA_USER_AGENTEnvironment variableOptionalUser-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_SPARQL_TIMEOUT_MSEnvironment variableOptionalMax time to wait for a SPARQL response in milliseconds. Default: 55000
WIKIDATA_REST_TIMEOUT_MSEnvironment variableOptionalMax time to wait for REST API responses in milliseconds. Default: 10000
WIKIDATA_CLAMP_LIMITSEnvironment variableOptionalServe a count above its per-call cap at the cap, with a notice; false rejects it instead. Default: true
MCP_LOG_LEVELEnvironment variableOptionalSets 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

A

No 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 →
Supabase supabase
97

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.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

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.

AAA Local 1.3k
DBHubbytebase
94

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.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

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.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

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.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

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.

AAA Local 203k/wk

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.

wikidata-mcp-server Install

Add to stack

Loading.