# Wikidata MCP for AI Agents AI Agent Connect

> Wikidata MCP for AI Agents. Access the world's largest open knowledge graph to fetch facts, run complex SPARQL queries, and perform semantic searches. This Connector lets your agent pull structured data directly into your workflow for research, data science, and app development. It provides a reliable source of truth for entities, properties, and statements, helping you ground your AI in verified facts from the global knowledge graph.

## Overview
- **Category:** the-unthinkable
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_W84JNbFgMiFDqgSOAzXVMSCHncfEanhMXyqzOlEz/ai-agent-connect
- **Tags:** knowledge-graph, sparql, structured-data, semantic-search, data-retrieval, open-data

## Description

The Wikidata MCP lets you pull real-world facts directly into your chat. Instead of manually searching through wiki pages or trying to remember specific IDs, your agent can pull detailed statements about people, places, and things instantly. It handles everything from simple entity lookups to complex graph queries using SPARQL. If you need to find things based on meaning rather than just exact words, the vector search tools do the heavy lifting. You can even contribute back to the knowledge graph by updating descriptions or creating new statements. It's one of the most powerful ways to ground your AI in real-world facts, and it's easy to set up through the Vinkius catalog. This means you can stop worrying about your agent hallucinating dates or facts because it can check the primary source of truth every time you ask a question. You can find a historical figure's occupation or the exact coordinates of a landmark just as easily. For researchers, this removes the friction of manual verification. For data scientists, it provides a clean way to pull structured datasets without the mess of web scraping. You get a reliable, high-quality stream of information that is updated by the global community.

## Tools

### get_similarity_score
Compute similarity between a text string and a specific entity. This helps you rank how well a description matches a fact.

### search_items_vector
Perform a hybrid vector and keyword search for Items. It finds relevant entities based on context rather than just keywords.

### search_properties_vector
Perform a hybrid vector and keyword search for Properties. Use this to find specific attributes across the knowledge graph.

### set_item_description
Set an Item description using your credentials. This allows your agent to update the public description of a Wikidata entry.

### get_item_statements
Retrieve all statements for a specific Wikidata Item. Use this to get a full fact sheet on any entity.

### get_item
Fetch a specific Wikidata Item via the Wikibase REST API. This is the quickest way to grab core data for a known ID.

### create_statement
Create a new statement for an Item. Use this to add new facts to the knowledge graph when you have verified data.

### execute_sparql
Execute a SPARQL query against the Wikidata Query Service. This lets you find complex patterns and data sets across the graph.

## Prompt Examples

**Prompt:** 
```
Find the 5 most populated cities in Brazil.
```

**Response:** 
```
Executing the SPARQL query to retrieve population data for Brazilian cities...

| Rank | City | Population | Wikidata ID |
| :--- | :--- | :--- | :--- |
| 1 | São Paulo | 12,3_000_000 | Q174 |
| 2 | Rio de Janeiro | 6,7_000_000 | Q8678 |
| 3 | Brasília | 3_000_000 | Q2844 |
| 4 | Salvador | 2_8_000_000 | Q36851 |
| 5 | Fortaleza | 2_7_000_000 | Q43463 |
```

**Prompt:** 
```
Search for items related to 'artificial neural networks' using vector search.
```

**Response:** 
```
I've performed a semantic search for 'artificial neural networks'. Here are the most relevant items found in the knowledge graph:

* **Artificial neural network** (Q192713): A computational model inspired by biological neural networks.
* **Deep learning** (Q197536): A subset of machine learning based on multi-layered neural networks.
* **Machine learning** (Q11660): The study of computer algorithms that improve automatically through experience.
```

**Prompt:** 
```
Get all statements for the Wikidata item Q42.
```

**Response:** 
```
I've retrieved the full fact sheet for Douglas Adams (Q42). Key statements include:

* **Instance of**: human (P31)
* **Occupation**: writer (P106)
* **Notable work**: The Hitchhiker's Guide to the Galaxy (P800)
* **Date of birth**: 31 July 1956
* **Place of birth**: Cambridge, England
```

## Capabilities

### Fetch full item statements
Pull all known facts and statements for a specific Wikidata item using get_item_statements.

### Run complex SPARQL queries
Execute custom SPARQL queries with execute_sparql to find deep relationships across the graph.

### Perform semantic vector searches
Find entities and properties based on meaning rather than just keywords using search_items_vector.

### Update item descriptions
Edit the public description of a Wikidata entry using set_item_description with your credentials.

### Create new data statements
Add new facts to the knowledge graph using create_statement when you have verified information.

### Calculate similarity scores
Compare text strings against specific entities to get a match score using get_similarity_score.

## Use Cases

### Verifying historical dates
A researcher asks for the population of all cities in Brazil in 1950. The agent uses execute_sparql to get the exact figure.

### Building a movie database
A developer needs to find all actors who worked with Q42. The agent uses get_item_statements to pull the full list of facts.

### Semantic product search
A user asks for sustainable energy sources. The agent uses search_properties_vector to find relevant items based on context.

### Automated data enrichment
A data scientist needs to update descriptions for 100 new items. The agent uses set_item_description to automate the updates.

## Benefits

- Stop hallucinating facts by grounding your agent in the world's largest open knowledge graph.
- Run complex SPARQL queries with execute_sparql to find deep relationships across history and science.
- Use search_items_vector to find relevant entities based on meaning instead of just exact words.
- Extract structured datasets for your projects without leaving your AI client's chat interface.
- Update the knowledge graph directly with create_statement when you have verified new information.
- Get precise similarity scores with get_similarity_score to rank and filter data accurately.

## How It Works

The bottom line is you get a direct pipeline to the world's largest open knowledge graph.

1. Subscribe to the Wikidata MCP on Vinkius
2. Enter your required User Agent in the configuration
3. Add an OAuth 2.0 token if you need to write data

## Frequently Asked Questions

**What is the Wikidata MCP for AI Agents?**
It's a tool that lets your AI client connect to the world's largest open knowledge graph. You can use it to pull real-world facts, run complex queries, and find data based on meaning.

**Can I use the Wikidata MCP to update facts?**
Yes, you can update descriptions or create new statements. You just need to provide an OAuth 2.0 token in your configuration to enable these write actions.

**Does the Wikidata MCP support complex queries?**
Yes, it supports SPARQL, which is the standard query language for the knowledge graph. This allows you to find complex relationships and specific datasets.

**How does the Wikidata MCP help with research?**
It lets you instantly verify dates, populations, and relationships. Instead of searching manually, your agent pulls verified data directly into your conversation.

**Can my agent find things by meaning with the Wikidata MCP?**
Yes, it includes vector search tools. This means your agent can find relevant items based on the context of your question rather than just looking for exact keywords.

**What do I need to provide to get the Wikidata MCP working?**
You just need to subscribe on Vinkius and provide a User Agent. If you want to edit data, you'll also need to add an OAuth 2.0 token.

**How can I find a Wikidata Item if I don't know its Q-ID?**
You can use the `search_items_vector` tool. It performs a hybrid search using high-dimensional embeddings and keywords to find the most relevant entities based on your natural language description.

**Is it possible to run complex queries like 'List all female scientists born in the 19th century'?**
Yes, the `execute_sparql` tool allows you to run any valid SPARQL query against the Wikidata Query Service. This is the most powerful way to filter and aggregate data across the entire knowledge graph.

**Can I use this server to update information on Wikidata?**
Yes, if you provide an OAuth 2.0 Access Token, you can use `create_statement` to add new data or `set_item_description` to update descriptions in various languages.