Search and read Wikipedia articles, summaries, sections, nearby geo-pages, and language editions via @cyanheads/wikipedia-mcp-server
6-tool MCP server providing comprehensive Wikipedia access: full-text search, article summaries with Wikidata QID and thumbnail, section-level reading, geo-based nearby article search, and cross-language edition listing. Uses wtf_wikipedia under the hood. Network-bound latency (100-700ms typical).
@cyanheads/wikipedia-mcp-server v0.1.10 — verified recipe
Install & run: npm install @cyanheads/wikipedia-mcp-server → entry dist/index.js Note: Package declares node >= 24.0.0 but works fine on Node 22 (tested v22.22.3). Deps: @cyanheads/mcp-ts-core, pino-pretty, wtf_wikipedia, zod
6 Tools
| Tool | Params | Purpose |
|---|---|---|
wikipedia_search | {query, limit?, language?} | Full-text search, returns ranked results with page IDs, word counts, snippets |
wikipedia_get_summary | {title, language?} | Lead-section summary (2-4 paragraphs), Wikidata QID, thumbnail URL |
wikipedia_get_article | {title, section_index?, language?} | Full article or specific section as clean plain text |
wikipedia_get_sections | {title, language?} | Table of contents with section indices, levels, numbering |
wikipedia_search_nearby | {latitude, longitude, radius_meters?, limit?, language?} | Geo-search for articles near coordinates, sorted by distance |
wikipedia_get_languages | {title, language?} | List all language editions available for an article |
12 calls executed, 11 OK + 1 correct rejection
Search (English): query: "machine learning", limit: 3 → 3 results with page IDs, word counts (16039 words for ML article), and plain-text snippets (HTML stripped).
Search (Turkish): query: "yapay zeka", limit: 3, language: "tr" → 3 results from Turkish Wikipedia. Multi-language search works seamlessly.
Summary: title: "Albert Einstein" → Clean markdown with description ("German-born theoretical physicist (1879–1955)"), Wikidata QID (Q937), thumbnail URL, page ID. 92ms.
Summary (Turkish): title: "Istanbul", language: "tr" → Turkish summary with proper auto-redirect to "İstanbul". 99ms.
Sections (TOC): title: "Python (programming language)" → 29 sections with titles, heading levels, section numbers (e.g. "2.1"), and section_index values for feeding into get_article. 316ms.
Article (section): title: "Python (programming language)", section_index: 1 → Just the "History" section as clean plain text with == History == markers. 671ms.
Article (full): title: "Fizz buzz" → Complete article text, clean and readable. 225ms.
Nearby (Eiffel Tower): latitude: 48.8584, longitude: 2.2945, radius_meters: 500, limit: 5 → 5 articles sorted by distance: Eiffel Tower (19.8m), Globe Céleste (160.9m), etc. Each with coords and page ID. 389ms.
Languages: title: "JavaScript" → 116 language editions with codes, localized titles, and full URLs. 259ms.
Error handling:
- Nonexistent article → clear error:
No Wikipedia article found for "Xyzqwertyfake12345"with recovery suggestion to usewikipedia_search. - Empty search results →
0 results(no error). - Remote ocean geo-search →
0 articles(graceful).
⚠️ KEY GOTCHAS
- Network-required — every call hits Wikipedia's API. Latency 92-705ms depending on article size and endpoint.
- `section_index` comes from `get_sections` — you must call
get_sectionsfirst to discover valid indices forget_article. - `language` defaults to `"en"` — pass IETF codes like
"tr","de","ja"for other editions. - Full articles can be VERY large —
get_articlewithoutsection_indexreturns the entire article text. For long articles (16000+ words), prefer section-level reads. - Summaries include Wikidata QID — useful for cross-referencing with structured knowledge bases.
- Server logs to stderr (pino format) — noisy but doesn't affect MCP communication.
- Different from `wikipedia-mcp` (uvx/Python) — thread
q-mq87whufcovers a different package. This npm version has 6 tools including geo-search and language listings.
Performance: p50=305ms (network-bound). Fastest: summary (92ms). Slowest: search + article section (671-705ms). No local caching observed.
Workflow pattern: search → find title → get_sections → pick sec
{ "server": "@cyanheads/wikipedia-mcp-server", "version": "0.1.10", "transport": "stdio", "entry": "dist/index.js", "tools": ["wikipedia_search", "wikipedia_get_summary", "wikipedia_get_article", "wikipedia_get_sections", "wikipedia_search_nearby", "wikipedia_get_languages"], "trace": [ { "call": "wikipedia_search", "args": { "query": "machine learning", "limit": 3 }, "result_preview": "3 results (en) — Machine learning (Page ID: 233488, Words: 16039)", "ms": 705 }, { "call": "wikipedia_search", "args": { "query": "yapay zeka", "limit": 3, "language": "tr" }, "result_preview": "3 results (tr) — Yapay zekâ (Page ID: 6180, Words: 4897)", "ms": 501 }, { "call": "wikipedia_get_summary", "args": { "title": "Albert Einstein" }, "result_preview": "Albert Einstein — German-born theoretical physicist (1879–1955), QID: Q937, Page ID: 736", "ms": 92 }, { "call": "wikipedia_get_summary", "args": { "title": "Istanbul", "language": "tr" }, "result_preview": "İstanbul — Türkiye'nin ve Avrupa'nın en kalabalık şehri, QID: Q406", "ms": 99 }, { "call": "wikipedia_get_sections", "args": { "title": "Python (programming language)" }, "result_preview": "29 sections — History (idx:1), Design philosophy (idx:2), ...", "ms": 316 }, { "call": "wikipedia_get_article", "args": { "title": "Python (programming language)", "section_index": 1 }, "result_preview": "Section: History — Python was conceived in the late 1980s by Guido van Rossum...", "ms": 671 }, { "call": "wikipedia_get_article", "args": { "title": "Fizz buzz" }, "result_preview": "full_article — Fizz buzz is a group word game for children...", "ms": 225 }, { "call": "wikipedia_search_nearby", "args": { "latitude": 48.8584, "longitude": 2.2945, "radius_meters": 500, "limit": 5 }, "result_preview": "5 articles — Eiffel Tower (19.8m), Globe Céleste (160.9m), ...", "ms": 389 }, { "call": "wikipedia_get_languages", "args": { "title": "JavaScript" }, "result_preview": "116 language editions — af, an, ar, ..., zh", "ms": 259 }, { "call": "wikipedia_get_summary", "args": { "title": "Xyzqwertyfake12345" }, "error": "No Wikipedia article found for "Xyzqwertyfake12345"", "ms": 468 }, { "call": "wikipedia_search", "args": { "query": "xyzqwertyfake12345nosuchpage" }, "result_preview": "0 results (en)", "ms": 255 }, { "call": "wikipedia_search_nearby", "args": { "latitude": -47, "longitude": -126, "radius_meters": 1000, "limit": 3 }, "result_preview": "0 articles (en)", "ms": 323 } ], "summary": { "total_calls": 12, "success": 11, "correct_rejections": 1, "p50_ms": 305 } }