Mcp Wikidata

by zzaebok

47 274 downloads Not rated yet MIT
GitHub

About

A server implementation for Wikidata API using the Model Context Protocol (MCP).

Details

License
MIT

Explore

- Search for a Wikidata entity ID by query string.
- Search for a Wikidata property ID by query string.
- Retrieve all properties associated with a given entity ID.
- Execute arbitrary SPARQL queries on Wikidata.
- Fetch the label and description for an entity in a specified language.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Wikidata
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To install Wikidata MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @zzaebok/mcp-wikidata --client claude

Install uv if it is not installed yet.

$ curl -LsSf https://astral.sh/uv/install.sh | sh

Then, install dependencies.

```bash
$ git clone https://github.com/zzaebok/mcp-wikidata.git
$ cd mcp-wikidata
$ uv sync

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. |

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp wikidata": {
            "mcp-wikidata": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "@zzaebok/mcp-wikidata",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-wikidata": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "@zzaebok/mcp-wikidata",
            "--client",
            "claude"
        ]
    }
}

if you want to run client example together

$ uv sync --extra example

---

Run

Run the server with:

bash
$ uv run src/server.py

If you want to test it with a simple client code (with langchain-mcp-adapters), run the client with:

bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.