by Rudra-ravi
A Model Context Protocol (MCP) server that retrieves information from Wikipedia to provide context to LLMs.
# Add to your Claude Code skills
git clone https://github.com/Rudra-ravi/wikipedia-mcpA Model Context Protocol (MCP) server that retrieves information from Wikipedia to provide context to Large Language Models (LLMs). This tool helps AI assistants access factual information from Wikipedia to ground their responses in reliable sources.
The Wikipedia MCP server provides real-time access to Wikipedia information through a standardized Model Context Protocol interface. This allows LLMs to retrieve accurate and up-to-date information directly from Wikipedia to enhance their responses.
--language or -l argument when running the server (e.g., wikipedia-mcp --language ta for Tamil).No comments yet. Be the first to share your thoughts!
--country US, --country China, or --country TW instead of language codes. Automatically maps to appropriate Wikipedia language variants.zh-hans for Simplified Chinese, zh-tw for Traditional Chinese), Serbian scripts (sr-latn, sr-cyrl), and other regional variants.stdio, http, and streamable-http (with legacy sse compatibility).--auth-mode static or --auth-mode jwt.The best way to install for Claude Desktop usage is with pipx, which installs the command globally:
# Install pipx if you don't have it
pip install pipx
pipx ensurepath
# Install the Wikipedia MCP server
pipx install wikipedia-mcp
This ensures the wikipedia-mcp command is available in Claude Desktop's PATH.
To install wikipedia-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Rudra-ravi/wikipedia-mcp --client claude
You can also install directly from PyPI:
pip install wikipedia-mcp
Note: If you use this method and encounter connection issues with Claude Desktop, you may need to use the full path to the command in your configuration. See the Configuration section for details.
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
# Install the package
pip install git+https://github.com/rudra-ravi/wikipedia-mcp.git
# Clone the repository
git clone https://github.com/rudra-ravi/wikipedia-mcp.git
cd wikipedia-mcp
# Create a virtual environment
python3 -m venv wikipedia-mcp-env
source wikipedia-mcp-env/bin/activate
# Install in development mode
pip install -e .
# If installed with pipx
wikipedia-mcp
# If installed in a virtual environment
source venv/bin/activate
wikipedia-mcp
# Specify transport protocol (default: stdio)
wikipedia-mcp --transport stdio # For Claude Desktop
wikipedia-mcp --transport http --host 0.0.0.0 --port 8080 --path /mcp
wikipedia-mcp --transport streamable-http --host 0.0.0.0 --port 8080 --path /mcp
wikipedia-mcp --transport sse # Legacy compatibility transport
# Specify language (default: en for English)
wikipedia-mcp --language ja # Example for Japanese
wikipedia-mcp --language zh-hans # Example for Simplified Chinese
wikipedia-mcp --language zh-tw # Example for Traditional Chinese (Taiwan)
wikipedia-mcp --language sr-latn # Example for Serbian Latin script
# Specify country/locale (alternative to language codes)
wikipedia-mcp --country US # English (United States)
wikipedia-mcp --country China # Chinese Simplified
wikipedia-mcp --country Taiwan # Chinese Traditional (Taiwan)
wikipedia-mcp --country Japan # Japanese
wikipedia-mcp --country Germany # German
wikipedia-mcp --country france # French (case insensitive)
# List all supported countries
wikipedia-mcp --list-countries
# Optional: Specify host/port/path for network transport (use 0.0.0.0 for containers)
wikipedia-mcp --transport http --host 0.0.0.0 --port 8080 --path /mcp
# Optional: Enable caching
wikipedia-mcp --enable-cache
# Optional: Use Personal Access Token to avoid rate limiting (403 errors)
wikipedia-mcp --access-token your_wikipedia_token_here
# Or set via environment variable
export WIKIPEDIA_ACCESS_TOKEN=your_wikipedia_token_here
wikipedia-mcp
# Optional: Secure incoming MCP network requests with static bearer token
wikipedia-mcp --transport http --auth-mode static --auth-token your_mcp_token --host 0.0.0.0 --port 8080
# Optional: Secure incoming MCP network requests with JWT validation
wikipedia-mcp --transport http --auth-mode jwt --auth-jwks-uri https://issuer/.well-known/jwks.json --auth-issuer https://issuer
# Security note: prefer http/streamable-http + auth-mode for exposed network transport.
# Combine options
wikipedia-mcp --country Taiwan --enable-cache --access-token your_wikipedia_token --transport http --path /mcp --port 8080
### Docker/Kubernetes
When running inside containers, bind the HTTP MCP server to all interfaces and map
the container port to the host or service:
```bash
# Build and run with Docker
docker build -t wikipedia-mcp .
docker run --rm -p 8080:8080 wikipedia-mcp --transport http --host 0.0.0.0 --port 8080 --path /mcp
Kubernetes example (minimal):
apiVersion: apps/v1
kind: Deployment
metadata:
name: wikipedia-mcp
spec:
replicas: 1
selector:
matchLabels:
app: wikipedia-mcp
template:
metadata:
labels:
app: wikipedia-mcp
spec:
containers:
- name: server
image: your-repo/wikipedia-mcp:latest
args: ["--transport", "http", "--host", "0.0.0.0", "--port", "8080", "--path", "/mcp"]
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: wikipedia-mcp
spec:
selector:
app: wikipedia-mcp
ports:
- name: http
port: 8080
targetPort: 8080
### Configuration for Claude Desktop
Add the following to your Claude Desktop configuration file:
**Option 1: Using command name (requires `wikipedia-mcp` to be in PATH)**
```json
{
"mcpServers": {
"wikipedia": {
"command": "wikipedia-mcp"
}
}
}
Option 2: Using full path (recommended if you get connection errors)
{
"mcpServers": {
"wikipedia": {
"command": "/full/path/to/wikipedia-mcp"
}
}
}
Option 3: With country/language specification
{
"mcpServers": {
"wikipedia-us": {
"command": "wikipedia-mcp",
"args": ["--country", "US"]
},
"wikipedia-taiwan": {
"command": "wikipedia-mcp",
"args": ["--country", "TW"]
},
"wikipedia-japan": {
"command": "wikipedia-mcp",
"args": ["--country", "Japan"]
}
}
}
To find the full path, run: which wikipedia-mcp
Configuration file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonNote: If you encounter connection errors, see the Troubleshooting section for solutions.
docs/CLI.mddocs/API.mddocs/ARCHITECTURE.mddocs/USER_GUIDE.mddocs/DEVELOPMENT.mddocs/TESTING.mdThe Wikipedia MCP server provides the following tools for LLMs to interact with Wikipedia:
Each tool is also exposed with a wikipedia_-prefixed alias (for example, wikipedia_get_article) for improved cross-server discoverability.
search_wikipediaSearch Wikipedia for articles matching a query.
Parameters:
query (string): The search termlimit (integer, optional): Maximum number of results to return (default: 10)Returns:
get_articleGet the full content of a Wikipedia article.
Parameters:
title (string): The title of the Wikipedia articleReturns:
get_summaryGet a concise summary of a Wikipedia article.
Parameters: