Enables searching Wikipedia articles, extracting section titles, and retrieving specific content from Wikipedia articles with proper formatting
MCP Wikipedia Server
A production-ready Model Context Protocol (MCP) server that provides Wikipedia search and content retrieval tools using FastMCP and Python 3.11.
🚀 Quick Start
🎯 Features
- Wikipedia Search: Find articles with intelligent search and get comprehensive summaries
- Section Listing: Extract all section titles from any Wikipedia article
- Content Retrieval: Get specific section content with proper formatting
- MCP Protocol: Full Model Context Protocol compatibility for AI assistant integration
- FastMCP Framework: Built on the efficient FastMCP library for optimal performance
- Python 3.11: Modern Python with latest features and performance improvements
📚 Documentation
Document | Description |
---|---|
📖 Complete Guide | Detailed setup, usage, and development instructions |
⚡ Quick Reference | Common commands and tool summaries |
🔧 Setup Script | Automated environment setup and verification |
💡 Example Client | Sample usage and integration examples |
🛠️ Available Tools
Tool | Purpose | Example Usage |
---|---|---|
fetch_wikipedia_info | Search Wikipedia and get article summaries | Search for "Python programming" |
list_wikipedia_sections | Get all section titles from an article | List sections of "Machine Learning" |
get_section_content | Retrieve specific section content | Get "History" section from "Artificial Intelligence" |
🏗️ Project Structure
🚦 Prerequisites
- macOS (tested on Apple Silicon and Intel)
- Python 3.11+ (installed via pyenv recommended)
- Git (for version control)
📦 Installation Options
Option 1: Automated Setup (Recommended)
Option 2: Manual Setup
🔌 Integration Examples
With Claude Desktop (MCP Client)
Direct Python Usage
🧪 Testing
Quick Testing
Advanced Testing
Test Suite Overview
- Unit Tests: Individual function and component testing
- Integration Tests: End-to-end workflow validation
- Performance Tests: Response time and load benchmarks
- MCP Compliance: Protocol specification validation
- 95%+ Code Coverage: Comprehensive test coverage
See tests/README.md for complete testing documentation.
🐛 Troubleshooting
Issue | Solution |
---|---|
ModuleNotFoundError: No module named 'mcp' | Run pip install mcp fastmcp in activated environment |
Python version issues | Ensure Python 3.11+ with python --version |
Server won't start | Check if port is available, verify dependencies |
Wikipedia API errors | Check internet connection, try different search terms |
For detailed troubleshooting, see GUIDE.md.
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Resources
- Model Context Protocol Documentation
- FastMCP Framework
- Wikipedia API Documentation
- Python 3.11 Features
🌟 Support
If you find this project helpful, please consider giving it a star ⭐ on GitHub!
Made with ❤️ for the MCP community
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A production-ready server that provides Wikipedia search and content retrieval tools through the Model Context Protocol, enabling AI assistants to search for articles, list sections, and retrieve specific content.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that retrieves information from Wikipedia to provide context to LLMs, allowing users to search articles, get summaries, full content, sections, and links from Wikipedia.Last updated -973PythonMIT License
- AsecurityAlicenseAqualityA server implementation for interacting with Wikidata API using the Model Context Protocol, providing tools for searching identifiers, extracting metadata, and executing SPARQL queries.Last updated -522PythonMIT License
- -securityFlicense-qualityAn MCP server that retrieves and provides Wikipedia content for requested topics, enabling easy access to Wikipedia information directly through the Model Control Protocol.Last updated -1Python
- AsecurityAlicenseAqualityA Model Context Protocol server that allows AI assistants and applications to access IQ.wiki data, enabling retrieval of specific wikis, user-created wikis, user-edited wikis, and detailed wiki activities.Last updated -44061TypeScriptMIT License