Guides
Wikipedia API in 2026: endpoints, rate limits, Python, Wikidata and MCP servers
The Wikipedia API is free and needs no key for reading: send GET requests to the MediaWiki Action API at https://en.wikipedia.org/w/api.php for search, extracts and parsing, or to the Wikimedia REST API at https://en.wikipedia.org/api/rest_v1/ for page summaries. Every request must carry a descriptive User-Agent with contact details, and since March 2026 Wikimedia enforces per-minute rate limits: 200 requests a minute for a script with a compliant User-Agent, 10 for requests that carry nothing to identify them, and up to 2,000 once you authenticate as an established account. Wikidata, pageviews, bulk dumps and MCP servers for Claude, Cursor and ChatGPT are covered below.
Everything here was read from Wikimedia’s own documentation, and the endpoints were called, on November 15, 2026.
What changed in the Wikipedia API in 2026
Wikimedia introduced global API rate limits and shut down its API Portal in 2026, so most tutorials now quote limits and URLs that no longer apply. The dates, from the Wikimedia API changelog and the API Portal deprecation page:
| Date | Change |
|---|---|
| January 2026 | Interactive REST API docs moved from /api/rest_v1/ to each wiki’s Special:RestSandbox page |
| March 12, 2026 | Phase 1 of API rate limiting announced and enforced |
| March 31, 2026 | api.wikimedia.org endpoints moved onto the new rate limits; format=php in the Action API deprecated (sunset May 1, 2026) |
| Week of April 28, 2026 | Phase 2: identified requests are now also rate limited |
| June 15 and 22, 2026 | API Portal wiki set to read-only, then redirected to mediawiki.org/wiki/Wikimedia_APIs |
| July 2026 to June 2027 | New URLs to replace api.wikimedia.org endpoints, then a gradual deprecation “of several months” before the old ones stop working |
| October 2026 | Fix for OAuth 2 client credentials being treated as anonymous; it applies only to apps registered on or after October 19, 2026 |
Two smaller changes affect old code. action=parse now warns that prop=sections “has been deprecated. Please use “prop=tocdata” instead.” And the parsoid parameter to action=parse gave way to parser=parsoid in December 2025.
The Wikipedia and Wikimedia APIs at a glance
Wikimedia runs several APIs, and the right one depends on whether you need search, a short summary, full text, structured facts or the whole corpus.
| API | Base URL | Best for | Auth |
|---|---|---|---|
| MediaWiki Action API | https://en.wikipedia.org/w/api.php |
Search, plain-text extracts, parsed sections, links, categories, revisions, batching up to 50 titles | None to read |
| Wikimedia REST API | https://en.wikipedia.org/api/rest_v1/ |
Page summaries, featured content feeds; cached at the edge | None |
| MediaWiki REST API | https://en.wikipedia.org/w/rest.php/v1/ |
Search, page source and HTML, history | None to read |
| api.wikimedia.org (old “Core API”) | https://api.wikimedia.org/core/v1/{project}/{language}/ |
Same as the MediaWiki REST API | None to read; being deprecated |
| Analytics API (pageviews) | https://wikimedia.org/api/rest_v1/metrics/pageviews/ |
Daily or monthly views per article since July 1, 2015 | None |
| Wikidata Action and REST APIs | https://www.wikidata.org/w/api.php, /w/rest.php/wikibase/v1/ |
Entity search and JSON for items like Q42 | None to read |
| Wikidata Query Service | https://query.wikidata.org/sparql |
SPARQL over the main Wikidata graph | None |
| Dumps | https://dumps.wikimedia.org/ |
Every article at once, monthly | None |
| Wikimedia Enterprise | https://enterprise.wikimedia.com/ |
High-volume commercial reuse, snapshots, realtime | Account (free tier) |
Each wiki has its own host, so French Wikipedia is fr.wikipedia.org/w/api.php and Wikimedia Commons is commons.wikimedia.org/w/api.php. The parameters are the same.
Wikipedia API rate limits in 2026
Wikimedia’s rate limits are counted per minute and per client, across every Wikimedia site, for both the Action API and the REST APIs. The table is from Wikimedia APIs/Rate limits (last edited November 8, 2026), which notes the limits “are new in 2026 and are subject to experimentation and change”:
| Client | Limit (requests a minute) |
|---|---|
| Requests with nothing to identify them but an IP address | 10 |
| Unauthenticated requests from a web browser | 200 |
| Unauthenticated bot requests with a compliant User-Agent | 200 |
| Third-party MediaWiki wikis (for example InstantCommons) | 200 |
| Authenticated users who are new or have few edits | 200 |
| Authenticated established editors | 2,000 |
| Users with extended global rights, such as stewards | Exempt |
| Bot accounts with a bot flag on any wiki | Exempt |
| Server-side requests from Wikimedia Cloud Services (Toolforge, PAWS, Cloud VPS) with a compliant User-Agent | Exempt |
Over the limit, the gateway returns HTTP 429 Too Many Requests, and an overloaded backend can return 503. Both usually carry a Retry-After header; without one, the page says to “wait at least five seconds, or implement exponential back-off.” The same page asks clients to keep concurrent requests to 3 or fewer. Edits, moves and uploads have separate per-wiki limits on top of these (most Wikimedia projects allow logged-out users eight edits a minute), and an Action API request over those limits returns the error code ratelimited.
The figures most guides still print are history. The API Portal used to allow 500 requests an hour per IP address without a token and 5,000 an hour with one; those limits applied only to api.wikimedia.org, and api.wikimedia.org moved to the new limits on March 31, 2026. The Wikidata Query Service and the Lift Wing machine-learning API keep their own limits.
The User-Agent rule and the 403 it causes
Wikimedia requires a User-Agent header that names your tool and gives a way to contact you, and a missing or generic one is rejected. The User-Agent policy gives the format and this example:
User-Agent: CoolBot/0.0 (https://example.org/coolbot/; coolbot@example.org) generic-library/0.0The general form is <client name>/<version> (<contact information>) <library/framework name>/<version>. Contact information can be an email address, a website, or a wiki user such as (wikipedia:de; User:DuesenBot). The policy also says not to copy a browser’s User-Agent, because “bot-like behavior with a browser’s user agent will be assumed malicious”, and not to use generic agents such as “curl” or “Python-urllib”.
We tested it on November 15, 2026. With no User-Agent, and with the default python-requests/2.32.3, both api.php and /api/rest_v1/page/summary/ returned HTTP 403 with a plain-text body:
Please set a user-agent and respect our robot policy https://w.wiki/4wJS. See also https://phabricator.wikimedia.org/T400119.The same requests with a named User-Agent and an email address returned 200. Browser JavaScript cannot set User-Agent, so send an Api-User-Agent header instead.
Getting a Wikipedia API key or token
You need no key or token to read Wikipedia; a compliant User-Agent alone gets 200 requests a minute. Authenticate when you need more, or when you write. The rate-limit FAQ says single-user bots “should use the OAuth 2.0 client credentials flow”. The steps, from the client credentials page:
- Log in to a Wikimedia account. Your limit follows that account: 200 a minute while it is new, 2,000 once it is an established editor.
- Open Special:OAuthConsumerRegistration/propose/oauth2 on Meta-Wiki.
- Fill in the form and choose Client credentials as the OAuth 2 flow.
- Submit it. You get a client ID and a client secret.
- Exchange them for a short-lived access token with a POST to
https://meta.wikimedia.org/w/rest.php/oauth2/access_token(grant_type=client_credentials, plus the ID and secret), and send it asAuthorization: Bearer <token>. Request a new token when it expires.
Three caveats from Wikimedia’s pages. A fix for client-credentials requests being counted as anonymous applies only to apps registered on or after October 19, 2026, so register a new app if yours is older. Owner-only tokens (the “personal API token” the API Portal used to issue) and OAuth 1.0a still work, but count as unauthenticated for rate limiting unless your client returns the cookie the server sets on the first request. And API Portal keys keep working; you now manage them on Meta-Wiki. A bad client ID or secret returns HTTP 401 {"error":"invalid_client","error_description":"Client authentication failed"}.
For more than 2,000 requests a minute, Wikimedia lists three routes: a bot flag from a wiki community, running in Wikimedia Cloud Services, or Wikimedia Enterprise. Bot operators can write to bot-traffic@wikimedia.org.
Wikipedia API pricing and Wikimedia Enterprise
The public Wikipedia, Wikidata and pageview APIs cost nothing. Wikimedia’s paid product is Wikimedia Enterprise, built for companies that reuse content at scale, and it has a free account. The Enterprise pricing page, read November 15, 2026:
| Free account | Paid account | |
|---|---|---|
| On-demand API (one article at a time) | Up to 50,000 requests a month | Unlimited |
| Snapshot API (whole projects) | Monthly updates; up to 30 requests and 1,500 snapshot chunks a month | Up to daily updates; unlimited |
| Realtime API (streamed changes) | Not included | Streamed and hourly batches |
| Price | Free | Not published; Wikimedia calls paid pricing “bespoke” |
Calls made from inside Wikimedia Cloud Services (PAWS, Toolforge, Cloud VPS) get paid-level Enterprise access with no authorization header, per Meta-Wiki’s Enterprise access page. Mission-aligned projects that outgrow the free tier can request “exceptional access” through techpartnerships@wikimedia.org.
Wikipedia API endpoints
These endpoints cover most work. The paths come from Wikimedia’s endpoint map and parameter info, and the search, extract, summary, parse and pageview calls were run on November 15, 2026:
| Task | Endpoint | Key parameters |
|---|---|---|
| Full-text search | GET /w/api.php?action=query&list=search |
srsearch, srlimit (default 10, max 500), sroffset, srsort, srwhat |
| Search, REST style | GET /w/rest.php/v1/search/page?q=...&limit=... |
Returns key, title, excerpt, description |
| Title autocomplete | GET /w/rest.php/v1/search/title?q=... |
Prefix search on titles |
| Plain-text intro | GET /w/api.php?action=query&prop=extracts&exintro=1&explaintext=1 |
titles (up to 50), exlimit (max 20), exchars (max 1,200), exsentences (max 10) |
| Page summary | GET /api/rest_v1/page/summary/{title} |
Returns extract, description, thumbnail, wikibase_item |
| Parsed sections, links, categories | GET /w/api.php?action=parse&page=... |
`prop=tocdata |
| Wikitext source | GET /w/rest.php/v1/page/{title} |
Latest revision with source |
| Rendered HTML | GET /w/rest.php/v1/page/{title}/html |
|
| Page history | GET /w/rest.php/v1/page/{title}/history |
|
| Featured article and news | GET /api/rest_v1/feed/featured/{YYYY}/{MM}/{DD} |
|
| Pageviews | GET https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/{project}/{access}/{agent}/{article}/{granularity}/{start}/{end} |
agent=user to exclude bots |
Always add format=json&formatversion=2 to Action API calls; version 2 returns pages as a list and booleans as true. The REST Sandbox at en.wikipedia.org/wiki/Special:RestSandbox lists every REST endpoint and lets you try them.
Wikipedia search API
Wikipedia has two search endpoints, and both run the same CirrusSearch engine as the search box. list=search in the Action API takes the search operators the site supports, such as intitle:, incategory:, morelike: and insource:, and sorts by relevance, last_edit_desc, create_timestamp_desc, incoming_links_desc and more. It returns a continue object with sroffset for the next page, plus totalhits and a spelling suggestion. Searching “model context protocol” on November 15, 2026 returned 4,087 total hits.
The REST endpoint /w/rest.php/v1/search/page is simpler and returns each hit’s short description with it. For turning a name into a title as someone types, use /w/rest.php/v1/search/title. To go from a search hit to its Wikidata item, ask prop=pageprops&ppprop=wikibase_item for the titles.
Python example with requests
This client searches Wikipedia, pulls the plain-text intro, URL, revision ID and Wikidata ID for several titles in one request, and fetches a REST summary. It sets the User-Agent, sends maxlag=5 so it backs off when replicas lag, and waits on 429 and 503 using Retry-After. It needs only requests.
import osimport time
import requests
# Wikimedia requires a descriptive User-Agent with contact details.# A default like "python-requests/2.32.3" gets HTTP 403.USER_AGENT = os.environ.get( "WIKI_USER_AGENT", "MyResearchTool/1.0 (https://example.org/contact; you@example.org) python-requests",)
session = requests.Session()session.headers.update({"User-Agent": USER_AGENT, "Accept-Encoding": "gzip"})token = os.environ.get("WIKIMEDIA_ACCESS_TOKEN") # optional OAuth 2 access tokenif token: session.headers["Authorization"] = f"Bearer {token}"
ACTION_API = "https://en.wikipedia.org/w/api.php"REST_API = "https://en.wikipedia.org/api/rest_v1"
def get(url, params=None, retries=5): """GET with Retry-After handling for 429 and 503, and maxlag errors.""" for attempt in range(retries): resp = session.get(url, params=params, timeout=30) if resp.status_code in (429, 503): time.sleep(float(resp.headers.get("Retry-After", 5 * 2 ** attempt))) continue if resp.status_code == 403: raise RuntimeError(f"403: {resp.text[:200]}") # usually the User-Agent resp.raise_for_status() data = resp.json() if isinstance(data, dict) and data.get("error", {}).get("code") == "maxlag": time.sleep(float(resp.headers.get("Retry-After", 5))) continue return data raise RuntimeError(f"gave up after {retries} tries: {url}")
def search(query, limit=5): """Full-text search (CirrusSearch) through the Action API.""" data = get(ACTION_API, { "action": "query", "list": "search", "srsearch": query, "srlimit": limit, "format": "json", "formatversion": 2, "maxlag": 5, }) return [(hit["title"], hit["pageid"]) for hit in data["query"]["search"]]
def intro_text(titles): """Plain-text lead sections for up to 20 titles in one request.""" data = get(ACTION_API, { "action": "query", "prop": "extracts|info|pageprops", "exintro": 1, "explaintext": 1, "exlimit": "max", "inprop": "url", "ppprop": "wikibase_item", "titles": "|".join(titles), "redirects": 1, "format": "json", "formatversion": 2, "maxlag": 5, }) out = {} for page in data["query"]["pages"]: if page.get("missing"): out[page["title"]] = None continue out[page["title"]] = { "url": page["fullurl"], "revid": page["lastrevid"], "wikidata": page.get("pageprops", {}).get("wikibase_item"), "text": page.get("extract", ""), } return out
def summary(title): """Short summary from the Wikimedia REST API (cached at the edge).""" return get(f"{REST_API}/page/summary/{title.replace(' ', '_')}")
if __name__ == "__main__": hits = search("model context protocol") print(hits) pages = intro_text([title for title, _ in hits[:3]]) for title, page in pages.items(): print(title, page and page["wikidata"], page and page["url"], page and page["revid"]) print((page or {}).get("text", "")[:160], "\n") s = summary("Model Context Protocol") print(s["description"], s["content_urls"]["desktop"]["page"])We ran it on November 15, 2026. It printed five hits led by ('Model Context Protocol', 79706999), then the article’s Wikidata ID Q133436854, its URL and revision 1385692827, and the REST description “Protocol for communicating between LLMs and applications”. With WIKI_USER_AGENT set to python-requests/2.32.3, it stopped at the 403 branch. Put your own tool name and email in the User-Agent before you run it, and store the revision ID with any text you keep: https://en.wikipedia.org/w/index.php?oldid=<revid> links to exactly what you read.
Two Python packages wrap the same calls. Wikipedia-API (version 0.16.0, September 4, 2026) requires a user_agent argument that “Must include contact information”, retries 429 responses with backoff, and has an async client: wikipediaapi.Wikipedia(user_agent='MyProjectName (merlin@example.com)', language='en'). The older wikipedia package, used in many tutorials, has had no release since version 1.4.0 in November 2014.
Wikipedia API errors and fixes
Most Action API errors come back as HTTP 200 with an error object, so check the body, not just the status. The bodies below were recorded on November 15, 2026, except where the table says the docs.
| Symptom | Body or header | Cause | Fix |
|---|---|---|---|
HTTP 403, text/plain |
Please set a user-agent and respect our robot policy https://w.wiki/4wJS. See also https://phabricator.wikimedia.org/T400119. |
No User-Agent, or a generic one like python-requests/x |
Send tool/version (contact) library/version |
| HTTP 429 | Retry-After header (per the docs; not triggered in our test) |
Over the per-minute limit for your client group | Wait Retry-After seconds; fewer than 3 parallel requests; authenticate |
| HTTP 503 | Retry-After header (per the docs) |
A backend such as a database is overloaded | Wait and retry with backoff |
200 with "code":"maxlag" |
Error object (per the docs) | Replica lag over your maxlag value |
Wait and retry; keep maxlag=5 on batch jobs |
200 with "missing":true on a page |
{"ns":0,"title":"This page does not exist zzqx","missing":true} |
No article with that title | Search first; check normalized and redirects |
404 from /api/rest_v1/page/summary/ |
{"status":404,"type":"Internal error"} |
No article with that title | Same |
404 from /w/rest.php/v1/page/.../bare |
{"errorKey":"rest-nonexistent-title","messageTranslations":{"en":"The specified page (This_page_does_not_exist_zzqx) does not exist"},"httpCode":404,"httpReason":"Not Found"} |
Same | Same |
200 with "code":"badvalue" |
Unrecognized value for parameter "action": nope. |
Misspelled parameter value | Check api.php?action=help |
200 with a warnings block |
"prop=sections" has been deprecated. Please use "prop=tocdata" instead. |
Deprecated parameter | Switch before it is removed |
200 with "code":"ratelimited" |
Error object (per the docs) | Edit or other action limit | Slow down; use exponential backoff |
| 401 from the OAuth token endpoint | {"error":"invalid_client","error_description":"Client authentication failed"} |
Wrong client ID or secret | Copy them again from the registration |
| 400 from the pageviews API | {"detail":"access should be equal to one of the allowed values: [all-access, desktop, mobile-app, mobile-web]","status":400,"title":"Bad Request",...} |
Bad path segment | Use the allowed values the message lists |
200 with "code":"missingparam" from wbsearchentities |
The "language" parameter must be set. |
Wikidata search needs language |
Add language=en |
Wikidata API and the Wikidata Query Service
Wikidata holds the structured facts behind Wikipedia, such as founding dates, headquarters and identifiers, as items with IDs like Q116758847 (Anthropic). It has its own APIs, and its data is CC0, so you can reuse it without attribution. Three calls cover most needs:
- Find an item by name:
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Anthropic&language=en&type=item&format=json. It returns the ID, label and description of each match;languageis required. - Get one item as JSON:
https://www.wikidata.org/wiki/Special:EntityData/Q116758847.json, or a single field from the REST API, such ashttps://www.wikidata.org/w/rest.php/wikibase/v1/entities/items/Q116758847/labels/en, which returned"Anthropic". - Ask a question across items: SPARQL at
https://query.wikidata.org/sparql?format=json&query=....
The Query Service user manual (last edited October 1, 2026) sets hard limits: a 60-second deadline per query, 60 seconds of processing time per 60 seconds for each client (User-Agent plus IP), 30 error queries a minute, and 5 parallel queries per IP. Clients over the limits get HTTP 429 with Retry-After, and ones that ignore it “can be temporarily banned.” A malformed query returns HTTP 400 in plain text, starting with the query and a MalformedQueryException.
Since May 9, 2025, query.wikidata.org holds only the main graph. Scholarly articles moved to a separate service at https://query-scholarly.wikidata.org/, and a query that needs both must use SPARQL federation, according to the graph split page. A query about scholarly papers that returns nothing on the main endpoint may need the scholarly one.
This client finds an item, asks SPARQL for three facts about it, and pulls a week of pageviews for an article:
import osimport time
import requests
USER_AGENT = os.environ.get( "WIKI_USER_AGENT", "MyResearchTool/1.0 (https://example.org/contact; you@example.org) python-requests",)HEADERS = {"User-Agent": USER_AGENT}
def find_item(name, language="en"): """Top Wikidata items whose label or alias matches name.""" resp = requests.get("https://www.wikidata.org/w/api.php", headers=HEADERS, timeout=30, params={ "action": "wbsearchentities", "search": name, "language": language, "type": "item", "limit": 5, "format": "json", }) resp.raise_for_status() return [(hit["id"], hit.get("label"), hit.get("description")) for hit in resp.json()["search"]]
def sparql(query, retries=3): """Run a SPARQL query on the Wikidata Query Service (60-second limit).""" for attempt in range(retries): resp = requests.get( "https://query.wikidata.org/sparql", params={"query": query, "format": "json"}, headers=HEADERS, timeout=70, ) if resp.status_code == 429: time.sleep(float(resp.headers.get("Retry-After", 10 * (attempt + 1)))) continue resp.raise_for_status() return resp.json()["results"]["bindings"] raise RuntimeError("Wikidata Query Service kept returning 429")
def pageviews(article, start, end, project="en.wikipedia"): """Daily views by people (agent=user) for one article, dates as YYYYMMDD.""" url = ( "https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/" f"{project}/all-access/user/{article.replace(' ', '_')}/daily/{start}/{end}" ) resp = requests.get(url, headers=HEADERS, timeout=30) resp.raise_for_status() return [(item["timestamp"][:8], item["views"]) for item in resp.json()["items"]]
if __name__ == "__main__": items = find_item("Anthropic") print(items) qid = items[0][0] rows = sparql(f""" SELECT ?inception ?hqLabel ?website WHERE {{ OPTIONAL {{ wd:{qid} wdt:P571 ?inception . }} OPTIONAL {{ wd:{qid} wdt:P159 ?hq . }} OPTIONAL {{ wd:{qid} wdt:P856 ?website . }} SERVICE wikibase:label {{ bd:serviceParam wikibase:language "en" . }} }}""") for row in rows: print({key: value["value"] for key, value in row.items()}) print(pageviews("Model Context Protocol", "20261101", "20261107"))On November 15, 2026 it printed Q116758847 as the top match, then {'inception': '2021-01-26T00:00:00Z', 'hqLabel': 'San Francisco', 'website': 'https://www.anthropic.com/'}, then daily views for the Model Context Protocol article from 785 on November 1 to 1,527 on November 3.
Wikipedia pageviews API
The pageviews endpoints in the Analytics API return views per article, per project or for the most-read pages, with data starting July 1, 2015, per the Analytics API reference. The per-article path takes the project (en.wikipedia), access (all-access, desktop, mobile-app, mobile-web), agent (user for people, or all-agents), the article title with underscores, daily or monthly, and start and end dates. Use agent=user for demand questions; automated traffic is large and uneven.
Downloading all of Wikipedia: dumps and snapshots
For whole-corpus work, download a dump instead of calling the API millions of times; Wikimedia’s FAQ says research that outgrows the authenticated limits should probably be “using dumps”. English Wikipedia dumps are listed at dumps.wikimedia.org/enwiki/, with runs dated the 1st of each month (20260801 through 20261101 on November 15, 2026). The current articles file, enwiki-latest-pages-articles-multistream.xml.bz2, was 27,019,419,473 bytes (about 27 GB compressed), last modified November 7, 2026. It holds wikitext, so you parse templates yourself.
For rendered HTML, Wikimedia Enterprise’s Snapshot API is the current route: its free account gets monthly snapshots in wikitext and HTML. Older HTML dumps remain archived at dumps.wikimedia.org/other/enterprise_html/. For live changes, the EventStreams API streams recent edits across all wikis.
Wikipedia MCP servers
The Wikimedia Foundation does not run an MCP server for Wikipedia article content. Two official Wikimedia servers exist for neighbouring jobs, and community servers fill the gap. As of November 15, 2026:
| Server | Run by | Transport | What it does | Auth |
|---|---|---|---|---|
Wikidata MCP, https://wd-mcp.wmcloud.org/mcp/ |
Wikimedia Deutschland (wmde/WikidataMCP, 35 stars, BSD-3-Clause, last push September 21, 2026) | Remote, streamable HTTP | search_items, search_properties (hybrid keyword and vector search), get_statements, get_statement_values, get_instance_and_subclass_hierarchy, execute_sparql |
None |
Wikimedia Enterprise docs, https://enterprise.wikimedia.com/mcp |
Wikimedia Enterprise | Remote, streamable HTTP | Searches the Enterprise API documentation only; no article content | None |
| Rudra-ravi/wikipedia-mcp | Community | Local stdio, or HTTP | search_wikipedia, get_article, get_summary, get_sections, get_links, get_coordinates, get_related_topics, summarize_article_for_query, summarize_article_section, extract_key_facts; any language via --language or --country |
None; optional token |
| cyanheads/wikipedia-mcp-server | Community | Local stdio | Seven tools including search, summary, full article or one section with tables, references with DOIs, nearby pages and language editions | None |
| zzaebok/mcp-wikidata | Community | Local stdio | search_entity, search_property, get_properties, execute_sparql, get_metadata |
None |
Rudra-ravi/wikipedia-mcp is the most-starred Wikipedia server (310 stars, MIT, version 2.0.1 on PyPI released May 1, 2026, the date of its last push). cyanheads/wikipedia-mcp-server is newer (6 stars, Apache-2.0, last push November 13, 2026, version 0.1.10 in the official MCP registry), and returns the revision ID with every read. zzaebok/mcp-wikidata has 49 stars and was last pushed March 27, 2026. The Wikidata MCP answered an initialize call on November 15, 2026 as “Wikidata MCP” version 1.15.0. The registry also lists hosted Wikipedia servers run by companies; a hosted server reads Wikipedia on its operator’s terms and sees your queries.
wikipedia-mcp sends its own User-Agent, WikipediaMCPServer/<version> (https://github.com/rudra-ravi/wikipedia-mcp), so every user of it shares the 200-a-minute bot limit per client. Its --access-token option sends a bearer token; under the 2026 rules an owner-only token counts as unauthenticated unless the client returns the server’s cookie, and we did not test whether this server does.
Install a Wikipedia or Wikidata MCP server in Claude, Cursor and ChatGPT
The remote Wikidata MCP needs no install, and wikipedia-mcp runs locally after pipx install wikipedia-mcp (the README’s recommended method for Claude Desktop). The snippets come from each project’s README and the client docs.
Claude Desktop
For the remote Wikidata server, open Customize > Connectors > Add > Add custom connector, paste https://wd-mcp.wmcloud.org/mcp/, and leave the OAuth fields empty. For local wikipedia-mcp, open Settings > Developer > Edit Config and add it to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):
{ "mcpServers": { "wikipedia": { "command": "wikipedia-mcp", "args": ["--language", "en"] } }}If Claude Desktop cannot find the command, use the full path that which wikipedia-mcp (or where wikipedia-mcp on Windows) prints. Quit and reopen Claude Desktop after editing.
Claude Code
# Remote Wikidata MCP from Wikimedia Deutschlandclaude mcp add --transport http wikidata https://wd-mcp.wmcloud.org/mcp/
# Local Wikipedia server, available in every projectclaude mcp add --transport stdio wikipedia -s user -- wikipedia-mcp --language en
# cyanheads server through npx (needs Node.js)claude mcp add --transport stdio wikipedia-cy -s user -- npx -y @cyanheads/wikipedia-mcp-serverCursor
Add servers to ~/.cursor/mcp.json for every project, or .cursor/mcp.json in one project:
{ "mcpServers": { "wikidata": { "url": "https://wd-mcp.wmcloud.org/mcp/" }, "wikipedia": { "command": "wikipedia-mcp", "args": ["--language", "en"] } }}ChatGPT
ChatGPT connects to remote MCP servers over SSE or streaming HTTP, so the Wikidata MCP can be added directly and a local Wikipedia server cannot. OpenAI’s custom MCP server guide says to go to ChatGPT Plugins, select the plus button, then Add custom MCP server, enter the server URL, and choose an authentication option; No authentication fits the Wikidata MCP. A server on your own machine needs OpenAI’s Secure MCP Tunnel. Workspace permissions apply.
Wikipedia in Claude
Claude can read Wikipedia two ways: its web search and fetch tools open pages like any other site, and an MCP server gives it structured calls that return clean text, sections and IDs. The MCP route is better for repeated lookups, for a specific language edition, or when you want the revision ID kept with each answer; the Claude web search guide covers the built-in tools. For Wikidata facts, the Wikimedia Deutschland server above is official and needs no key.
Licensing and attribution for Wikipedia text
Wikipedia text is licensed under CC BY-SA 4.0 (and, unless a page says otherwise, the GFDL), so you may reuse it, including commercially, if you credit it and share changes under the same licence. Wikipedia’s reuse page says credit can be a hyperlink or URL to the page you reused, and that each copy must carry a licensing notice linking to https://creativecommons.org/licenses/by-sa/4.0/. If you modify the text, you must license your changes under CC BY-SA 4.0 or later. Images and other media have their own licences on their file pages.
Wikidata is different: all of its data is CC0, the equivalent of the public domain, per Wikidata:Licensing. Wikimedia’s access policy adds that using the APIs means agreeing to the Wikimedia Terms of Use.
Choosing a route
| You need | Use | Why |
|---|---|---|
| A paragraph about a topic, in a script | REST page/summary |
One cached call, returns description and Wikidata ID |
| Search plus clean text for many articles | Action API list=search then prop=extracts |
Batches up to 20 extracts or 50 titles per call |
| One section, links or categories | Action API action=parse |
Fine-grained prop control |
| Facts like founding date or headquarters | Wikidata API or SPARQL | Structured, CC0, no parsing |
| Attention over time | Pageviews API | Daily data back to July 2015 |
| More than 2,000 requests a minute, or a full copy | Dumps, Enterprise snapshots, or Wikimedia Cloud Services | Wikimedia’s own advice for high volume |
| Wikipedia in Claude, Cursor or ChatGPT | An MCP server from the table above | No code; the Wikidata MCP is official |
| A cited answer drawn from Wikipedia and other sources | A research tool | Reads and cites across sources for you |
Hyperresearch reads Wikipedia articles in full, including sections, infoboxes, tables and dated revisions, and looks up Wikidata reference facts about named organisations, as two of its 120+ data sources. For other public data APIs, see the FRED API in Python and Census API guides; for more MCP servers, see MCP servers for research data and the Reddit MCP guide; for giving an agent general search, see How to add web search to an AI agent.
Sources
- Wikimedia APIs (mediawiki.org): https://www.mediawiki.org/wiki/Wikimedia_APIs
- Wikimedia APIs/Rate limits (last edited November 8, 2026): https://www.mediawiki.org/wiki/Wikimedia_APIs/Rate_limits
- Rate limits FAQ: https://www.mediawiki.org/wiki/Wikimedia_APIs/Rate_limits/FAQ
- Wikimedia APIs/Changelog: https://www.mediawiki.org/wiki/Wikimedia_APIs/Changelog
- API Portal/Deprecation (Wikitech): https://wikitech.wikimedia.org/wiki/API_Portal/Deprecation
- Wikimedia Foundation User-Agent Policy: https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy
- API:Etiquette: https://www.mediawiki.org/wiki/API:Etiquette
- Wikimedia APIs/Access policy: https://www.mediawiki.org/wiki/Wikimedia_APIs/Access_policy
- OAuth/Client credentials: https://www.mediawiki.org/wiki/OAuth/Client_credentials
- Wikimedia REST API: https://www.mediawiki.org/wiki/Wikimedia_REST_API
- Wikimedia Enterprise pricing: https://enterprise.wikimedia.com/pricing/
- Wikimedia Enterprise/Access (Meta-Wiki): https://meta.wikimedia.org/wiki/Wikimedia_Enterprise/Access
- Wikimedia Enterprise, AI agents and MCP: https://enterprise.wikimedia.com/docs/agents/
- Wikidata Query Service user manual: https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual
- WDQS graph split: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/WDQS_graph_split
- Wikidata:MCP: https://www.wikidata.org/wiki/Wikidata:MCP
- Wikidata:Licensing: https://www.wikidata.org/wiki/Wikidata:Licensing
- Analytics API, page views: https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/reference/page-views.html
- English Wikipedia dumps: https://dumps.wikimedia.org/enwiki/
- Wikipedia:Reusing Wikipedia content: https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content
- Official MCP registry: https://registry.modelcontextprotocol.io
- OpenAI, Add custom MCP server: https://developers.openai.com/api/docs/guides/developer-mode
- Wikipedia-API on PyPI: https://pypi.org/project/Wikipedia-API/
- wikipedia-mcp on PyPI: https://pypi.org/project/wikipedia-mcp/
