Wikidata MCP

v1.0.0Search & Data Extractionstable

Model Context Protocol for Wikidata

aillmmcpmodel-context-protocolwikidata
Share:
25
Stars
0
Downloads
0
Weekly
0/5

What is Wikidata MCP?

Wikidata MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol for wikidata

Model Context Protocol for Wikidata

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Model Context Protocol for Wikidata

Use Cases

Wikidata integration
Structured knowledge graph queries
Linked data access
wmde

Maintainer

LicenseBSD-3-Clause
Languagepython
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx wikidatamcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Wikidata MCP

WikidataMCP is a Model Context Protocol server built by Wikimedia Deutschland that gives AI assistants direct, structured access to Wikidata — the world's largest open knowledge graph with hundreds of millions of statements about entities, relationships, and facts. It exposes six tools covering vector and keyword search, statement retrieval, SPARQL query execution, and entity hierarchy exploration. Developers and researchers use it to ground AI responses in verifiable, linked open data without writing SPARQL from scratch.

Prerequisites

  • An MCP-compatible client such as Claude Desktop or any client supporting SSE/HTTP transport
  • No API key required — the server is hosted publicly at wd-mcp.wmcloud.org
  • Optional: Docker and Docker Compose if you want to self-host the server
  • Optional: uv and Python 3.11+ for local development
1

Choose hosted or self-hosted deployment

WikidataMCP is publicly hosted by Wikimedia Deutschland at wd-mcp.wmcloud.org/mcp — no installation required for most users. For self-hosting, clone the repo and use Docker Compose.

# Self-hosted option:
git clone https://github.com/wmde/WikidataMCP.git
cd WikidataMCP
docker compose up --build
2

Configure your MCP client to use the hosted endpoint

Add a remote MCP server entry pointing to the public Wikimedia-hosted endpoint. This uses the SSE or streamable-HTTP transport that most modern MCP clients support.

{
  "mcpServers": {
    "wikidata": {
      "url": "https://wd-mcp.wmcloud.org/mcp"
    }
  }
}
3

Verify the connection via the interactive docs

Open https://wd-mcp.wmcloud.org/docs in your browser to explore the available tools and test queries interactively before using them from Claude.

4

Test a basic entity search

In your MCP client, ask Claude to search for an entity using the search_items tool. This confirms the connection is working and returns Wikidata QIDs.

Wikidata MCP Examples

Client configuration

Connect Claude Desktop to the publicly hosted WikidataMCP endpoint via URL-based remote server configuration.

{
  "mcpServers": {
    "wikidata": {
      "url": "https://wd-mcp.wmcloud.org/mcp"
    }
  }
}

Prompts to try

Queries that exercise search_items, get_statements, execute_sparql, and get_instance_and_subclass_hierarchy tools.

- "Search Wikidata for items about Marie Curie and return her QID"
- "Get all statements for Wikidata entity Q7186 (Marie Curie) including qualifiers"
- "Run a SPARQL query to list all Nobel Prize winners in Physics with their birth dates"
- "Show the subclass hierarchy for 'chemical element' (Q11344) in Wikidata"
- "Find the Wikidata property ID for 'country of citizenship'"

Troubleshooting Wikidata MCP

MCP client cannot connect to the hosted URL

Ensure your MCP client supports URL-based (SSE or streamable-HTTP) remote servers. Claude Desktop 0.10+ supports this. If using an older client, self-host with Docker Compose and point to localhost instead.

SPARQL query times out or returns an error

Wikidata's SPARQL endpoint has a 60-second execution limit. Add LIMIT clauses to your queries (e.g., LIMIT 100) and use indexed properties (P31, P279, P569) in WHERE clauses to improve performance.

search_items returns unexpected or irrelevant entities

The tool uses vector search when available and falls back to keyword search. For ambiguous terms, include additional context in your query (e.g., 'Python programming language' rather than just 'Python') or use get_instance_and_subclass_hierarchy to disambiguate.

Frequently Asked Questions about Wikidata MCP

What is Wikidata MCP?

Wikidata MCP is a Model Context Protocol (MCP) server that model context protocol for wikidata It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Wikidata MCP?

Follow the installation instructions on the Wikidata MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Wikidata MCP?

Wikidata MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Wikidata MCP free to use?

Yes, Wikidata MCP is open source and available under the BSD-3-Clause license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "wikidatamcp": { "command": "npx", "args": ["-y", "wikidatamcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Wikidata MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides