Wikidata Sparql
v0.2.1Wikidata SPARQL MCP — Wikidata Query Service
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
query
Run a SPARQL query against the Wikidata Query Service. Returns JSON bindings by default.
| Parameter | Type | Description |
|---|---|---|
format | string | json (default) | xml | csv | tsv | text/html |
query | string | Alias for `sparql`. |
sparql | string | SPARQL query text. Also accepts `query` as an alias. |
current_officeholder
Who currently holds a political office / leadership position for a place — answers "who is the current mayor of London", "who is the prime minister of Japan", "president of France", "governor of California", "who leads <city/country>". Give the place or organization name; returns the current head of government (mayor / premier / prime minister) and head of state (president / monarch) with their name and start date, from Wikidata. Coverage is best for countries and major cities; small municipalities may not be recorded.
| Parameter | Type | Description |
|---|---|---|
of * | string | The place or organization, e.g. "London", "Japan", "California", "São Paulo". Resolved to a Wikidata entity automatically. |
lang | string | Language for names (default en; use e.g. "pt" for Portuguese place/person names). |
instances_of
Convenience: list all items that are an instance of a Wikidata class.
| Parameter | Type | Description |
|---|---|---|
entity_id * | string | Class id (e.g. "Q5" = humans, "Q5398426" = TV series) |
lang | string | Language for labels (default en) |
limit | number | Max items (default 100, max 10000) |
subclasses_of
Return all subclasses of a Wikidata class via transitive P279 (subclass-of) traversal; takes a Wikidata entity id (e.g. Q11424) and returns labelled subclass items up to the specified limit.
| Parameter | Type | Description |
|---|---|---|
entity_id * | string | |
lang | string | |
limit | number |
properties_of
Convenience: all statements (property → value) about an entity.
| Parameter | Type | Description |
|---|---|---|
entity_id * | string | Item id (e.g. "Q42" = Douglas Adams) |
lang | string | |
limit | number |
entities_at
Geo-spatial query: items near a point. Use instance_of to filter by class.
| Parameter | Type | Description |
|---|---|---|
latitude * | number | |
longitude * | number | |
instance_of | string | Class id filter (e.g. "Q33506" = museum) |
lang | string | |
limit | number | |
radius_km | number | Search radius in km (default 1) |