Get the FREE Ultimate OpenClaw Setup Guide →

wikipedia

MCP server for Wikipedia

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio progamesigner-wikipedia-mcp python -m wikipedia_mcp

How to use

This MCP server provides two main capabilities for interacting with Wikipedia via your language model: search and fetch. The search tool lets you query Wikipedia with a keyword and a language to get relevant results, while the fetch tool retrieves the content of a specific Wikipedia page by its page id and language. These tools enable LLMs to surface concise information or to pull full page content for more detailed reasoning. To use these tools, call search with a keyword and language (for example, keyword: “OpenAI”, language: “en”), or call fetch with an id (the numeric page id returned by a search) and the language (for example, id: 18981, language: “en”). The server abstracts Wikipedia’s API interactions and returns structured results suitable for downstream prompt construction and evaluation.

How to install

Prerequisites:

  • Python 3.8+ and pip, or Docker, or uv/uvx if you choose the UV-based installation. Ensure you have network access to pull images or packages.

Install via uvx (recommended):

# Using uvx (no installation required beyond uvx itself)
# The server will be run directly with uvx as described in the configuration.

Install via PIP:

pip install wikipedia-mcp-server

Run with Python:

python -m wikipedia_mcp

Run with uvx (if using uv tooling):

uvx wikipedia-mcp-server@latest

Run with Docker:

# Build a simple run command or pull from registry if available
# Example running container as configured in the README:
docker run -i --rm ghcr.io/progamesigner/wikipedia-mcp:latest

Building a local Docker image (optional):

# If you prefer a local build, use the provided container setup:
docker build -t wikipedia-mcp .

Prerequisites summary:

  • Python and/or Docker, depending on your chosen installation method
  • Network access for package or image pulls
  • Optional: uv or uvx if you plan to run via UV tooling

Additional notes

Notes and tips:

  • The available tools are: search (requires keyword and language) and fetch (requires id and language).
  • When using search, you’ll need a valid Wikipedia language code (e.g., en, es, de).
  • When using fetch, you must provide the page id as returned from a prior search or another source.
  • If you encounter API rate limits or network issues, verify container or environment network access and try again.
  • If running via Docker, ensure Docker daemon is running and you have permission to pull images from ghcr.io.
  • The project may expose different endpoints or environment variables in the future; check the repository for any updates on configuration or authentication requirements.

Related MCP Servers

Sponsor this space

Reach thousands of developers