MCPSERV.CLUB
zzaebok

Wikidata MCP Server

MCP Server

Query Wikidata with Model Context Protocol

Stale(50)
29stars
2views
Updated 24 days ago

About

A lightweight server that exposes Wikidata API via MCP, enabling entity and property search, metadata extraction, and SPARQL query execution for LLM-powered applications.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Wikidata MCP Server Demo

The Wikidata MCP Server turns the vast, structured knowledge graph of Wikidata into a first‑class AI tool. By exposing a small but powerful set of tools—searching entities and properties, retrieving metadata, and running SPARQL queries—it allows language models to query real‑world facts on demand. For developers building conversational agents or data‑driven applications, this means the assistant can pull authoritative information directly from Wikidata without hard‑coding values or maintaining local copies of the graph.

At its core, the server implements four intuitive operations. locates a Wikidata entity ID that matches an arbitrary search string, enabling the model to resolve ambiguous names or nicknames. performs a similar lookup for property IDs, which are the keys that link entities to their attributes. then fetches all properties attached to a specific entity, providing the model with context about what can be queried further. Finally, runs arbitrary SPARQL against the live Wikidata endpoint, allowing complex joins and filters that would be cumbersome to express in plain text. Together, these tools give the assistant a robust interface for knowledge retrieval.

Real‑world use cases abound. A customer support bot can answer “What is the population of Paris?” by searching for the city entity, retrieving its population property, and returning the value. A recommendation engine might ask “Show me movies directed by Christopher Nolan” by searching for the director entity, looking up the relevant property ID, and executing a SPARQL query to list titles. Because all interactions happen through MCP, developers can embed the server into existing Claude or other LLM workflows with minimal friction—just register the tools and let the model orchestrate calls as needed.

The server’s design offers several standout advantages. It runs against the live Wikidata API, so data is always up‑to‑date without requiring local syncs. The toolset is deliberately small yet expressive, reducing the cognitive load for model designers while still enabling sophisticated queries. Moreover, the server’s sample client demonstrates how a language model can chain tool calls: searching for an entity, fetching its properties, discovering the appropriate property ID, and finally executing a tailored SPARQL query—all within a single conversation. This pattern exemplifies how MCP can turn static knowledge bases into dynamic, conversational resources that scale with the needs of modern AI applications.