Wikipedia

Creating a MCP server to access Wikipedia
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "imajumd1-wiki-mcp": {
      "command": "python",
      "args": [
        "-m",
        "src.wikipedia_mcp_server"
      ]
    }
  }
}

You deploy a self-hosted MCP server that gives Claude real-time access to Wikipedia data through four practical tools. It runs locally, requires no API keys, and uses asynchronous operations for fast, reliable results.

How to use

Connect to the Wikipedia MCP server with an MCP client and use its four tools to search for articles, retrieve full content, get concise summaries, and discover related articles. Focus on practical workflows to support research and quick understanding of topics.

How to install

Prerequisites include Python 3.9 or higher and either uv (recommended) or pip for running the server locally.

Install dependencies with pip from the project directory.

# Navigate to the project directory
cd wikipedia-mcp-server

# Install dependencies
pip install mcp httpx pydantic beautifulsoup4

Alternatively, if you have uv available, you can start by preparing the project folder and running the UDP-based start flow.

# Clone or create the project directory
cd wikipedia-mcp-server

# (If needed) install dependencies and start via uv
uv sync

Claude Desktop Integration

To use the Wikipedia MCP server with Claude Desktop on macOS/Linux, configure the MCP client to run the Python module directly from your local path.

{
  "mcpServers": {
    "wikipedia": {
      "command": "python",
      "args": [
        "-m", 
        "src.wikipedia_mcp_server"
      ],
      "cwd": "/ABSOLUTE/PATH/TO/wikipedia-mcp-server"
    }
  }
}

Alternate runtime with uv

If you prefer using uv, you can run the server with uv for local execution.

{
  "mcpServers": {
    "wikipedia": {
      "command": "uv",
      "args": [
        "run", 
        "python", 
        "-m", 
        "src.wikipedia_mcp_server"
      ],
      "cwd": "/ABSOLUTE/PATH/TO/wikipedia-mcp-server"
    }
  }
}

Testing the tools locally

Start the server and connect with an MCP client to test each tool. You can verify the following workflows: search for articles, get a summary, retrieve a full article, and find related topics.

Notes on security and maintenance

This server runs locally and requires no external API keys. Monitor dependencies, keep Python updated, and periodically review error handling and rate-limiting behavior to ensure stable operation.

Available tools

search_wikipedia

Find articles when you don’t know exact titles. Input: query (required), limit (1-10), language (default en). Output: list of search results with titles, snippets, and URLs.

get_article

Retrieve full article content. Input: title (required), language (default en). Output: complete article with content, metadata, and sections.

get_summary

Get concise article summaries. Input: title (required), language (default en). Output: summary text with key facts.

find_related

Discover related articles. Input: title (required), limit (1-10), language (default en). Output: related articles with relationship types.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational