Wikidata MCP Server

Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.

Remote serverstreamable-http

What is the Wikidata MCP Server?

Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.

The short version

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling across all tools
  • Pluggable auth (none, jwt, oauth)
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • Runs locally (stdio/HTTP) from the same codebase

What it needs from you

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
wikidata_search_entitiesSearch for items or properties by text query, returning QIDs/PIDs with labels, descriptions, and match metadata
wikidata_get_entityFetch a full entity by QID or PID with optional field and language filtering
wikidata_get_labelsBatch-resolve up to 50 QIDs or PIDs to human-readable labels and descriptions
wikidata_get_statementsFetch property claims for an entity with qualifier detail and QID label resolution
wikidata_get_sitelinksFetch Wikipedia and Wikimedia project article URLs for a Wikidata item
wikidata_sparql_queryExecute a SPARQL SELECT query against the Wikidata Query Service
wikidata_resolve_external_idLook up a Wikidata entity by an external identifier (DOI, PubMed ID, ORCID, OpenAlex ID, etc.)

How to install the Wikidata MCP Server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
MCP_HTTP_ENDPOINT_PATHFilesystem location the server is allowed to use.Optional
MCP_PUBLIC_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Wikidata to wikidata search entities.”
  • “Use Wikidata to wikidata get entity.”
  • “Use Wikidata to wikidata get labels.”

Frequently asked questions

Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.