WikidataMCP
by wmde·★ 24·Score 43
MCP server providing standardized tools to explore and query Wikidata programmatically for AI applications.
Overview
The Wikidata MCP server offers a comprehensive set of tools designed for AI agents and workflows to interact with Wikidata. It includes vector search capabilities for finding entities and properties, statement retrieval for detailed entity information, hierarchy exploration for understanding relationships, and SPARQL query execution for structured data retrieval. The server is well-documented with clear examples and usage guidelines.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose WikidataMCP when your AI application needs to explore and query Wikidata programmatically, especially when leveraging semantic search or SPARQL queries.
When NOT to choose this
Don't choose this if you need write access to Wikidata (this is read-only) or if you require more comprehensive Wikidata integration beyond query capabilities.
Tools this server exposes
6 tools extracted from the READMEsearch_itemssearch_items(query: str, lang: str = "en") -> strSearches Wikidata items using vector search, returning QIDs with labels and descriptions.
search_propertiessearch_properties(query: str, lang: str = "en") -> strSearches Wikidata properties using vector search, returning PIDs with labels and descriptions.
get_statementsget_statements(entity_id: str, include_external_ids: bool = False, lang: str = "en") -> strReturns direct statements for an entity in triplet-like text form.
get_statement_valuesget_statement_values(entity_id: str, property_id: str, lang: str = "en") -> strReturns all statement values for an entity-property pair including qualifiers and references.
get_instance_and_subclass_hierarchyget_instance_and_subclass_hierarchy(entity_id: str, max_depth: int = 5, lang: str = "en") -> strRetrieves hierarchical context using 'instance of' and 'subclass of' relationships.
execute_sparqlexecute_sparql(sparql: str, K: int = 10) -> strExecutes a SPARQL query against Wikidata and returns up to K rows as CSV.
Comparable tools
Installation
Installation
- Run locally:
uv run python main.py- Using Docker:
docker compose up --build- Connect to the public server:
- Server: https://wd-mcp.wmcloud.org/
- MCP endpoint: https://wd-mcp.wmcloud.org/mcp
Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"wikidata": {
"command": "curl",
"args": ["https://wd-mcp.wmcloud.org/mcp"]
}
}
}FAQ
- What search capabilities does this MCP server provide?
- The server offers both vector search and keyword search for finding Wikidata items (QIDs) and properties (PIDs), with fallback capabilities when vector search isn't available.
- Can I execute custom SPARQL queries with this server?
- Yes, the server includes an execute_sparql tool that allows running custom SPARQL queries against Wikidata, returning results as CSV text.
Compare WikidataMCP with
Last updated · Auto-generated from public README + GitHub signals.