Wikidata MCP

Wikidata MCP

A server implementation for Wikidata API using the Model Context Protocol (MCP).

31
Stars
9
Forks
0
Releases

Overview

Wikidata MCP Server is a MCP-enabled server that provides tools to interact with Wikidata. It enables querying Wikidata through an MCP-based interface to search identifiers (entity and property), retrieve metadata (labels and descriptions), and execute SPARQL queries. The project exposes a set of MCP tools that map directly to common Wikidata actions and is designed to be integrated with large language models in MCP workflows. The README documents five tools: search_entity, search_property, get_properties, execute_sparql, and get_metadata. These tools let an LLM translate natural-language prompts into concrete Wikidata actions, such as identifying an entity by a query, discovering relevant properties, obtaining an entity's metadata, and running a SPARQL query to retrieve results. A sample workflow demonstrates querying for a film director, resolving the director property, executing a SPARQL query, and presenting a readable answer with metadata. The project supports installation via Smithery or manual setup and can run with uv run src/server.py, with an example client at uv run src/client.py. It is MIT licensed.

Details

Owner
zzaebok
Language
Python
License
MIT License
Updated
2025-12-07

Features

Search Wikidata Entity

Search for a Wikidata entity ID by its query.

Search Wikidata Property

Search for a Wikidata property ID by its query.

Get Entity Properties

Get the properties associated with a given Wikidata entity ID.

Get Metadata

Retrieve the English label and description for a given Wikidata entity ID.

Execute SPARQL Query

Execute a SPARQL query on Wikidata.

Audience

DevelopersIntegrate Wikidata querying into MCP-enabled LLM workflows for entity data.

Tags

WikidataMCPSPARQLentity searchproperty searchmetadata extractionlabeldescriptionWikidata API