Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Fetch a Wikidata entity (item or property) by QID or PID. The fields parameter narrows the upstream fetch, not just the response — asking for labels alone costs a fraction of the whole entity, so name the fields you need. Omit fields for all data; a well-connected item is large enough to overflow, and an oversized entity returns kind: "outline" — the field categories with their byte sizes — instead of the data. Follow its retrieval_notice literally rather than picking from sections yourself — it names a fields set already measured to fit, since category sizes are additive and requesting them all would overflow again; for a category too large to deliver whole (statements or sitelinks on a major item) it names the sibling tool that can narrow it. Q-IDs (e.g. Q76) fetch items; P-IDs (e.g. P31) fetch properties from the correct endpoint automatically. Use wikidata_get_statements for deep claim traversal with label resolution, and whenever an entity's statements are large — its properties parameter selects individual P-IDs, granularity fields does not carry.
Q-ID (e.g., "Q76") or P-ID (e.g., "P31"). Case-insensitive — normalized to uppercase.
Fields to include. Options: "labels", "descriptions", "aliases", "statements", "sitelinks". Narrows the upstream fetch as well as the response, so a narrow selection is markedly cheaper. Omit for all fields.
Wikidata language codes to include in labels, descriptions, and aliases (e.g., ["en", "de"]). Case-insensitive; "_" is read as "-"; blank entries are dropped. A requested language with no label of its own falls back to the entity's multilingual ("mul") value, returned under the requested code. Omit, or send an empty list, to return all available languages.
Fetch a Wikidata entity (item or property) by QID or PID. The fields parameter narrows the upstream fetch, not just the response — asking for labels alone costs a fraction of the whole entity, so name the fields you need. Omit fields for all data; a well-connected item is large enough to overflow, and an oversized entity returns kind: "outline" — the field categories with their byte sizes — instead of the data. Follow its retrieval_notice literally rather than picking from sections yourself — it names a fields set already measured to fit, since category sizes are additive and requesting them all would overflow again; for a category too large to deliver whole (statements or sitelinks on a major item) it names the sibling tool that can narrow it. Q-IDs (e.g. Q76) fetch items; P-IDs (e.g. P31) fetch properties from the correct endpoint automatically. Use wikidata_get_statements for deep claim traversal with label resolution, and whenever an entity's statements are large — its properties parameter selects individual P-IDs, granularity fields does not carry.
| Argument | Type | Description |
|---|---|---|
| id* | string | Q-ID (e.g., "Q76") or P-ID (e.g., "P31"). Case-insensitive — normalized to uppercase. |
| fields | array | Fields to include. Options: "labels", "descriptions", "aliases", "statements", "sitelinks". Narrows the upstream fetch as well as the response, so a narrow selection is markedly cheaper. Omit for all fields. |
| languages | array | Wikidata language codes to include in labels, descriptions, and aliases (e.g., ["en", "de"]). Case-insensitive; "_" is read as "-"; blank entries are dropped. A requested language with no label of its own falls back to the entity's multilingual ("mul") value, returned under the requested code. Omit, or send an empty list, to return all available languages. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Q-ID (e.g., \"Q76\") or P-ID (e.g., \"P31\"). Case-insensitive — normalized to uppercase."
},
"fields": {
"type": "array",
"items": {
"enum": [
"labels",
"descriptions",
"aliases",
"statements",
"sitelinks"
],
"type": "string"
},
"description": "Fields to include. Options: \"labels\", \"descriptions\", \"aliases\", \"statements\", \"sitelinks\". Narrows the upstream fetch as well as the response, so a narrow selection is markedly cheaper. Omit for all fields."
},
"languages": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$"
},
"description": "Wikidata language codes to include in labels, descriptions, and aliases (e.g., [\"en\", \"de\"]). Case-insensitive; \"_\" is read as \"-\"; blank entries are dropped. A requested language with no label of its own falls back to the entity's multilingual (\"mul\") value, returned under the requested code. Omit, or send an empty list, to return all available languages."
}
},
"additionalProperties": false
}Resolve one or more QIDs or PIDs to their human-readable labels and descriptions. Lightweight — returns no claim data. Supports up to 50 IDs per call (batched automatically). Designed for the common agent pattern: receive QIDs from a SPARQL query, then humanize them.
| Argument | Type | Description |
|---|---|---|
| ids* | array | Q-IDs (e.g., "Q76") or P-IDs (e.g., "P31") to resolve. 1–50 IDs per call. |
| languages | array | Wikidata language codes for returned labels and descriptions (e.g., ["en", "de", "fr"]). Case-insensitive; "_" is read as "-"; blank entries are dropped, and an empty list means ["en"]. A language with no label of its own falls back to the entity's multilingual ("mul") value, returned under the requested code. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 50,
"minItems": 1,
"description": "Q-IDs (e.g., \"Q76\") or P-IDs (e.g., \"P31\") to resolve. 1–50 IDs per call."
},
"languages": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$"
},
"default": [
"en"
],
"description": "Wikidata language codes for returned labels and descriptions (e.g., [\"en\", \"de\", \"fr\"]). Case-insensitive; \"_\" is read as \"-\"; blank entries are dropped, and an empty list means [\"en\"]. A language with no label of its own falls back to the entity's multilingual (\"mul\") value, returned under the requested code."
}
},
"additionalProperties": false
}Fetch Wikipedia and Wikimedia project article URLs for a Wikidata item. A sitelink maps a site code (e.g., "enwiki") to a Wikipedia article title and URL. Major items can have 300+ sitelinks across languages. Use sites to filter to specific language editions, or wikis_only to return only Wikipedia links. Only Q-IDs (items) have sitelinks — properties (P-IDs) do not.
| Argument | Type | Description |
|---|---|---|
| id* | string | Q-ID of the item (e.g., "Q76"). Only items have sitelinks; properties (P-IDs) are not supported. |
| sites | array | Optional filter to specific site codes (e.g., ["enwiki", "frwiki", "dewiki"]). Omit to return all sitelinks. |
| wikis_only | boolean | When true, return only Wikipedia sitelinks (site codes ending in "wiki", e.g., "enwiki", "dewiki"). Excludes Wikisource, Wiktionary, Wikiquote, etc. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Q-ID of the item (e.g., \"Q76\"). Only items have sitelinks; properties (P-IDs) are not supported."
},
"sites": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Optional filter to specific site codes (e.g., [\"enwiki\", \"frwiki\", \"dewiki\"]). Omit to return all sitelinks."
},
"wikis_only": {
"type": "boolean",
"default": false,
"description": "When true, return only Wikipedia sitelinks (site codes ending in \"wiki\", e.g., \"enwiki\", \"dewiki\"). Excludes Wikisource, Wiktionary, Wikiquote, etc."
}
},
"additionalProperties": false
}Fetch property claims for a Wikidata entity with qualifier and reference detail. Item QIDs and quantity units — in values, qualifiers, and references — are resolved to human-readable labels by default. Use the properties parameter to fetch only specific P-IDs — omitting it returns every statement, and a well-connected item (a country, a major city) carries hundreds of properties: more than fits inline. A set over 24,000 bytes before labels comes back as kind: "outline" — every available P-ID with its byte size, largest first — instead of the statements; re-call with the same id plus properties:[...] naming P-IDs whose sizes sum to 24,000 or less (the retrieval_notice names one such set). Labels are added after that check, so a returned set can run past 24,000 bytes by their size, and a property requested alone is always returned whole — on a major item one property can run to hundreds of kilobytes. Designed for fact verification: "what does Wikidata say about this entity's {property}?". Preferred-rank statements are the most current values.
| Argument | Type | Description |
|---|---|---|
| id* | string | Q-ID (e.g., "Q76") or P-ID of the entity to fetch statements for. |
| language | string | Wikidata language code for label resolution of QID values (e.g., "en", "de"). Case-insensitive; "_" is read as "-"; blank means "en". |
| properties | array | P-IDs to fetch (e.g., ["P31", "P569", "P27"]). Omit to return all properties (may be large for major items). |
| resolve_labels | boolean | Resolve item QIDs (label) and quantity unit QIDs (unitLabel) to human-readable labels via one batched label call, covering main values, qualifiers, and reference parts. Set to false to skip label resolution and return raw QIDs only (faster, smaller payload). |
Look up a Wikidata entity by an external identifier such as a DOI, PubMed ID, ORCID iD, or OpenAlex ID. Returns match=<entity> on success, match=null when not found, and match=null with multipleMatches populated when a Wikidata data integrity issue causes more than one entity to claim the same external ID. Common cross-server join use cases: CrossRef DOI → Wikidata paper QID (P356), PubMed PMID → Wikidata paper QID (P698), ORCID → author QID (P496), OpenAlex ID → entity QID (P10283). The property must be one whose Wikidata data type is external-id — item-valued or media properties (e.g. P31 instance-of, P18 image) are rejected rather than returning an empty match. Known value normalization is applied automatically: surrounding whitespace is trimmed, identifier-resolver URL prefixes are stripped (https://doi.org/, https://pubmed.ncbi.nlm.nih.gov/, https://orcid.org/), DOIs are uppercased, PMID prefixes stripped, ORCID hyphens normalized.
| Argument | Type | Description |
|---|---|---|
| value* | string | The external identifier value to look up (e.g., "10.1038/nature01234" for a DOI, "32283226" for a PubMed ID, "0000-0002-1825-0097" for an ORCID). A resolver URL is accepted for DOI, PubMed, and ORCID — the prefix is stripped before lookup. |
| language | string | Wikidata language code for the label and description in the response (e.g., "en", "de"). Case-insensitive; "_" is read as "-"; blank means "en". An entity with no label in this language returns its multilingual ("mul") label. |
| property* | string | P-ID of the external identifier property, whose Wikidata data type must be external-id (e.g., "P356" for DOI, "P698" for PubMed ID, "P496" for ORCID, "P10283" for OpenAlex ID, "P345" for IMDb ID). Properties of any other data type are rejected — check an unfamiliar P-ID's data type with wikidata_get_entity. |
Search Wikidata for items or properties by text query. Returns QIDs or PIDs with labels, descriptions, and match metadata indicating whether the hit was on a label or alias. Use type="item" for real-world concepts (people, places, works) and type="property" to find predicate P-IDs. The API returns no total count — pagination is offset-based with no result ceiling indicator.
| Argument | Type | Description |
|---|---|---|
| type | string | Entity type to search. Use "item" for Q-IDs (people, places, concepts) or "property" for P-IDs (predicates). |
| limit | integer | Maximum number of results to return. Range: 1–50. |
| query* | string | Search terms to match against entity labels, aliases, and descriptions. |
| offset | integer | Pagination offset. Start at 0; increment by limit to page through results. |
| language | string | Wikidata language code for returned labels and descriptions (e.g., "en", "de", "zh-hant"). Case-insensitive; "_" is read as "-"; blank means "en". |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"properties": {
"type": {
"enum": [
"item",
"property"
],
"type": "string",
"default": "item",
"description": "Entity type to search. Use \"item\" for Q-IDs (people, places, concepts) or \"property\" for P-IDs (predicates)."
},
"limit": {
"type": "integer",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Maximum number of results to return. Range: 1–50."
},
"query": {
"type": "string",
"minLength": 1,
"description": "Search terms to match against entity labels, aliases, and descriptions."
},
"offset": {
"type": "integer",
"default": 0,
"maximum": 9007199254740991,
"minimum": 0,
"description": "Pagination offset. Start at 0; increment by limit to page through results."
},
"language": {
"type": "string",
"default": "en",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$",
"description": "Wikidata language code for returned labels and descriptions (e.g., \"en\", \"de\", \"zh-hant\"). Case-insensitive; \"_\" is read as \"-\"; blank means \"en\"."
}
},
"additionalProperties": false
}Execute a SPARQL SELECT query against the Wikidata Query Service. Full graph power: multi-hop traversals, aggregations, subqueries, OPTIONAL, FILTER, UNION, BIND. Standard Wikidata prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:, rdfs:, schema:) are auto-injected. The wikibase:label SERVICE is also auto-injected when the query references a ?<var>Label, ?<var>Description, or ?<var>AltLabel variable and declares no label SERVICE of its own — so you can use ?itemLabel without writing the boilerplate. Hard server timeout is 60s; use LIMIT to keep queries fast. Bindings use the SPARQL 1.1 JSON format: each value is { type, value, "xml:lang"?, datatype? }. Each response is held to 64,000 bytes, cut between whole rows: a larger result returns its leading rows with returnedCount and totalCount and a notice — page with ORDER BY plus LIMIT/OFFSET, or aggregate in the query. Use wikidata_get_labels to humanize QID results from this tool.
| Argument | Type | Description |
|---|---|---|
| query* | string | SPARQL SELECT query. Any other form — ASK, CONSTRUCT, DESCRIBE, an update, or plain search text — is rejected before it is sent. Standard prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:, rdfs:, schema:) are injected automatically. Example: SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. } LIMIT 10 |
| timeout | integer | Client-side timeout in seconds (1–55). Capped at 55s — the Wikidata server hard limit is 60s. |
| language | string | Wikidata language code, or a comma-separated fallback list tried in order (e.g., "en", "de", "fr,en"), for the injected wikibase:label SERVICE — the language of ?<var>Label, ?<var>Description, and ?<var>AltLabel variables. The list falls back to the multilingual ("mul") label last unless it already names mul. Case-insensitive; "_" is read as "-"; blank means "en". |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Q-ID (e.g., \"Q76\") or P-ID of the entity to fetch statements for."
},
"language": {
"type": "string",
"default": "en",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$",
"description": "Wikidata language code for label resolution of QID values (e.g., \"en\", \"de\"). Case-insensitive; \"_\" is read as \"-\"; blank means \"en\"."
},
"properties": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "P-IDs to fetch (e.g., [\"P31\", \"P569\", \"P27\"]). Omit to return all properties (may be large for major items)."
},
"resolve_labels": {
"type": "boolean",
"default": true,
"description": "Resolve item QIDs (label) and quantity unit QIDs (unitLabel) to human-readable labels via one batched label call, covering main values, qualifiers, and reference parts. Set to false to skip label resolution and return raw QIDs only (faster, smaller payload)."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"property",
"value"
],
"properties": {
"value": {
"type": "string",
"minLength": 1,
"description": "The external identifier value to look up (e.g., \"10.1038/nature01234\" for a DOI, \"32283226\" for a PubMed ID, \"0000-0002-1825-0097\" for an ORCID). A resolver URL is accepted for DOI, PubMed, and ORCID — the prefix is stripped before lookup."
},
"language": {
"type": "string",
"default": "en",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*\\s*)?$",
"description": "Wikidata language code for the label and description in the response (e.g., \"en\", \"de\"). Case-insensitive; \"_\" is read as \"-\"; blank means \"en\". An entity with no label in this language returns its multilingual (\"mul\") label."
},
"property": {
"type": "string",
"minLength": 1,
"description": "P-ID of the external identifier property, whose Wikidata data type must be external-id (e.g., \"P356\" for DOI, \"P698\" for PubMed ID, \"P496\" for ORCID, \"P10283\" for OpenAlex ID, \"P345\" for IMDb ID). Properties of any other data type are rejected — check an unfamiliar P-ID's data type with wikidata_get_entity."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "SPARQL SELECT query. Any other form — ASK, CONSTRUCT, DESCRIBE, an update, or plain search text — is rejected before it is sent. Standard prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:, rdfs:, schema:) are injected automatically. Example: SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. } LIMIT 10"
},
"timeout": {
"type": "integer",
"default": 30,
"maximum": 55,
"minimum": 1,
"description": "Client-side timeout in seconds (1–55). Capped at 55s — the Wikidata server hard limit is 60s."
},
"language": {
"type": "string",
"default": "en",
"pattern": "^\\s*(?:[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*(?:\\s*,\\s*[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,9})*)*\\s*)?$",
"description": "Wikidata language code, or a comma-separated fallback list tried in order (e.g., \"en\", \"de\", \"fr,en\"), for the injected wikibase:label SERVICE — the language of ?<var>Label, ?<var>Description, and ?<var>AltLabel variables. The list falls back to the multilingual (\"mul\") label last unless it already names mul. Case-insensitive; \"_\" is read as \"-\"; blank means \"en\"."
}
},
"additionalProperties": false
}