01 / Getting Started

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

02 / Architecture

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:

1. Section-Level Extraction

Retrieve only the requested section (e.g. `Architecture` of Transformer model) with heading hierarchy.

2. 200-Word Lead Summary

Extract concise article overviews for fast multi-entity verification.

3. Link Graph Traversal

Follow hyperlinked concept graphs recursively without manual prompt chaining.

4. Local SQLite Cache

7-day TTL local cache prevents redundant HTTP round-trips for high-frequency queries.


03 / Agent Setup

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"]
    }
  }
}

04 / API & Tools

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.

05 / Example

Surgical Section Queries

Models can extract exact sections without loading the entire article:

wikipedia.get_page(
    title="Transformer (machine learning model)",
    sections=["Architecture", "Training"]
)