WM

Wikidata MCP

Created 6 months ago

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

development documentation public

What is Wikidata MCP?

Wikidata MCP server that interact with Wikidata, by searching identifiers, extracting metadata, and executing sparql query.

Documentation

Wikidata MCP Server# Installation

Installing via Smithery

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

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

Installing Manually

Install uv if it is not installed yet.

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

Then, install dependencies.

$ git clone https://github.com/zzaebok/mcp-wikidata.git
$ cd mcp-wikidata
$ uv sync # if you want to run client example together
$ uv sync --extra example

Run

Run the server with:

$ uv run src/server.py

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

$ uv run src/client.py

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.

Server Config

{
  "mcpServers": {
    "wikidata-mcp-server": {
      "command": "npx",
      "args": [
        "wikidata-mcp"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: No

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: zzaebok
Category: community
License: MIT License
Tags:
development documentation public