About Wikipedia MCP Server
A server for searching Wikipedia articles and evaluating or analyzing individual articles with AI models. It provides streamed search progress and configurable model selection, with OpenRouter credentials required.
Key features
- 01Search Wikipedia articles by topic
- 02Stream search progress and results
- 03Evaluate article relevance
- 04Generate article analysis
- 05Select from supported AI models
Use cases
- 01Find Wikipedia articles on a research topic
- 02Assess an article's relevance to a query
- 03Generate an analysis of an article
MCP support
The README describes HTTP endpoints and SSE responses but does not specify MCP tools or protocol integration.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEWikipedia MCP Server
Server for searching and analyzing Wikipedia articles using AI models.
API Reference
Search Articles
Endpoint: /search
Method: POST
Content-Type: application/json
Request body:
{
"topic": "string",
"limit": 5, // optional, default: 5
"model": "gpt-3.5-turbo" // optional
}
Response is a Server-Sent Events (SSE) stream with the following event types:
- Started event:
{
"status": "started"
}
- Processing event (sent for each article):
{
"status": "processing",
"article": {
"title": "string",
"url": "string",
"snippet": "string",
"relevance_score": float
}
}
- Completion event:
{
"status": "completed"
}
- Error event (if something goes wrong):
{
"status": "error",
"error": "error message"
}
Evaluate Article
Endpoint: /evaluate
Method: POST
Content-Type: application/json
Request body:
{
"article": {
"title": "string",
"snippet": "string",
"url": "string"
},
"model": "gpt-3.5-turbo" // optional
}
Response:
{
"relevance": "string",
"article": {
"title": "string",
"snippet": "string",
"url": "string"
}
}
Analyze Article
Endpoint: /analyze
Method: POST
Content-Type: application/json
Request body:
{
"article": {
"title": "string",
"snippet": "string",
"url": "string"
},
"model": "gpt-3.5-turbo" // optional
}
Response:
{
"analysis": "string",
"article": {
"title": "string",
"snippet": "string",
"url": "string"
}
}
Server Statistics
Endpoint: /stats
Method: GET
Response:
{
"total_requests": int,
"endpoints": {
"search": int,
"evaluate": int,
"analyze": int
},
"models": {
"gpt-3.5-turbo": int,
"gpt-4": int,
"claude-2": int,
"mistral-7b": int
},
"errors": int,
"last_update": timestamp
}
Environment Variables
Required:
OPENROUTER_API_KEY: API key for OpenRouter
Optional:
SERVER_TIMEOUT: Server timeout in seconds (default: 300)KEEPALIVE_TIMEOUT: Keep-alive timeout in seconds (default: 60)MAX_CONNECTIONS: Maximum number of concurrent connections (default: 100)
Running the Server
- Install dependencies:
pip install -r requirements.txt
- Set environment variables:
export OPENROUTER_API_KEY=your_api_key
- Run the server:
python wiki_mcp_server.py
The server will start on http://localhost:8000
Integration Examples
Python with SSE Client
from sseclient import SSEClient
import json
def search_articles(topic, max_results=3):
url = "http://localhost:8000/search"
headers = {
"Content-Type": "application/json",
"Accept": "text/event-stream"
}
payload = {
"topic": topic,
"limit": max_results,
"model": "gpt-3.5-turbo"
}
try:
response = requests.post(url,
json=payload,
headers=headers,
stream=True)
if response.status_code != 200:
print(f"Error: {response.status_code}")
print(response.text)
return
client = SSEClient(response)
for event in client.events():
try:
data = json.loads(event.data)
print(f"Event: {data}")
except json.JSONDecodeError as e:
print(f"Error parsing event data: {e}")
except Exception as e:
print(f"Error: {e}")
# Example usage
search_articles("King penguin", 3)
Curl Example
curl -X POST http://localhost:8000/search \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"topic": "King penguin", "limit": 3}'
Available Models
The server supports the following AI models:
- gpt-3.5-turbo (default)
- gpt-4
- claude-2
- mistral-7b
License
MIT License
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.