Wikidata MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A server implementation for Wikidata API using the Model Context Protocol (MCP).
This project provides tools to interact with Wikidata, such as **searching identifiers** (entity and property), **extracting metadata** (label and description) and **executing sparql query**.
---
Installation
Installing via Smithery
To install Wikidata MCP Server for Claude Desktop automatically via Smithery:
Installing Manually
Install uv if it is not installed yet.
Then, install dependencies.
---
Run
Run the server with:
If you want to test it with a simple client code (with langchain-mcp-adapters), run the client with:
The LLM extracts valid entity and property identifiers, executes a sparql query, and finally recommend a movie directed by Bong Joon-ho.
See the execution output
---
Wikidata MCP Tools
The following tools are implemented in the server:
| Tool | Description |
| ---------------------------------------------------- | -------------------------------------------------------------------------- |
| search_entity(query: str) | Search for a Wikidata entity ID by its query. |
| search_property(query: str) | Search for a Wikidata property ID by its query. |
| get_properties(entity_id: str) | Get the properties associated with a given Wikidata entity ID. |
| execute_sparql(sparql_query: str) | Execute a SPARQL query on Wikidata. |
| get_metadata(entity_id: str, language: str = "en") | Retrieve the English label and description for a given Wikidata entity ID. |
---
License
MIT License