Skip to content

MediaWiki MCP Server

Model Context Protocol (MCP) Server to connect your AI with any MediaWiki

Config

{
  "defaultWiki": "en.wikipedia.org",
  "wikis": {
    "en.wikipedia.org": {
      "sitename": "Wikipedia",
      "server": "https://en.wikipedia.org",
      "articlepath": "/wiki",
      "scriptpath": "/w",
      "token": null,
      "username": null,
      "password": null,
      "private": false
    }
  }
}

Install

Install in Claude Code

Run the below command, optionally with -e flags to specify environment variables.

claude mcp add mediawiki-mcp-server npx @professional-wiki/mediawiki-mcp-server@latest

You should end up with something like the below in your .claude.json config:

"mcpServers": {
  "mediawiki-mcp-server": {
    "type": "stdio",
    "command": "npx",
    "args": [
      "@professional-wiki/mediawiki-mcp-server@latest"
    ],
    "env": {
      "CONFIG": "path/to/config.json"
    }
  }
},

Start

Install & Build:

npm install
npm build

Start HTTP Server:

#!/usr/bin/env bash

ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" || exit; pwd)

export MCP_TRANSPORT=http
export PORT=3000
export CONFIG=$ROOT_DIR/config.json

npm run start:http

See also

Favorite site