FAQ.mdโข11.6 kB
# Frequently Asked Questions (FAQ)
Common questions and answers about the MCP Wikipedia Server project.
## ๐ Getting Started
### Q: What is the MCP Wikipedia Server?
**A:** The MCP Wikipedia Server is a Model Context Protocol (MCP) server that provides AI assistants and other clients with tools to search Wikipedia, list article sections, and retrieve specific content. It's built using Python 3.11 and the FastMCP framework.
### Q: What can I do with this server?
**A:** You can:
- Search Wikipedia articles and get summaries
- List all sections in any Wikipedia article
- Retrieve content from specific sections
- Integrate Wikipedia search into AI assistants like Claude Desktop
- Build custom applications that need Wikipedia content
### Q: Do I need to be a programmer to use this?
**A:** Basic familiarity with the command line is helpful, but we provide an automated setup script (`setup.sh`) that handles most of the technical setup. The documentation includes step-by-step instructions for non-programmers.
---
## ๐ง Installation and Setup
### Q: Why do I need Python 3.11 specifically?
**A:** The MCP (Model Context Protocol) libraries require Python 3.11+ for:
- Modern async/await features
- Enhanced type hint support
- Performance improvements
- Compatibility with the latest MCP specification
### Q: Can I use Python 3.9 or 3.10?
**A:** While some parts might work, we strongly recommend Python 3.11+ for full compatibility. The MCP libraries are optimized for Python 3.11+ and may have issues with older versions.
### Q: How do I install Python 3.11 on macOS?
**A:** The easiest way is using pyenv:
```bash
# Install pyenv
curl https://pyenv.run | bash
# Install Python 3.11
pyenv install 3.11.10
pyenv local 3.11.10
```
### Q: The setup script failed. What should I do?
**A:** First, check the error message. Common issues:
1. **Python version**: Ensure you have Python 3.11+ installed
2. **Virtual environment**: Delete `.venv311` and try again
3. **Dependencies**: Check your internet connection for pip downloads
4. **Permissions**: Ensure you can write to the project directory
Run `./setup.sh --verbose` for detailed error information.
### Q: How do I know if the installation was successful?
**A:** After running the setup script, you should see:
```bash
โ
Environment setup completed successfully!
โ
All dependencies installed
โ
Server test passed
```
You can also test manually:
```bash
source .venv311/bin/activate
python src/mcp_server/mcp_server.py --test
```
---
## ๐ ๏ธ Usage and Tools
### Q: How do I start the server?
**A:** Activate the virtual environment and run the server:
```bash
source .venv311/bin/activate
cd src/mcp_server && python mcp_server.py
```
### Q: The server started but nothing happens. Is it working?
**A:** Yes! MCP servers communicate via stdin/stdout, so they appear to "do nothing" when run directly. The server is waiting for MCP protocol messages. To test functionality, use the example client:
```bash
python example_client.py
```
### Q: What's the difference between the three tools?
**A:**
- **`fetch_wikipedia_info`**: Searches Wikipedia and returns article summaries (like a Google search for Wikipedia)
- **`list_wikipedia_sections`**: Gets all section headings from a specific article (like a table of contents)
- **`get_section_content`**: Retrieves the text content from a specific section
### Q: Why am I getting "Article not found" errors?
**A:** This can happen for several reasons:
1. **Typos**: Check your spelling
2. **Exact titles**: Wikipedia is case-sensitive for exact matches
3. **Disambiguation**: The article name might be ambiguous (e.g., "Python" could be the snake or programming language)
4. **Article doesn't exist**: The topic might not have a Wikipedia page
Try broader search terms or check the suggestions in the error response.
### Q: Can I search Wikipedia in other languages?
**A:** Currently, the server defaults to English Wikipedia. Multi-language support is planned for a future version. You can modify the server code to change the language by setting the Wikipedia language parameter.
---
## ๐ Integration
### Q: How do I integrate this with Claude Desktop?
**A:** Add this configuration to your Claude Desktop MCP settings:
```json
{
"mcpServers": {
"wikipedia": {
"command": "python",
"args": ["/full/path/to/MCPClientServer/src/mcp_server/mcp_server.py"],
"env": {
"PYTHONPATH": "/full/path/to/MCPClientServer/.venv311/lib/python3.11/site-packages"
}
}
}
}
```
### Q: Can I use this with other AI assistants?
**A:** Yes! Any application that supports the Model Context Protocol can use this server. The MCP protocol is designed to be AI-assistant agnostic.
### Q: How do I use this in my own Python application?
**A:** Check out the `example_client.py` file for a complete example. Basic usage:
```python
from mcp_client import WikipediaClient
client = WikipediaClient()
result = await client.search_wikipedia("Machine Learning")
```
### Q: Can I run multiple instances of the server?
**A:** Yes, but each instance should use a different process or port. The server is designed to handle multiple concurrent requests within a single instance.
---
## ๐ Troubleshooting
### Q: I'm getting "ModuleNotFoundError: No module named 'mcp'"
**A:** This means the MCP libraries aren't installed in your current Python environment. Ensure you:
1. Activated the virtual environment: `source .venv311/bin/activate`
2. Installed dependencies: `pip install mcp fastmcp wikipedia`
3. Are using the correct Python version: `python --version`
### Q: The server is very slow. How can I speed it up?
**A:** The server includes caching to improve performance. If it's still slow:
1. **Check internet connection**: Wikipedia API calls require internet access
2. **Use specific terms**: Exact article titles are faster than broad searches
3. **Monitor usage**: Too many concurrent requests can slow things down
4. **Review logs**: Look for error messages that might indicate issues
### Q: I'm getting timeout errors
**A:** This usually indicates network issues or Wikipedia API problems:
1. **Check internet connection**
2. **Try again later**: Wikipedia API might be experiencing high load
3. **Use shorter queries**: Very long search terms can timeout
4. **Check firewall settings**: Ensure outbound HTTPS connections are allowed
### Q: The server crashed with an error. What should I do?
**A:**
1. **Read the error message**: Most errors include helpful information
2. **Check the logs**: Look for detailed error information
3. **Restart the server**: Many issues are resolved by restarting
4. **Check dependencies**: Ensure all required packages are installed
5. **Report bugs**: If the error persists, please create a GitHub issue
### Q: Can I run this on Windows or Linux?
**A:** The server is developed and tested on macOS, but it should work on Linux with minimal changes. Windows support is possible but not actively tested. The main requirements are Python 3.11+ and the ability to install the required packages.
---
## ๐ง Development and Customization
### Q: How do I add new Wikipedia tools?
**A:** See the [DEVELOPMENT.md](DEVELOPMENT.md) guide for detailed instructions. Basic steps:
1. Define the tool function with proper type hints
2. Register it with the FastMCP server
3. Add tests for the new functionality
4. Update documentation
### Q: Can I modify the existing tools?
**A:** Absolutely! The server code is open source and designed to be extensible. Common modifications:
- Change search result limits
- Modify response formats
- Add additional metadata
- Implement custom caching strategies
### Q: How do I contribute to this project?
**A:** We welcome contributions! Please:
1. Read the [DEVELOPMENT.md](DEVELOPMENT.md) guide
2. Fork the repository
3. Create a feature branch
4. Submit a pull request with tests and documentation
### Q: Is there a Docker version?
**A:** Not yet, but it's planned for a future release. You can create your own Dockerfile based on the setup instructions in the meantime.
---
## ๐ Performance and Limits
### Q: How many requests can the server handle?
**A:** The server can handle multiple concurrent requests, but performance depends on:
- Your system resources
- Wikipedia API rate limits (approximately 100 requests per minute)
- Network connection speed
- Query complexity
### Q: Are there any usage limits?
**A:** The main limits are:
- **Wikipedia API**: ~100 requests per minute per IP
- **Memory**: Depends on your system and caching settings
- **Network**: Your internet connection bandwidth
### Q: How is response caching handled?
**A:** The server includes built-in caching:
- **Article searches**: Cached for 5 minutes
- **Section lists**: Cached for 10 minutes
- **Section content**: Cached for 15 minutes
You can modify these settings in the server configuration.
---
## ๐ Security and Privacy
### Q: Does this server store my data?
**A:** No, the server doesn't persist any data. All operations are performed in memory, and the server only caches responses temporarily for performance.
### Q: What data is sent to Wikipedia?
**A:** Only your search queries are sent to Wikipedia's public API. No personal information or authentication data is transmitted.
### Q: Is it safe to use this on my network?
**A:** Yes, the server only makes outbound HTTPS connections to Wikipedia's official API. It doesn't accept network connections or expose any ports.
### Q: Can I use this offline?
**A:** No, the server requires internet access to query Wikipedia's API. All content is retrieved in real-time from Wikipedia.
---
## ๐ Getting Help
### Q: Where can I get more help?
**A:**
1. **Documentation**: Check [GUIDE.md](GUIDE.md) for detailed instructions
2. **API Reference**: See [API.md](API.md) for technical details
3. **GitHub Issues**: Report bugs or request features
4. **Example Code**: Look at `example_client.py` for usage patterns
### Q: How do I report a bug?
**A:** Please create a GitHub issue with:
1. **Description**: What you expected vs. what happened
2. **Steps to reproduce**: Exact commands and inputs
3. **Environment**: OS, Python version, package versions
4. **Error messages**: Full error text and logs
5. **Screenshots**: If applicable
### Q: Can I request new features?
**A:** Yes! Feature requests are welcome. Please:
1. Check existing issues to avoid duplicates
2. Describe the use case and expected behavior
3. Consider contributing the feature yourself
4. Be patient - features are prioritized based on community need
---
## ๐ Additional Resources
### Q: Where can I learn more about MCP?
**A:**
- [Official MCP Documentation](https://modelcontextprotocol.io/)
- [MCP Specification](https://spec.modelcontextprotocol.io/)
- [FastMCP Framework](https://github.com/jlowin/fastmcp)
### Q: Where can I learn more about the Wikipedia API?
**A:**
- [Wikipedia Python Library](https://wikipedia.readthedocs.io/)
- [MediaWiki API Documentation](https://www.mediawiki.org/wiki/API:Main_page)
- [Wikipedia API Sandbox](https://en.wikipedia.org/wiki/Special:ApiSandbox)
### Q: Are there similar projects I can learn from?
**A:** Yes! Check out other MCP server implementations:
- [MCP Servers Repository](https://github.com/modelcontextprotocol/servers)
- [Claude Desktop MCP Examples](https://github.com/anthropics/anthropic-quickstarts)
---
*Don't see your question here? Please check our [documentation](README.md) or [create an issue](https://github.com/your-repo/issues) on GitHub!*