Wikipedia MCP Server
Provides comprehensive Wikipedia access for AI assistants, including advanced search, full article access, smart summaries, section analysis, link discovery, multi-language support, parallel search, fact extraction, and coordinates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wikipedia MCP Serversummarize the article about quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wikipedia MCP Server
A Model Context Protocol (MCP) server that provides comprehensive Wikipedia access for AI assistants. Built in TypeScript, deployed on Vercel, and fully compatible with the MCP Streamable HTTP transport (protocol version 2025-03-26).
Features
š Advanced Search ā find articles with relevance ranking
š Full Article Access ā plain text extracts or complete wikitext
š Smart Summaries ā concise summaries tailored to a specific query
šļø Section Analysis ā extract and summarize individual sections
š Link Discovery ā internal links and related articles
š Multi-language ā 50+ language codes, 140+ country codes, resolved automatically
š Parallel Search ā
multi_search_wikipediaruns multiple queries simultaneouslyšÆ Fact Extraction ā structured key-fact lists from any article
š Coordinates ā lat/lon for geographic articles
ā” Streamable HTTP ā full MCP transport support (POST + GET SSE + DELETE)
š Security hardened ā input sanitization, tiered rate limiting, no
Serverheaderš Vercel ready ā stateless serverless deployment, zero cold-start friction
Related MCP server: Wikipedia MCP Server
Quick Start
1. Deploy
git clone https://github.com/YOUR_USERNAME/wikipedia-mcp-vercel.git
cd wikipedia-mcp-vercel
vercelOr use the Deploy with Vercel button above.
2. Connect your AI client
The server implements MCP Streamable HTTP transport (2025-03-26).
Both the POST channel (client ā server) and the GET SSE channel (server ā client) are supported.
MCP endpoint: https://your-app.vercel.app/mcp
Claude Desktop
{
"mcpServers": {
"wikipedia": {
"type": "http",
"url": "https://your-app.vercel.app/mcp"
}
}
}Claude Code / CLI
claude mcp add wikipedia --transport http https://your-app.vercel.app/mcpAny MCP client (generic)
Configure the client with transport type streamable-http and the endpoint URL above.
The server uses stateless mode (no Mcp-Session-Id header), which is correct and expected for serverless deployments.
3. Environment variables (optional)
Variable | Default | Description |
|
| Wikipedia language code (e.g. |
|
| Country code ā language mapping (e.g. |
|
| In-memory cache (useful for local dev) |
| ā | Bot account username ( |
| ā | Bot account password |
|
| Local dev port (ignored by Vercel) |
Copy .env.example ā .env for local development.
4. Verify
# Health check
curl https://your-app.vercel.app/health
# Test MCP initialize
curl -X POST https://your-app.vercel.app/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'MCP Tools
All 13 tools accept optional language (e.g. "ja") and country (e.g. "JP") parameters. When set, the query is sent as-is to that language's Wikipedia endpoint (e.g. ja.wikipedia.org). Wikipedia's own search can often match a short English title phrase to the correct local article, but there is no translation layer in this server.
Tool reference
Tool | Description |
| Search by keyword in one language |
| Run multiple searches across multiple languages in parallel |
| Full article ā plain text extract, or wikitext with |
| Introductory summary only |
| Table of contents (section titles + levels) |
| All internal wikilinks in an article |
| Latitude/longitude for geographic articles |
| Related articles via link graph |
| Summary focused on a specific question |
| Summary of one named section |
| Bullet-list of key facts |
| API diagnostics + auth status |
| All supported language and country codes |
MCP Prompts
Three prompt templates are registered and available via prompts/list / prompts/get:
Prompt | Description |
| Query format guidance for non-English Wikipedia |
| Full guide covering all tools and best practices |
| Step-by-step guide for cross-language research |
REST API
Standard HTTP endpoints for non-MCP usage:
GET /health
GET /search/:query?limit=10
GET /article/:title
GET /summary/:title
GET /sections/:title
GET /links/:title
GET /coordinates/:title
GET /related/:title?limit=10
GET /summary/:title/query/:query/length/:maxLength
GET /summary/:title/section/:section/length/:maxLength
GET /facts/:title?topic=...&count=5
GET /test-connectivity
GET /supported-countries
POST /tools/:toolNameArchitecture
src/
āāā server.ts # Express app wiring
āāā routes/
ā āāā mcp.ts # Streamable HTTP transport (POST + GET SSE + DELETE)
ā āāā rest.ts # REST endpoints
āāā mcp-server.ts # MCPServer helper ā tool dispatch, language routing
āāā handlers.ts # Tool handler functions
āāā toolRegistrations.ts # SDK tool + prompt registration
āāā toolDefinitions.ts # JSON Schema definitions (for REST /mcp info)
āāā prompts.ts # Prompt template logic
āāā wikipedia-client.ts # Wikipedia Action API client
āāā sanitize.ts # Input sanitization
āāā middleware.ts # Rate limiting, Server header removal
āāā utils.ts # Shared helpers
āāā types.ts # TypeScript interfacesTransport design
The server uses stateless Streamable HTTP ā the correct mode for serverless platforms:
POST /mcpā receives JSON-RPC messages, returns JSON or SSE streamGET /mcpā opens an SSE channel for server-initiated messages (clients reconnect on timeout)DELETE /mcpā session termination (acknowledged; no server-side sessions to clean up)
A fresh McpServer + StreamableHTTPServerTransport instance is created for each request. All Wikipedia logic is handled by the shared, stateless MCPServer helper.
Development
npm install
npm run dev # tsx watch mode on port 8000
npm run build # tsc ā dist/
npm start # node dist/server.js
vercel dev # local Vercel simulationBot authentication
For higher Wikipedia API rate limits, create a bot password:
Log in to your Wikipedia account
Go to Special:BotPasswords
Create a new bot password
Set
WIKIPEDIA_BOT_USERNAME=YourAccount@BotNameandWIKIPEDIA_BOT_PASSWORD=...
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Wikipedia MCP ā wraps Wikipedia REST API (free, no auth)
- hiveWikiOAuthai.hivewiki
Shared project wiki for AI agents: read and write pages, next actions, and activity logs over MCP.
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
- FlowdexOAuthdk.flowdex
Read and write your team's shared, AI-readable wiki from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that retrieves and provides Wikipedia content for requested topics, enabling easy access to Wikipedia information directly through the Model Control Protocol.1-
- AlicenseAqualityDmaintenanceEnables AI assistants to access Wikipedia content, search articles, retrieve historical events, and fetch images through the Wikipedia API.419 npm1MIT
- AlicenseNot gradedqualityDmaintenanceProvides structured access to Wikipedia content including search, summaries, images, links, and more via MCP tools.6Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables searching and retrieving Wikipedia content across multiple languages, including article summaries, sections, coordinates, and related topics.-