# MediaWiki MCP Server

An MCP server that lets an AI client read and edit pages on any MediaWiki wiki: search, revision history, files, categories.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 140
- Author: ProfessionalWiki
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ProfessionalWiki/MediaWiki-MCP-Server
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/mediawiki-mcp-server

## What it does

The server hands your agent a set of tools for wiki work. Reads: `get-page`, `get-pages` (up to 50 pages per call), `get-page-history`, `get-revision`, `compare-pages`, `search-page`, `search-page-by-prefix`, `get-category-members`, `get-links-here`, `get-recent-changes`, `get-file`, `get-file-data`, `parse-wikitext`, `get-site-info` and `whoami`. Writes are marked with a lock: `create-page`, `update-page`, `delete-page`, `move-page`, `protect-page`, `undelete-page`, `upload-file`, `upload-file-from-url`, `update-file`, `update-file-from-url` — each needs the matching right on the wiki.

Every wiki-facing tool takes an optional `wiki` argument: a key like `en.wikipedia.org` or the full `mcp://wikis/{wikiKey}` URI. Omit it and the call goes to the configured default wiki. Wiki management (`add-wiki`, `remove-wiki`) turns off with `allowWikiManagement`, and `remove-wiki` plus `list-wikis` stay disabled when only one wiki is configured. The OAuth tools `oauth-status` and `oauth-logout` are stdio only.

Extension packs cover NeoWiki (schemas, read-only Cypher queries against the knowledge graph, subjects), Semantic MediaWiki (`smw-query`), Bucket, Cargo and Wikibase. Those tools register only on wikis where the extension is installed, so a plain MediaWiki install won't show them. Installation runs through `npx`, so Node.js has to be on the machine, and connection settings go in the `CONFIG` variable.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CONFIG`, `MCP_ALLOW_STATIC_FALLBACK`, `MCP_CONTENT_MAX_BYTES`, `MCP_FILE_DATA_MAX_BYTES`, `MCP_LOG_LEVEL`, `MCP_MAX_REQUEST_BODY`, `MCP_METRICS`, `MCP_OAUTH_ALLOWED_REDIRECTS`, `MCP_OAUTH_CIMD_ALLOWED_HOSTS`, `MCP_OAUTH_CREDENTIALS_FILE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CONFIG=<CONFIG> --env MCP_ALLOW_STATIC_FALLBACK=<MCP_ALLOW_STATIC_FALLBACK> --env MCP_CONTENT_MAX_BYTES=<MCP_CONTENT_MAX_BYTES> --env MCP_FILE_DATA_MAX_BYTES=<MCP_FILE_DATA_MAX_BYTES> --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --transport stdio mediawiki-mcp-server -- npx -y @professional-wiki/mediawiki-mcp-server
```
Replace <…> with your own values. 13 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add mediawiki-mcp-server --env CONFIG=<CONFIG> --env MCP_ALLOW_STATIC_FALLBACK=<MCP_ALLOW_STATIC_FALLBACK> --env MCP_CONTENT_MAX_BYTES=<MCP_CONTENT_MAX_BYTES> --env MCP_FILE_DATA_MAX_BYTES=<MCP_FILE_DATA_MAX_BYTES> --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> -- npx -y @professional-wiki/mediawiki-mcp-server
```
Replace <…> with your own values. 13 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mediawiki-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@professional-wiki/mediawiki-mcp-server"
            ],
            "env": {
                "CONFIG": "<CONFIG>",
                "MCP_ALLOW_STATIC_FALLBACK": "<MCP_ALLOW_STATIC_FALLBACK>",
                "MCP_CONTENT_MAX_BYTES": "<MCP_CONTENT_MAX_BYTES>",
                "MCP_FILE_DATA_MAX_BYTES": "<MCP_FILE_DATA_MAX_BYTES>",
                "MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values. 13 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mediawiki-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@professional-wiki/mediawiki-mcp-server"
            ],
            "env": {
                "CONFIG": "<CONFIG>",
                "MCP_ALLOW_STATIC_FALLBACK": "<MCP_ALLOW_STATIC_FALLBACK>",
                "MCP_CONTENT_MAX_BYTES": "<MCP_CONTENT_MAX_BYTES>",
                "MCP_FILE_DATA_MAX_BYTES": "<MCP_FILE_DATA_MAX_BYTES>",
                "MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values. 13 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CONFIG=<CONFIG> -e MCP_ALLOW_STATIC_FALLBACK=<MCP_ALLOW_STATIC_FALLBACK> -e MCP_CONTENT_MAX_BYTES=<MCP_CONTENT_MAX_BYTES> -e MCP_FILE_DATA_MAX_BYTES=<MCP_FILE_DATA_MAX_BYTES> -e MCP_LOG_LEVEL=<MCP_LOG_LEVEL> mediawiki-mcp-server npx -y @professional-wiki/mediawiki-mcp-server
```
Replace <…> with your own values. 13 more environment variables are in the server README

## When to use it
- read a wiki page and its revision history without opening a browser
- find every page that links to a given one
- diff two revisions of a page and summarize the change
- create or extend a wiki page from the agent
- upload a file to the wiki from a URL

## Example prompts
- Find the wiki pages about MCP and show which ones link to the MediaWiki page
- Compare the last two revisions of the `Model Context Protocol` page and tell me what changed
- Create a page `Draft/Test` with the text from this file

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
