Wikidata + Google KG MCP

Installation#

You need uv (it fetches a suitable Python 3.11+ if you do not have one) and outbound HTTPS. Nothing else: no clone, no virtual environment to manage, no API key for Wikidata.

The package installs two commands from one core:

command what it is
wikidata-google-knowledge-mcp the stdio MCP server your client starts
wdkg the CLI for terminal use, batch resolution and evidence export

The package is on PyPI. Every command below pins release 0.2.1, so what you run does not change underneath you. The same release can also be installed from its GitLab tag.

Try the CLI first#

uvx --from wikidata-google-knowledge-mcp==0.2.1 wdkg search "Tate Modern" --place London

The first run downloads the package and its dependencies; later runs use uv's cache. To keep both commands on your PATH:

uv tool install wikidata-google-knowledge-mcp==0.2.1
wdkg --version
wdkg status

wdkg status makes no network calls. It shows the endpoints, whether a Google key is present (never its value) and where the cache lives.

Claude Code#

MCP server only, available in every project:

claude mcp add --scope user wikidata-google-knowledge -- \
  uvx wikidata-google-knowledge-mcp@0.2.1

Or as a plugin, which adds the MCP server and the Agent Skill together:

claude plugin marketplace add https://gitlab.com/revanalex/wikidata-google-knowledge-mcp.git
claude plugin install wikidata-google-knowledge-mcp@wikidata-google-knowledge-mcp

Check it with claude mcp list; the server should show as connected. (Servers added with --scope project go into .mcp.json and wait for your approval the next time you start claude in that project.)

Cursor#

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "wikidata-google-knowledge": {
      "command": "uvx",
      "args": ["wikidata-google-knowledge-mcp@0.2.1"]
    }
  }
}

Reload the window and approve the server when Cursor asks. With the Cursor CLI, approve it once and list its tools:

cursor-agent mcp enable wikidata-google-knowledge
cursor-agent mcp list-tools wikidata-google-knowledge

Codex#

codex mcp add wikidata-google-knowledge -- \
  uvx wikidata-google-knowledge-mcp@0.2.1

or edit ~/.codex/config.toml:

[mcp_servers.wikidata-google-knowledge]
command = "uvx"
args = ["wikidata-google-knowledge-mcp@0.2.1"]
startup_timeout_sec = 60   # the first start downloads the package

Codex can also load the plugin (MCP server and skill) from the repository:

codex plugin marketplace add https://gitlab.com/revanalex/wikidata-google-knowledge-mcp.git
codex plugin add wikidata-google-knowledge-mcp@wikidata-google-knowledge-mcp

Other MCP clients#

Any client that launches stdio servers can use:

uvx wikidata-google-knowledge-mcp@0.2.1

Run it by hand with --help to see a short setup note; without arguments it waits for a client on stdin and writes only MCP protocol messages to stdout.

The server is listed in the official MCP Registry as com.dondego/wikidata-google-knowledge-mcp (PyPI package, stdio), so clients and directories that read the registry can install it from there.

From the GitLab release tag#

Every command above also works with the release tag instead of PyPI; uv then builds the package from source (it needs git):

uvx --from git+https://gitlab.com/revanalex/wikidata-google-knowledge-mcp@v0.2.1 wdkg --version
uvx --from git+https://gitlab.com/revanalex/wikidata-google-knowledge-mcp@v0.2.1 wikidata-google-knowledge-mcp

Release files and their SHA256 checksums are attached to the GitLab release.

Using the skill#

The skill in skills/wikidata-google-knowledge/ is plain Markdown that tells an agent when to use which tool, and when to switch to wdkg resolve-batch. Plugin installs load it automatically. Whether an agent picks it up without being asked depends on the client, so if it does not, name it: "Use the wikidata-google-knowledge skill to resolve these venues."

Optional: Google Knowledge Graph#

Everything above works with Wikidata alone. Google adds a second candidate source and exact id joins (how they are used).

  1. Create an API key for the Knowledge Graph Search API (Google's prerequisites) and restrict it to that API.
  2. Give it to the server or CLI as GOOGLE_KNOWLEDGE_GRAPH_API_KEY, or put one line in ~/.config/wikidata-google-knowledge-mcp/secrets.env (chmod 600). The file is read, never executed, and also works for desktop clients that do not pass your shell environment.

GOOGLE_KNOWLEDGE_GRAPH_API_KEY=your-key-here

  1. wdkg status should now report "present": true and the source.

For Codex, forward the variable with env_vars = ["GOOGLE_KNOWLEDGE_GRAPH_API_KEY"] in the server block; for Claude Code, claude mcp add ... -e GOOGLE_KNOWLEDGE_GRAPH_API_KEY=... stores the value in your Claude configuration, so the secrets file is usually the better place.

The Knowledge Graph Search API is an older Google API whose quotas and terms Google sets and may change. Nothing in this project depends on it being available.

Uninstall#

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

Documentation for version 0.2.1 · Changelog · Issues