1. Conduid
  2. Content
  3. WikidataMCP
MCP server · Content

WikidataMCP

Model Context Protocol for Wikidata

39Low

Scored 6 months ago · breakdown

About WikidataMCP

WikidataMCP is an MCP server in the Content category: model Context Protocol for Wikidata.

Install

From source
git clone https://github.com/wmde/WikidataMCP

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about WikidataMCP

Powered by Claude · Grounded in docs

I know everything about WikidataMCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Wikidata MCP

The Wikidata MCP (Model Context Protocol) provides a set of standardized tools that allow large language models (LLMs) to explore and query Wikidata programmatically. It is designed for agentic AI or AI workflows that need to search, inspect, and query Wikidata, without relying on hardcoded assumptions about its structure or content.

The Wikidata MCP server is running at https://wd-mcp.wmcloud.org/
You can connect your AI application to it at https://wd-mcp.wmcloud.org/mcp
Tools are exposed as API endpoints and can be tested interactively at https://wd-mcp.wmcloud.org/docs


🧰 Tools

  1. search_items(query: str, lang: str = "en") -> str
    Searches Wikidata items (QIDs) using vector search when available and falls back to keyword search when needed. Returns matching QIDs with labels and descriptions.

Use When: Starting exploration from a concept or natural-language description.

  1. search_properties(query: str, lang: str = "en") -> str
    Searches Wikidata properties (PIDs) using vector search when available and falls back to keyword search when needed. Returns matching PIDs with labels and descriptions.

Use When: You need to find the right Wikidata property for relationships in statements or SPARQL.

  1. get_statements(entity_id: str, include_external_ids: bool = False, lang: str = "en") -> str
    Returns direct statements (property-value pairs) for an entity in triplet-like text form. This tool excludes qualifiers, references, and deprecated values.

Use When: You want a fast structural overview of an entity.

  1. get_statement_values(entity_id: str, property_id: str, lang: str = "en") -> str
    Returns all statement values for an entity-property pair, including qualifiers, references, and all ranks.

Use When: You need full statement detail for auditing, fact-checking, or provenance-sensitive tasks.

  1. get_instance_and_subclass_hierarchy(entity_id: str, max_depth: int = 5, lang: str = "en") -> str
    Retrieves hierarchical context using "instance of" (P31) and "subclass of" (P279), returning JSON-formatted hierarchy data.

Use When: You need to understand entity classification before building filters in SPARQL.

  1. execute_sparql(sparql: str, K: int = 10) -> str
    Executes a SPARQL query against Wikidata and returns up to K rows as CSV text.

Use When: You want structured retrieval and verification from Wikidata Query Service.


🚀 Running Locally

Run:

uv run python main.py

Then open:

  • http://localhost:8000/ for project page
  • http://localhost:8000/docs for interactive Swagger UI
  • http://localhost:8000/mcp for MCP clients

With Docker:

docker compose up --build

🌐 Services

Vector Search

This service interfaces with the Wikidata Vector Database, enabling semantic search over Wikidata items using natural language. It is ideal for discovering relevant items without needing to know exact labels. This serves as a first step in exploratory or context-rich workflows.

🚀 API: wd-vectordb.wmcloud.org
📚 Docs: wd-vectordb.wmcloud.org/docs
📄 Project Page: Wikidata Embedding Project

Wikidata Textifier

This service returns readable triplet or textual representations of Wikidata entities, with resolved labels, optimized for use by language models.

🚀 API: wd-textify.wmcloud.org
📚 Docs: wd-textify.wmcloud.org/docs

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About WikidataMCP

How do I install WikidataMCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is WikidataMCP safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is WikidataMCP still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.