srj-wikidata-mcp
Provides tools for reading and writing Wikidata items, including search, entity retrieval, SPARQL queries, and a two-step batch edit process with reference and rate-limit enforcement.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@srj-wikidata-mcpsearch for Stephen R. Jordan"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
srj-wikidata-mcp
A Model Context Protocol server for editing Wikidata, built around one constraint: an assistant cannot write a statement on its own.
It exists because maintaining an item properly is slow, repetitive work — a bibliographic record needs a title, a publication date, a page count, an ISBN and an identifier crosswalk, each one sourced — and that is exactly the kind of work an assistant should do and exactly the kind of work nobody should let an assistant do unsupervised. So it drafts and a human approves.
Reads are unrestricted. Writes are two-step — a plan is drafted, rendered for review, and applied only on explicit confirmation. There is no single-claim write tool, and there is no way to add an unsourced claim.
FastMCP, OAuth 2.1 + PKCE for Claude.ai's custom connector flow, Docker on
Render, public /healthz.
Why it is shaped this way
Wikidata's bot policy requires community approval before automated editing, and an LLM writing statements through the API at volume is a bot whatever it is called. This server is built for the other thing: a human approving a small, sourced, reviewable batch that is attributable in the revision history.
The constraints below are enforced in code, not documented as guidance.
Constraint | Effect |
Every | Unsourced claims are refused outright |
30 operations per plan | Large edits must be split and reviewed in pieces |
Two seconds between writes, | Respects the API under load rather than racing it |
Every edit summarised as assistant-prepared, human-approved | The revision history says what actually happened |
Plans live in memory only | A restart discards pending plans — an unapproved plan should not survive a deploy and get applied later against a changed item |
get_entity returns a count of unsourced statements alongside the claims,
because the number that matters when maintaining an item is not how many
statements it has but how many of them a reader can check.
Writes report failure honestly
An early version reported success whenever the API call did not raise. It did
not check whether the response actually confirmed the edit, so a rejected write
was indistinguishable from an accepted one. Every write path now confirms a
positive success marker in the response before reporting success, and
apply_plan returns per-operation results with the created or modified Q-id so
the caller can verify independently rather than trusting the return value.
This matters more than it sounds. An assistant that cannot tell a failed write from a successful one will confidently report work it never did.
Related MCP server: scholar-toolkit-mcp
Tools
Reads — unrestricted.
Tool | Purpose |
| API reachable; reports whether writes are enabled and as which user |
| Find Q-ids or P-ids by name |
| Labels, descriptions, statements with claim GUIDs, and a count of unsourced statements |
| Read-only query against |
Writes — two-step.
Tool | Purpose |
| Validate and render a batch. Touches nothing. Returns a |
| Execute a plan. Requires |
| Pending and applied plans in this process |
Supported operations: create_item, set_label, set_description,
add_claim, add_reference, remove_claim.
Setup
1. Register a Wikimedia OAuth consumer
At Special:OAuthConsumerRegistration:
Choose OAuth 2.0
Tick "This consumer is for use only by
<your username>" — owner-only, so there is no third-party authorisation dance and the token acts solely as youGrants: Edit existing pages, and Create, edit, and move pages
Copy the access token it issues
Leave WIKIDATA_OAUTH_TOKEN blank to run read-only. Every read tool still works.
2. Deploy
Render → New → Blueprint → point at this repo. render.yaml provisions it.
Then set both secrets in the dashboard (both are sync: false):
WIKIDATA_OAUTH_TOKENWIKIDATA_MCP_TOKEN—python3 -c "import secrets; print(secrets.token_urlsafe(48))"
3. Verify
curl https://your-service.onrender.com/healthzThen add https://your-service.onrender.com/mcp as a custom connector in Claude
settings and call health_check. If it returns anonymous: true, the OAuth
token is invalid, expired, or missing the edit grant.
Local
cp .env.example .env # fill in
pip install -r requirements.txt
uvicorn src.server:app --host 0.0.0.0 --port 8000Sourcing statements
Statements should be sourced from material that already exists and is
independently checkable — a publisher record, a library catalogue, a company
registry — using P854 (reference URL) or P248 (stated in).
Where two sources disagree, resolve the disagreement before citing either. Recording a date that a catalogue contradicts is worse than recording no date, because it creates a citation that fails on inspection.
Deployment note
This runs as a separate service from any other MCP server in the same account, on a different credential. A bug here cannot reach anything else.
Built by Stephen R. Jordan
This server cannot be deployed
Maintenance
Related MCP Connectors
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
Wikidata MCP — wraps Wikidata API (wikidata.org/w/api.php)
OAuth-protected, read-only-by-default MCP server for provenance-labeled QuillCaddie project memory.
MCP server for Product Management
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server designed for managing One-By-One (OBO) review sessions through specialized tools for creating, navigating, and resolving priority-scored items. It automates session tracking and item management within standardized JSON workflows to replace manual file-write operations.9AGPL 3.0
- AlicenseAqualityAmaintenanceComprehensive MCP server for academic research workflows, enabling paper searching across multiple sources, manuscript processing with citation placeholders, search caching, and citation export.11MIT
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).2913MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for searching academic, patent, and web sources, normalizing identifiers, and managing workspace records. Exposes the same operations to AI clients via MCP tools.37MIT