Quickstart
Run wikipedia-mcp locally with zero configuration:
# Run with uvx
uvx mcp-server-wikipedia
# Or clone and run directly
git clone https://github.com/surendranb/wikipedia-mcp-server.git
cd wikipedia-mcp-server
pip install -r requirements.txt
python server.py
The Context Waste Challenge
LLMs frequently hallucinate historical dates, mathematical definitions, and technical biographies. While Wikipedia contains verified ground truth, dumping raw 15,000-word articles into context windows burns tokens and degrades reasoning.
Wikipedia MCP provides surgical precision:
Retrieve only the requested section (e.g. `Architecture` of Transformer model) with heading hierarchy.
Extract concise article overviews for fast multi-entity verification.
Follow hyperlinked concept graphs recursively without manual prompt chaining.
7-day TTL local cache prevents redundant HTTP round-trips for high-frequency queries.
Agent Configuration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"wikipedia": {
"command": "uvx",
"args": ["mcp-server-wikipedia"]
}
}
}
Cursor / Antigravity
Add to IDE settings:
{
"mcpServers": {
"wikipedia": {
"command": "python",
"args": ["/absolute/path/to/wikipedia-mcp-server/server.py"]
}
}
}
Tool & Parameter Reference
| Tool Name | Parameters | Description |
|---|---|---|
get_page |
title, sections |
Retrieves full article or specific section text in structured JSON. |
get_summary |
title |
Fast 200-word lead extract. |
search_wikipedia |
query, limit |
Full-text search returning page titles and descriptions. |
get_links |
title, limit |
Extracts outgoing wiki links from an article. |
Surgical Section Queries
Models can extract exact sections without loading the entire article:
wikipedia.get_page(
title="Transformer (machine learning model)",
sections=["Architecture", "Training"]
)