Wikidata

v1.0.0Knowledge & Memorystable

Connects 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 ex

wikidata-mcp-servermcpai-integration
Share:
43
Stars
0
Downloads
0
Weekly
0/5

What is Wikidata?

Wikidata is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects 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...

Connects 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 ex

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Connects LLMs to Wikidata's structured knowledge base using

Use Cases

Search and retrieve entities from Wikidata's structured knowledge base.
Run complex SPARQL queries on linked data.
Access metadata lookups for research and analysis.
zzaebok

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 26, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx wikidata-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Wikidata

The Wikidata MCP server connects AI language models to Wikidata's massive structured knowledge base using a hybrid architecture that optimizes for both fast entity searches and complex relational queries. It provides five tools: entity search, property search, property retrieval for an entity, metadata lookup (labels and descriptions), and direct SPARQL query execution against the Wikidata query service. This allows AI assistants to answer factual questions, traverse knowledge graphs, and discover relationships between entities using real-time Wikidata data without requiring any API keys.

Prerequisites

  • Python 3.10+ with uv or pip installed
  • Internet access to reach the Wikidata API and SPARQL endpoint (no API key required)
  • An MCP-compatible client such as Claude Desktop, Cursor, or VS Code with MCP support
1

Clone the repository

The server is installed from source. Clone the GitHub repository to your local machine.

git clone https://github.com/zzaebok/mcp-wikidata.git
cd mcp-wikidata
2

Install dependencies with uv

Use uv to create an isolated environment and install the required Python packages.

uv sync
3

Add the server to your MCP client configuration

Edit your MCP client configuration file (e.g. claude_desktop_config.json) to add the Wikidata server. Use the full path to the uv executable and the cloned repository.

{
  "mcpServers": {
    "wikidata": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-wikidata",
        "run",
        "mcp-wikidata"
      ]
    }
  }
}
4

Or install via Smithery for automatic configuration

Smithery can automatically configure Claude Desktop to use the server without manual JSON editing.

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

Restart your MCP client and test

Restart Claude Desktop or your IDE. Ask your AI assistant a factual question that requires looking up Wikidata entities to confirm the server is working.

Wikidata Examples

Client configuration

Example claude_desktop_config.json for the Wikidata MCP server run from a cloned repository.

{
  "mcpServers": {
    "wikidata": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/you/projects/mcp-wikidata",
        "run",
        "mcp-wikidata"
      ]
    }
  }
}

Prompts to try

Example prompts that demonstrate Wikidata entity lookups and SPARQL queries.

- "Can you recommend a movie directed by Bong Joon-ho using Wikidata?"
- "What are the properties of the Wikidata entity for Marie Curie?"
- "Find the Wikidata entity ID for the Eiffel Tower and get its metadata."
- "Run a SPARQL query to list all Nobel Prize winners in Physics born in Germany."
- "Search for the Wikidata property that represents 'country of citizenship'."

Troubleshooting Wikidata

uv command not found when starting the server

Install uv with 'curl -LsSf https://astral.sh/uv/install.sh | sh' and ensure ~/.cargo/bin or ~/.local/bin is in your PATH. Alternatively, install dependencies with pip and run the server with 'python -m mcp_wikidata'.

SPARQL queries time out or return empty results

The Wikidata public SPARQL endpoint has rate limits. Add LIMIT clauses to your queries (e.g. LIMIT 100) and avoid querying very large property sets. If the public endpoint is down, check status.wikimedia.org.

Entity search returns unexpected or irrelevant results

Wikidata entity search is language-sensitive. Ensure you are using the English label for the entity. Try a more specific search term, or use get_metadata with a known entity ID (e.g. Q937 for Albert Einstein) to verify the correct entity.

Frequently Asked Questions about Wikidata

What is Wikidata?

Wikidata is a Model Context Protocol (MCP) server that connects 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 ex It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Wikidata?

Follow the installation instructions on the Wikidata GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Wikidata?

Wikidata works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Wikidata free to use?

Yes, Wikidata is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Wikidata?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides