mcp-wikidata-sparql
Allows running SPARQL queries against the Wikidata Query Service, providing tools for querying entities, subclasses, properties, and geo-spatial data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-wikidata-sparqlshow properties of Q42"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@pipeworx/wikidata-sparql
Wikidata Query Service MCP — full SPARQL access to the entire Wikidata knowledge graph (~100M items, 1.5B statements). Complements the existing wikidata pack (which covers entity search + retrieval).
Part of Pipeworx — an MCP gateway connecting AI agents to 1476+ live data sources.
Tools
query(sparql, format?)— run a SPARQL queryinstances_of(entity_id, limit?)— convenience: all instances of a class (e.g. Q5 = humans)subclasses_of(entity_id, limit?)— convenience: subclass treeproperties_of(entity_id, limit?)— convenience: statements about an entityentities_at(latitude, longitude, radius_km?, instance_of?, limit?)— geo-spatial query: items near a point
Related MCP server: MCP Wikidata Server
No auth
The public WDQS at https://query.wikidata.org/sparql is keyless. Fair-use: ≤30 queries / min, ≤60 sec timeout per query. The pack sets a meaningful User-Agent (required by WMF policy).
Tips
Wikidata is enormous — narrow your queries! Use LIMIT, instance of filters, and language tags. Bring schema knowledge from https://www.wikidata.org/wiki/Wikidata:List_of_properties.
Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"wikidata-sparql": {
"url": "https://gateway.pipeworx.io/wikidata-sparql/mcp"
}
}
}What this endpoint actually serves
tools/list at https://gateway.pipeworx.io/wikidata-sparql/mcp returns the tools in the table
above plus the shared Pipeworx meta-tools — ask_pipeworx,
discover_tools, search_within, remember/recall and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's initialize response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
ask_pipeworx, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}Both URLs reach the same gateway and the same 1476+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one.
Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
ask_pipeworx({ question: "your question about Wikidata Sparql data" })The gateway picks the right tool and fills the arguments automatically.
More
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.
Wikidata MCP — wraps Wikidata API (wikidata.org/w/api.php)
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Related MCP Servers
- AlicenseAqualityFmaintenanceA server implementation for interacting with Wikidata API using the Model Context Protocol, providing tools for searching identifiers, extracting metadata, and executing SPARQL queries.548MIT
- AlicenseBqualityDmaintenanceProvides access to Wikidata for Large Language Models through the Model Context Protocol, offering tools for entity search, detailed retrieval, SPARQL queries, relation exploration, and property-based searches.54MIT
- FlicenseNot gradedqualityDmaintenanceConnects LLMs to Wikidata's structured knowledge base using a hybrid architecture that optimizes for both fast entity searches and complex relational queries. It provides tools for entity and property retrieval, metadata lookups, and direct SPARQL execution to ground AI responses in verified data.2-
- AlicenseNot gradedqualityCmaintenanceEnables programmatic queries against the OpenStreetMap database using the Overpass API.17MIT