Wikidata
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
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
Maintainer
Works with
Installation
Manual Installation
npx wikidata-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-wikidataInstall dependencies with uv
Use uv to create an isolated environment and install the required Python packages.
uv syncAdd 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"
]
}
}
}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 claudeRestart 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.
Wikidata Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Wikidata? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
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.
Set Up Wikidata in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.