### MCP server: start with uvx Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Start the MCP server using uvx. This is the same command used by every client. If installed with uv tool install, the command is just wikidata-google-knowledge-mcp. ```bash uvx wikidata-google-knowledge-mcp@0.3.0 ``` -------------------------------- ### Install wdkg and check status Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Install the package globally with uv tool install, then verify the version and run wdkg status. The status command makes no network calls and shows endpoints, whether a Google key is present (never its value), and where the cache lives. ```bash uv tool install wikidata-google-knowledge-mcp=={{version}} ``` ```bash wdkg --version ``` ```bash wdkg status ``` -------------------------------- ### Quick start: run and install wdkg commands Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Run the wdkg command once without installing using uvx, or install both wdkg and wikidata-google-knowledge-mcp commands on PATH with uv tool install. The first run downloads the package and dependencies; later runs use uv's cache. ```bash # run once without installing (from PyPI) uvx --from wikidata-google-knowledge-mcp==0.3.0 wdkg search "Fox Theatre" --place Atlanta # or install both commands (wdkg and wikidata-google-knowledge-mcp) on PATH uv tool install wikidata-google-knowledge-mcp==0.3.0 wdkg resolve "Fox Theatre" --kind place --city Atlanta --url https://www.foxtheatre.org ``` -------------------------------- ### Setup and run tests with uv Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/CONTRIBUTING.md Run the project setup and verification commands in order: sync dependencies with uv, run the test suite with pytest, and check the public tree with a script. ```bash uv sync uv run pytest -q uv run python scripts/check_public_tree.py ``` -------------------------------- ### wdkg discover-identity CLI examples Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Three example invocations of the `wdkg discover-identity` command. The first uses a local anchor with URL and coordinates, the second lacks a local anchor and exposes namesake uncertainty, and the third uses only a person's name with `--wikidata-only`. Discovery returns at most 3 candidates by default, hard maximum 5. A single viable person yields `INSUFFICIENT_EVIDENCE`; multiple viable people yield `AMBIGUOUS`. ```bash wdkg discover-identity "Fox Theatre" --kind place --city Atlanta \ --url https://www.foxtheatre.org/ --lat 33.7725 --lon -84.3857 --max-candidates 3 --no-google wdkg discover-identity "Fox Theatre" --kind place --max-candidates 5 wdkg discover-identity "Ada Lovelace" --kind person --wikidata-only ``` -------------------------------- ### Codex: Install plugin from repository Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Loads the wikidata-google-knowledge plugin (MCP server and skill) into Codex from the repository. Requires adding the marketplace first, then installing the plugin. ```bash codex plugin marketplace add {{repo}}.git codex plugin add wikidata-google-knowledge-mcp@wikidata-google-knowledge-mcp ``` -------------------------------- ### Claude Code: Install plugin (MCP server + Agent Skill) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Installs the wikidata-google-knowledge plugin, which adds both the MCP server and the Agent Skill to Claude Code. Requires two commands: first add the marketplace, then install the plugin. ```bash claude plugin marketplace add {{repo}}.git claude plugin install wikidata-google-knowledge-mcp@wikidata-google-knowledge-mcp ``` -------------------------------- ### wdkg CLI usage examples Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/skills/wikidata-google-knowledge/SKILL.md Shows the main wdkg CLI commands for searching, fetching entities, resolving identities, and checking status. Use these for quick lookups or when the MCP tools are unavailable. ```bash wdkg search "" [--place CITY] [--type KIND] [--lang es] [--limit N] wdkg entity [--props P31,P131] [--evidence P131] wdkg related --prop P361 [--inverse] | --hierarchy [--depth 2] wdkg resolve "" --kind place --city CITY [--url URL] [--explain] wdkg resolve-batch in.jsonl --out out.jsonl [--providers minimal] wdkg status ``` -------------------------------- ### Run from GitLab release tag with uvx Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Builds and runs the server directly from a GitLab release tag. Requires git; the first command prints the version, the second starts the server. ```bash uvx --from git+{{repo}}@{{tag}} wdkg --version uvx --from git+{{repo}}@{{tag}} wikidata-google-knowledge-mcp ``` -------------------------------- ### Identity envelope example for kg_resolve Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/resolution.md Example identity envelope for kg_resolve. Only name is required; other fields are optional. Missing fields stay missing; nothing is inferred. ```json {"name": "Fox Theatre", "kind": "place", "city": "Atlanta", "country": "US", "official_url": "https://www.foxtheatre.org"} ``` -------------------------------- ### Codex: Configure MCP server in config.toml Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Alternative configuration for Codex by editing ~/.codex/config.toml. Includes a startup_timeout_sec setting because the first start downloads the package. ```toml [mcp_servers.wikidata-google-knowledge] command = "uvx" args = ["wikidata-google-knowledge-mcp@{{version}}"] startup_timeout_sec = 60 # the first start downloads the package ``` -------------------------------- ### Run wdkg search with uvx Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Use this command to try the wdkg CLI without installing it globally. The first run downloads the package and its dependencies; later runs use uv's cache. ```bash uvx --from wikidata-google-knowledge-mcp=={{version}} wdkg search "Tate Modern" --place London ``` -------------------------------- ### JSON input with existing_id_trusted and provenance Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Example JSON input for the generic input, showing how to supply an existing QID with `existing_id_trusted: true` and reviewed provenance. This is required for `VERIFIED_EXISTING` results. Only use trust assertions for actual prior review; contradictions still override trusted provenance. ```json {"canonical_name":"Fox Theatre","kind":"place","existing_qid":"Q1440190", "existing_id_trusted":true, "existing_id_provenance":{"reviewed":true,"source":"caller_reviewed_registry"}} ``` -------------------------------- ### Batch summary output (stdout) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/batch.md The command prints a one-line JSON summary with row count and decision counts. Example from a v0.1.0 run against live Wikidata. ```json {"op": "resolve-batch", "status": "ok", "rows": 6, "decisions": {"AUTO_MATCH": 2, "AMBIGUOUS": 2, "HOLD": 1, "NO_CANDIDATE": 1, "CONFLICT": 0, "MODEL_MATCH": 0}} ``` -------------------------------- ### wdkg resolve CLI: HOLD and AUTO_MATCH examples Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/index.md Two invocations of the wdkg resolve CLI for the same entity. The first lacks a local anchor and returns HOLD; adding --url yields AUTO_MATCH with local anchors, demonstrating the resolver's requirement for a supplied anchor before automatic matching. ```bash uvx --from wikidata-google-knowledge-mcp=={{version}} wdkg resolve "Fox Theatre" --kind place --city Atlanta # decision HOLD, reasons [NO_LOCAL_ANCHOR], candidate_ids [Q1440190, Q3080199] ``` ```bash uvx --from wikidata-google-knowledge-mcp=={{version}} wdkg resolve "Fox Theatre" --kind place --city Atlanta \ --url https://www.foxtheatre.org # decision AUTO_MATCH, wikidata_qid Q1440190, local anchors [CITY_MATCH, OFFICIAL_HOST_EXACT] ``` -------------------------------- ### Second search 'Fox Theatre' with --place Atlanta (cache hit) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/demo/demo.txt Repeats the search command from the first example. The answer comes from the local cache with zero upstream requests. The output shows cache hit and empty upstream_requests. ```shell $ wdkg search "Fox Theatre" --place Atlanta | jq '{resolution, meta: .meta | {cache, upstream_requests}}' ``` ```json { "resolution": "single_supported_candidate", "meta": { "cache": "hit", "upstream_requests": {} } } ``` -------------------------------- ### Uninstall wikidata-google-knowledge-mcp Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Removes the tool installed via uv tool, unregisters it from Claude Code or Codex, and deletes the local cache and evidence store. ```bash uv tool uninstall wikidata-google-knowledge-mcp # if you used uv tool install claude mcp remove wikidata-google-knowledge # or: codex mcp remove ... rm -rf ~/.cache/wikidata-google-knowledge-mcp # local cache and evidence store ``` -------------------------------- ### Reproduce benchmark with git clone and uv run Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/benchmark.md Clones the repository and runs the replay benchmark with 21 iterations using the bench group. Requires uv and network access to clone the repo. ```bash git clone {{repo}}.git && cd wikidata-google-knowledge-mcp uv run --group bench python benchmarks/replay_benchmark.py --iterations 21 ``` -------------------------------- ### Development commands Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Commands to set up the repository, run tests, check the public tree, build the documentation site, and run the offline benchmark. Tests never call Wikidata, Google, or any model API. ```bash git clone https://gitlab.com/revanalex/wikidata-google-knowledge-mcp.git cd wikidata-google-knowledge-mcp uv sync uv run pytest -q # offline: fixtures and fake transports only uv run python scripts/check_public_tree.py # forbidden files, secret patterns, manifest checks uv run --group docs python scripts/build_site.py --out public # documentation site uv run --group bench python benchmarks/replay_benchmark.py # offline benchmark ``` -------------------------------- ### Cursor CLI: Enable server and list tools Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md After configuring the MCP server in Cursor, use these commands to enable it and list its tools. Run them once after approving the server. ```bash cursor-agent mcp enable wikidata-google-knowledge cursor-agent mcp list-tools wikidata-google-knowledge ``` -------------------------------- ### Run server with uvx from PyPI Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Launches the MCP server using uvx. Without arguments it waits for a client on stdin and writes only MCP protocol messages to stdout. ```bash uvx wikidata-google-knowledge-mcp@{{version}} ``` -------------------------------- ### Generate audit100.jsonl and run wdkg identity-batch audit Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Creates 100 public-example audit inputs without private data, then runs the identity-batch audit twice: first with 30 provider calls, then with 0 provider calls to resume the complete checkpoint. The second command resumes the checkpoint with zero provider calls; for a warm-cache re-decision into a new file, use the same input and a new --out with --max-provider-calls 0. ```bash python - <<'PY' import json with open('audit100.jsonl', 'w') as out: for i in range(100): out.write(json.dumps({'local_id': f'example-{i}', 'canonical_name': 'Fox Theatre', 'kind': 'place', 'existing_qid': 'Q1440190', 'city': 'Atlanta', 'latitude': 33.7725, 'longitude': -84.3857, 'official_url': 'https://www.foxtheatre.org/'}) + '\n') PY wdkg identity-batch audit100.jsonl --out audit100.out.jsonl --existing-id-audit \ --jsonl --wikidata-only --concurrency 4 --max-provider-calls 30 wdkg identity-batch audit100.jsonl --out audit100.out.jsonl --existing-id-audit \ --jsonl --wikidata-only --concurrency 4 --max-provider-calls 0 ``` -------------------------------- ### Resolve place with official URL (wdkg resolve --url --explain) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/resolution.md Adds the official website URL and --explain. The official host matches exactly, so the resolver auto-matches to Q1440190; --explain shows why other candidates fail with CITY_CONFLICT, OFFICIAL_HOST_CONFLICT, or KIND_CONFLICT. ```bash wdkg resolve "Fox Theatre" --kind place --city Atlanta --url https://www.foxtheatre.org --explain ``` ```json {"decision": "AUTO_MATCH", "wikidata_qid": "Q1440190", "local_anchor_evidence": ["CITY_MATCH", "OFFICIAL_HOST_EXACT"]} ``` -------------------------------- ### Codex: Add MCP server via CLI Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Adds the wikidata-google-knowledge MCP server to Codex using the command line. This is the quickest way to set it up. ```bash codex mcp add wikidata-google-knowledge -- \ uvx wikidata-google-knowledge-mcp@{{version}} ``` -------------------------------- ### Cursor: configure MCP server in mcp.json Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Add the MCP server configuration to ~/.cursor/mcp.json for all projects or .cursor/mcp.json for one project. The configuration uses the uvx command with the package version. ```json { "mcpServers": { "wikidata-google-knowledge": { "command": "uvx", "args": ["wikidata-google-knowledge-mcp@0.3.0"] } } } ``` -------------------------------- ### Wikidata CLI commands for search and entity lookups Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md These commands use the public Wikidata MCP service without any account or key. They demonstrate searching for a place, fetching entity properties with evidence, and finding related entities with hierarchy expansion. ```bash wdkg search "Tate Modern" --place London --type museum wdkg entity Q193375 --props P31,P131,P17 --evidence P131 wdkg related Q193375 --prop P361 wdkg related Q193375 --hierarchy --depth 2 ``` -------------------------------- ### wdkg resolve-batch command Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Runs batch resolution on examples/entities.jsonl with zero Google requests, outputting to resolved.jsonl. The JSON result shows decision counts across six rows. ```bash wdkg resolve-batch examples/entities.jsonl --out resolved.jsonl --max-google-requests 0 ``` -------------------------------- ### Cursor: Configure MCP server in mcp.json Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Adds the wikidata-google-knowledge MCP server to Cursor by editing the mcp.json configuration file. Place this in ~/.cursor/mcp.json for all projects or .cursor/mcp.json for a single project. ```json { "mcpServers": { "wikidata-google-knowledge": { "command": "uvx", "args": ["wikidata-google-knowledge-mcp@{{version}}"] } } } ``` -------------------------------- ### wdkg lookup-qids: bulk QID lookup with fields and input file Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Performs compact bulk QID lookup using the wdkg CLI. The first command queries two QIDs directly with selected fields and --wikidata-only. The second writes a JSONL file of QIDs. The third reads that file and writes facts to facts.jsonl with a provider call limit. Use --fields to narrow the answer; the MCP hard limit is 10 QIDs and output is byte bounded. ```bash wdkg lookup-qids Q1440190 Q193375 --fields labels,classes,websites,coordinates --wikidata-only printf '"Q1440190"\n"Q193375"\n' > qids.jsonl wdkg lookup-qids --input qids.jsonl --out facts.jsonl --max-provider-calls 30 ``` -------------------------------- ### Batch input JSONL (examples/entities.jsonl) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/batch.md One JSON object per line with the same fields as a single resolve call. source_id is echoed back to join results to your data. ```json {"source_id": "fox-atl", "name": "Fox Theatre", "kind": "place", "city": "Atlanta", "country": "US", "official_url": "https://www.foxtheatre.org"} {"source_id": "fox-name-only", "name": "Fox Theatre", "kind": "place", "city": "Atlanta"} {"source_id": "tate", "name": "Tate Modern", "kind": "place", "city": "London", "latitude": 51.5076, "longitude": -0.0994} {"source_id": "primavera-series", "name": "Primavera Sound", "kind": "event_series", "city": "Barcelona", "official_url": "https://www.primaverasound.com"} ``` -------------------------------- ### wdkg export-evidence and validate-evidence commands Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/skills/wikidata-google-knowledge/resolution.md Exports evidence to a bundle directory and validates it. The bundle contains decisions.jsonl, evidence.jsonl, manifest.json, and validation.json and requires no store or cache to read. ```shell wdkg export-evidence out.jsonl [more.jsonl] --bundle DIR [--store resolver.sqlite] wdkg validate-evidence DIR ``` -------------------------------- ### Run identity benchmark Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/benchmark.md Executes the offline identity benchmark using uv. Produces identity.json with per-case results including tokenizer counts, cold/warm requests, candidate counts, verdicts, evidence completeness, replay equality, and batch receipts. ```bash uv run --group bench python benchmarks/identity_benchmark.py ``` -------------------------------- ### wdkg resolve-batch commands (dry-run and capped) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/batch.md Run batch resolution with a dry-run to parse and check caches without network, or with hard caps on Wikidata and Google requests. Retries count toward the caps. ```bash # plan only: parse, normalize and check caches, no network wdkg resolve-batch entities.jsonl --out resolved.jsonl --dry-run # resolve with Wikidata only and a hard cap on requests wdkg resolve-batch entities.jsonl --out resolved.jsonl \ --max-wikidata-requests 2000 --max-google-requests 0 ``` -------------------------------- ### wdkg audit-identity: optional Google cross-check and cache bypass Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Runs identity audit with optional Google cross-check. The first command enables Google cross-check using GOOGLE_KNOWLEDGE_GRAPH_API_KEY. The second disables Google. The third uses --wikidata-only and disables provider calls. Only explicit cross-check mode may use the Google API key; Google is never the sole confirmation source. Missing credentials are explicit and the key is never printed. ```bash wdkg audit-identity "Fox Theatre" --kind place --qid Q1440190 \ --url https://www.foxtheatre.org/ --google-crosscheck wdkg audit-identity "Fox Theatre" --kind place --qid Q1440190 \ --url https://www.foxtheatre.org/ --no-google wdkg audit-identity "Fox Theatre" --kind place --qid Q1440190 \ --url https://www.foxtheatre.org/ --wikidata-only --max-provider-calls 0 ``` -------------------------------- ### Export and validate evidence bundle Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/batch.md Export the evidence bundle from a resolved file and validate it. The bundle is self-contained and needs neither the cache nor the resolver store to read. ```bash wdkg export-evidence resolved.jsonl --bundle evidence/ wdkg validate-evidence evidence/ ``` -------------------------------- ### Set Google Knowledge Graph API key in secrets file Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Place the API key in ~/.config/wikidata-google-knowledge-mcp/secrets.env (chmod 600). The file is read, never executed, and works for desktop clients that do not pass the shell environment. ```bash GOOGLE_KNOWLEDGE_GRAPH_API_KEY=your-key-here ``` -------------------------------- ### wdkg resolve with coordinates (AMBIGUOUS) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Resolves 'Tate Modern' with coordinates that match both the gallery and its building, producing AMBIGUOUS with MULTIPLE_ANCHORED_CANDIDATES. An official URL would settle it. ```bash wdkg resolve "Tate Modern" --kind place --city London --lat 51.5076 --lon -0.0994 ``` -------------------------------- ### Audit an existing QID with wdkg audit-identity Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Use this CLI command to audit a supplied QID with explicit kind and location constraints. It fetches the QID first and never silently replaces it. The command returns a deterministic verdict; without reviewed provenance it never returns VERIFIED_EXISTING. ```bash wdkg audit-identity "Fox Theatre" --kind place --qid Q1440190 \ --city Atlanta --country US --lat 33.7725 --lon -84.3857 \ --url https://www.foxtheatre.org/ --wikidata-only ``` -------------------------------- ### wdkg resolve without URL (HOLD) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Resolves the same name without an official URL, producing HOLD with NO_LOCAL_ANCHOR and candidate IDs. A city name alone is insufficient for a place. ```bash wdkg resolve "Fox Theatre" --kind place --city Atlanta --providers dual ``` -------------------------------- ### Resolve 'Fox Theatre' with --kind place --city Atlanta --url and --explain Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/demo/demo.txt Resolves 'Fox Theatre' with --kind place --city Atlanta --url https://www.foxtheatre.org --explain. The decision is AUTO_MATCH with Q1440190. The output shows local anchor evidence, candidate codes, conflicts, and cache hits. ```shell $ wdkg resolve "Fox Theatre" --kind place --city Atlanta --url https://www.foxtheatre.org --explain | jq '{decision, wikidata_qid, local_anchor_evidence, upstream_requests, candidates: [.explain.identities[] | {qid, label, codes, conflicts, auto, why_not}], cache_hits}' ``` ```json { "decision": "AUTO_MATCH", "wikidata_qid": "Q1440190", "local_anchor_evidence": [ "CITY_MATCH", "OFFICIAL_HOST_EXACT" ], "upstream_requests": {}, "candidates": [ { "qid": "Q1440190", "label": "Fox Theatre", "codes": [ "CITY_MATCH", "KIND_COMPATIBLE", "NAME_EXACT", "OFFICIAL_HOST_EXACT" ], "conflicts": null, "auto": true, "why_not": null }, { "qid": "Q3080199", "label": "Fox Theatre", "codes": [ "KIND_COMPATIBLE", "NAME_EXACT" ], "conflicts": [ "CITY_CONFLICT", "OFFICIAL_HOST_CONFLICT" ], "auto": false, "why_not": "NO_LOCAL_ANCHOR" }, { "qid": "Q1440189", "label": "Fox Theatre", "codes": [ "NAME_EXACT" ], "conflicts": [ "KIND_CONFLICT" ], "auto": false, "why_not": "NO_LOCAL_ANCHOR" } ], "cache_hits": { "provider": 0, "resolution": true } } ``` -------------------------------- ### wdkg resolve-batch CLI usage Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Run batch resolution from the command line. The output file acts as a checkpoint: rerunning skips finished rows and redoes budget-stopped rows. Use --dry-run to plan without network, and --providers dual to enable Google for every row (requires a key). ```bash wdkg resolve-batch entities.jsonl --out resolved.jsonl \ --max-wikidata-requests 2000 --max-google-requests 0 ``` -------------------------------- ### Resolve event vs event_series with wdkg resolve Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/resolution.md Two wdkg resolve commands showing how the resolver treats events and series separately. The first, with --kind event and a date, returns NO_CANDIDATE with an EVENT_GRAIN_CONFLICT on the festival series Q2439480. The second, with --kind event_series and a URL, returns AUTO_MATCH on Q2439480 using local anchors CITY_MATCH and OFFICIAL_HOST_EXACT. ```bash wdkg resolve "Primavera Sound" --kind event --date 2019-05-30 --city Barcelona # v0.1.0, live: NO_CANDIDATE, with EVENT_GRAIN_CONFLICT on Q2439480 (the festival series) ``` ```bash wdkg resolve "Primavera Sound" --kind event_series --city Barcelona --url https://www.primaverasound.com # v0.1.0, live: AUTO_MATCH Q2439480, local anchors CITY_MATCH + OFFICIAL_HOST_EXACT ``` -------------------------------- ### wdkg resolve with official URL (AUTO_MATCH) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Resolves an exact label lookup for 'Fox Theatre' with a city and official URL, producing AUTO_MATCH with concordance and anchor evidence. The warning namesake_heavy:131 indicates 131 Wikidata items share the name. ```bash wdkg resolve "Fox Theatre" --kind place --city Atlanta --url https://www.foxtheatre.org --providers dual ``` -------------------------------- ### Demonstrate kind contradiction with wdkg audit-identity Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/identity.md Use this command to show a known kind contradiction using the same public fixture. The item is a theatre, so the fixture returns WRONG_IDENTITY with KIND_CONFLICT and KNOWN_ID_CONTRADICTED. The QID remains the audited QID. ```bash wdkg audit-identity "Fox Theatre" --kind person --qid Q1440190 --wikidata-only ``` -------------------------------- ### wdkg resolve without URL (JSON output) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md JSON output for the HOLD decision, listing candidate pairs and local anchor evidence. The result is HOLD because provider concordance alone does not identify which Fox Theatre is intended. ```json { "decision": "HOLD", "reasons": ["NO_LOCAL_ANCHOR"], "candidate_ids": ["Q1440190", "Q3080199", "Q8565227", "Q559730"], "candidate_pairs": [ {"wikidata_qid": "Q1440190", "google_kg_id": "kg:/m/04qrhq", "methods": ["EXTERNAL_ID_EXACT", "WIKIPEDIA_EXACT"], "selected": false}, {"wikidata_qid": "Q3080199", "google_kg_id": "kg:/m/05c6w7", "methods": ["EXTERNAL_ID_EXACT", "WIKIPEDIA_EXACT"], "selected": false} ], "local_anchor_evidence": ["CITY_MATCH"] } ``` -------------------------------- ### Search 'Fox Theatre' with --place Atlanta Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/demo/demo.txt Searches for 'Fox Theatre' with the --place Atlanta option. Returns three candidates with match flags. The output is filtered with jq to show resolution, candidates, warnings, and meta. The meta shows cache miss and upstream requests to Wikidata. ```shell $ wdkg search "Fox Theatre" --place Atlanta | jq '{resolution, candidates: [.candidates[] | {id, label, desc}], warnings, meta: .meta | {cache, upstream_requests, raw_bytes, bytes}}' ``` ```json { "resolution": "single_supported_candidate", "candidates": [ { "id": "Q1440190", "label": "Fox Theatre", "desc": "movie theater in Atlanta, Georgia, United States" }, { "id": "Q3080199", "label": "Fox Theatre", "desc": "theater and former movie theater in Detroit, Michigan, United States" }, { "id": "Q28453508", "label": "Fox Theatre", "desc": "former movie theater in Joplin, Missouri, United States, now a church, but also used for events and movie showings" } ], "warnings": [ "same_name_elsewhere: 13 other candidate(s) share this name but do not mention 'Atlanta'; confirm location from statements", "verify_before_use: description-level evidence only; confirm with `entity ` statements (P31/P131/P17/P625)" ], "meta": { "cache": "miss", "upstream_requests": { "wikidata": 3 }, "raw_bytes": 4374, "bytes": 1694 } } ``` -------------------------------- ### wdkg resolve with official URL (JSON output) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md JSON output for the Fox Theatre resolve call, showing AUTO_MATCH with Q1440190 and concordance codes. EXTERNAL_ID_EXACT means Google's kg:/m/04qrhq equals the P646 value on Wikidata. ```json { "decision": "AUTO_MATCH", "wikidata_qid": "Q1440190", "google_kg_id": "kg:/m/04qrhq", "provider_concordance": ["EXTERNAL_ID_EXACT", "PROVIDER_HOST_AGREEMENT", "PROVIDER_NAME_AGREEMENT", "PROVIDER_TYPE_COMPATIBLE", "WIKIPEDIA_EXACT"], "local_anchor_evidence": ["CITY_MATCH", "OFFICIAL_HOST_EXACT"], "evidence_codes": ["CITY_MATCH", "EXTERNAL_ID_EXACT", "KIND_COMPATIBLE", "NAME_EXACT", "OFFICIAL_HOST_EXACT", "..."], "warnings": ["namesake_heavy:131"] } ``` -------------------------------- ### Resolve 'Fox Theatre' with --kind place --city Atlanta Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/demo/demo.txt Resolves 'Fox Theatre' with --kind place --city Atlanta. The decision is HOLD because there is no local anchor. The output shows reasons, candidate IDs, local anchor evidence, and upstream requests. ```shell $ wdkg resolve "Fox Theatre" --kind place --city Atlanta | jq '{decision, wikidata_qid, reasons, candidate_ids, local_anchor_evidence, upstream_requests, cache_hits}' ``` ```json { "decision": "HOLD", "wikidata_qid": null, "reasons": [ "NO_LOCAL_ANCHOR" ], "candidate_ids": [ "Q1440190", "Q3080199" ], "local_anchor_evidence": [ "CITY_MATCH" ], "upstream_requests": { "wikidata": 3 }, "cache_hits": { "provider": 0, "resolution": false } } ``` -------------------------------- ### Claude Code: Add MCP server (user scope) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/install.md Adds the wikidata-google-knowledge MCP server to Claude Code for the current user. Run this command in any project to make the server available globally. ```bash claude mcp add --scope user wikidata-google-knowledge -- \ uvx wikidata-google-knowledge-mcp@{{version}} ``` -------------------------------- ### wdkg resolve event occurrence vs series Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/README.md Two commands showing the difference between resolving an event occurrence (NO_CANDIDATE with EVENT_GRAIN_CONFLICT) and the event series (AUTO_MATCH). The resolver never links an occurrence to its series or vice versa. ```bash wdkg resolve "Primavera Sound" --kind event --date 2019-05-30 --city Barcelona # decision NO_CANDIDATE, conflict EVENT_GRAIN_CONFLICT on Q2439480 (the festival series) ``` ```bash wdkg resolve "Primavera Sound" --kind event_series --city Barcelona --url https://www.primaverasound.com # decision AUTO_MATCH, wikidata_qid Q2439480, local anchors CITY_MATCH + OFFICIAL_HOST_EXACT ``` -------------------------------- ### Resolve place with city only (wdkg resolve) Source: https://gitlab.com/revanalex/wikidata-google-knowledge-mcp/-/blob/main/docs/site/resolution.md Resolves a place name with only a city as context. The city is not a local anchor for a place, so the resolver returns HOLD with two candidate IDs and CITY_MATCH evidence. ```bash wdkg resolve "Fox Theatre" --kind place --city Atlanta ``` ```json {"decision": "HOLD", "reasons": ["NO_LOCAL_ANCHOR"], "candidate_ids": ["Q1440190", "Q3080199"], "local_anchor_evidence": ["CITY_MATCH"]} ```