Wikipedia MCP Server

raw JSON →
0.0.2 verified Mon Apr 27 auth: no javascript

An MCP-compatible server that exposes Wikipedia search and article retrieval tools for AI agents and clients. Current stable version is 0.0.2. This package is maintained and updated in sync with the Model Context Protocol specification. Unlike direct Wikipedia API wrappers, it provides structured tools for AI workflows, supporting multiple languages and random article fetching. It is meant to be used as an MCP server, typically launched via npx, and requires compatible MCP clients.

error Error: Cannot find module 'wikipedia-mcp-server'
cause The package is not installed or npx cannot resolve it.
fix
Run 'npx wikipedia-mcp-server' with -y flag, or install globally using 'npm install -g wikipedia-mcp-server'.
error TypeError: fetch is not defined
cause The environment lacks global fetch (Node.js <18).
fix
Upgrade to Node.js 18 or later, or use a fetch polyfill like node-fetch.
error Tool 'search_wikipedia' not found
cause The MCP client may not have loaded the server properly.
fix
Check the server configuration and ensure the server is running. Verify the 'command' and 'args' in your MCP config.
gotcha Default language is Japanese ('ja'). Many users expect English and forget to set lang='en'.
fix Always specify lang parameter when calling tools if you want non-Japanese results.
deprecated The package is very early (v0.0.2). API breaking changes may occur without major version bump.
fix Pin the exact version in your package.json or MCP config to avoid unexpected changes.
breaking The server requires a modern Node.js runtime (>=18) for network fetch and ESM support.
fix Ensure Node.js v18 or later is installed.
gotcha The server uses npx -y which auto-installs the latest version. This may lead to unexpected updates.
fix Consider installing the package globally or pinning the version via npm install -g wikipedia-mcp-server@0.0.2.
breaking If an MCP client does not support the tools protocol, the server will not work.
fix Use a client compatible with the Model Context Protocol (e.g., Claude Desktop, Cursor IDE).
npm install wikipedia-mcp-server
yarn add wikipedia-mcp-server
pnpm add wikipedia-mcp-server

Shows how to configure the MCP server in an MCP client and use the search_wikipedia tool.

// Add to your MCP client config (e.g., Cursor, Claude Desktop)
{
  "mcpServers": {
    "wikipedia": {
      "command": "npx",
      "args": [
        "-y",
        "wikipedia-mcp-server"
      ]
    }
  }
}

// Example: search for articles about 'TypeScript' in English
// The client will expose a tool 'search_wikipedia' with parameters: query, lang, limit