Provides real-time access to Wikipedia content with tools for searching articles, retrieving full article content, getting article summaries, and discovering related articles for comprehensive research workflows.
Wikipedia MCP Server
A Model Context Protocol (MCP) server that provides Claude with real-time access to Wikipedia. This server implements 4 essential tools for effective Wikipedia research while demonstrating core MCP concepts.
Features
Core Tools
search_wikipedia
- Find articles when you don't know exact titlesget_article
- Retrieve full article content for detailed analysisget_summary
- Get concise summaries for quick understandingfind_related
- Discover related articles to expand research
Key Benefits
- 🔄 Real-time data - Access current Wikipedia content, not training data
- 🏗️ Structured output - Well-defined schemas for reliable data access
- 🏠 Local control - Self-hosted, no API keys required
- ⚡ Fast & efficient - Async operations with proper error handling
Installation
Prerequisites
- Python 3.9 or higher
- uv (recommended) or pip
Install Dependencies
Using pip:
Using uv (if available):
Usage
Running the Server
With python directly:
With uv (if available):
Testing the Tools
You can test individual tools by running the server and connecting with an MCP client:
Claude Desktop Integration
To use this MCP server with Claude Desktop, add it to your MCP configuration:
macOS/Linux Configuration
Edit ~/.config/claude-desktop/mcp.json
:
Windows Configuration
Edit %APPDATA%\Claude\mcp.json
:
Alternative: Using uv
If you have uv installed:
Research Workflows
Typical Research Flow
- Discover:
search_wikipedia("quantum computing")
→ Find relevant articles - Overview:
get_summary("Quantum computing")
→ Quick understanding - Deep dive:
get_article("Quantum computing")
→ Full content when needed - Expand:
find_related("Quantum computing")
→ Related topics
Example Claude Conversation
Tool Specifications
search_wikipedia
- Purpose: 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
- Purpose: Retrieve full article content
- Input: title (required), language (default: "en")
- Output: Complete article with content, metadata, and sections
get_summary
- Purpose: Get concise article summaries
- Input: title (required), language (default: "en")
- Output: Summary text with key facts
find_related
- Purpose: Discover related articles
- Input: title (required), limit (1-10), language (default: "en")
- Output: Related articles with relationship types
Error Handling
The server includes comprehensive error handling for:
- Invalid article titles
- Network timeouts
- Wikipedia API errors
- Malformed requests
- Rate limiting
Development
Project Structure
Key MCP Concepts Demonstrated
- ✅ Tool registration with
@mcp.tool()
- ✅ Structured input/output with Pydantic models
- ✅ Async operations for performance
- ✅ Proper error handling and validation
- ✅ Clear tool documentation
Adding New Tools
To add a new tool:
- Define the output model in
models.py
- Add the Wikipedia API method in
wikipedia_client.py
- Register the tool in
server.py
with@mcp.tool()
Performance Considerations
- Async operations: All Wikipedia API calls are non-blocking
- Response times: Typically < 3 seconds per operation
- Rate limiting: Respects Wikipedia's guidelines
- Error resilience: Graceful handling of API failures
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is open source and available under the MIT License.
Acknowledgments
- Built using the Model Context Protocol
- Wikipedia data via the Wikipedia REST API
- Uses the FastMCP framework
Happy researching with Claude and Wikipedia! 🔍📚
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides Claude with real-time access to Wikipedia through four essential tools: search articles, get full content, retrieve summaries, and find related articles. Enables comprehensive Wikipedia research workflows with structured data access and no API keys required.
Related MCP Servers
- -securityAlicense-qualityEnables programmatic interaction with Wikimedia APIs, offering features like searching content, retrieving page information, and accessing historical events across multiple languages.Last updated -62MIT License
- AsecurityAlicenseAqualityFacilitates web search capabilities using Perplexity's API, allowing users to retrieve search results through Claude's interface.Last updated -14MIT License
- -securityFlicense-qualityA tool that enables AI assistants like Claude to interact with MediaWiki instances by retrieving page content, performing searches, and analyzing wiki information through the MediaWiki API.Last updated -1
- AsecurityAlicenseAqualityEnables AI assistants to search and retrieve content from WikiJS knowledge bases, allowing integration with your Wiki through simple search and retrieval tools.Last updated -4511MIT License