Get the FREE Ultimate OpenClaw Setup Guide →

wikipedia

A Model Context Protocol (MCP) server that retrieves information from Wikipedia to provide context to LLMs.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rudra-ravi-wikipedia-mcp wikipedia-mcp \
  --env WIKIPEDIA_ACCESS_TOKEN="Optional: Personal Access Token to avoid rate limiting (set if needed)"

How to use

This MCP server provides real-time access to Wikipedia content via a standardized MCP interface, enabling LLMs to ground their responses with factual information from Wikipedia. It supports a range of capabilities including searching for articles, retrieving full article content, generating concise summaries, extracting specific sections, discovering internal and related links, and surfacing related topics. The server can operate with multiple language and locale options (language, country, language variants) and offers optional caching to improve performance. It also supports modern MCP transports such as stdio, http, and streamable-http, with optional authentication modes for secure network usage. To use it with Claude Desktop or other MCP clients, run the server with the desired transport and transport-specific options, and point the client at the server’s MCP endpoint.

Key capabilities include:

  • Search Wikipedia articles by query and language/country settings.
  • Retrieve full article content or targeted sections.
  • Generate article summaries suitable for prompt grounding.
  • Discover links within articles and related topics for context expansion.
  • Multi-language support with language and locale variants (e.g., zh-hans, sr-latn).
  • Optional caching for faster repeated queries.
  • Secure transport options (static tokens or JWT) for exposed network usage.
  • Compatibility with Google ADK and other frameworks using strict function calling schemas.

How to install

Prerequisites:

  • Python 3.8+ and pip, or use pipx for a global install (recommended for Claude Desktop).
  • Optional: a virtual environment if isolating dependencies.

Install methods:

  1. Using pipx (recommended for Claude Desktop):
pip install pipx
pipx ensurepath
pipx install wikipedia-mcp

This makes the wikipedia-mcp command available system-wide.

  1. Installing via Smithery (automated client installation):
npx -y @smithery/cli install @Rudra-ravi/wikipedia-mcp --client claude
  1. From PyPI (alternative):
pip install wikipedia-mcp
  1. Using a virtual environment (manual):
# Create a virtual environment
python3 -m venv venv

# Activate the virtual environment
source venv/bin/activate

# Install the package
pip install wikipedia-mcp
  1. From source (development mode):
# Clone the repository
git clone https://github.com/rudra-ravi/wikipedia-mcp.git
cd wikipedia-mcp

# Create and activate a virtual environment
python3 -m venv wikipedia-mcp-env
source wikipedia-mcp-env/bin/activate

# Install in development mode
pip install -e .
  1. Docker/Kubernetes (optional example):
docker build -t wikipedia-mcp .
docker run --rm -p 8080:8080 wikipedia-mcp --transport http --host 0.0.0.0 --port 8080 --path /mcp

Additional notes

Tips and common considerations:

  • If you encounter rate-limiting on Wikipedia, consider providing a WIKIPEDIA_ACCESS_TOKEN via environment variable or CLI option to increase limits.
  • Transport options: stdio is suitable for local desktop clients (e.g., Claude Desktop), while http or streamable-http is used for networked deployments. Consider enabling caching with --enable-cache for performance.
  • Language and locale: use --language or --country to tailor results to a preferred language and region. Variants like zh-hans (Simplified Chinese) and zh-tw (Traditional Chinese) are supported.
  • Security: when exposing the MCP server to networks, prefer http with authentication (static token or JWT) and ensure appropriate firewall rules.
  • Claude Desktop integration: you can point Claude Desktop to the wikipedia-mcp command (or full path) in its MCP configuration. If you run into connection issues, specify the full path to the executable.
  • Token management: if you use an access token, keep it secure and rotate as needed. Store tokens in environment variables or secret managers where possible.

Related MCP Servers

Sponsor this space

Reach thousands of developers