# MediaWiki

Connect an AI agent to a MediaWiki site to search, read, check, and edit pages. Handy for working with Wikipedia, Fandom, or a corporate wiki.

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

## What it does

The server lets an agent find pages, retrieve their contents, compare revisions, spot broken links, and locate stale material. It can also rename pages, replace text, and publish Markdown to a wiki. These actions run through MCP; a separate `wiki` client supports terminal use.

Reading public wikis works without a login. Private wikis and edits need a bot password, supplied through `MEDIAWIKI_USERNAME` and `MEDIAWIKI_PASSWORD`, along with the API address in `MEDIAWIKI_URL`. PDF text search depends on `pdftotext` from poppler-utils; searches in TXT and Markdown files work without it. Editing is unavailable until bot credentials are configured.

## Requirements
- Needs: Docker
- Environment variables: `MEDIAWIKI_URL`, `MEDIAWIKI_USERNAME`, `MEDIAWIKI_PASSWORD` — 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 MEDIAWIKI_URL=<MEDIAWIKI_URL> --env MEDIAWIKI_USERNAME=<MEDIAWIKI_USERNAME> --env MEDIAWIKI_PASSWORD=<MEDIAWIKI_PASSWORD> --transport stdio mediawiki -- docker run -i --rm -e MEDIAWIKI_URL -e MEDIAWIKI_USERNAME -e MEDIAWIKI_PASSWORD ghcr.io/olgasafonova/mediawiki-mcp-server:1.36.0
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mediawiki --env MEDIAWIKI_URL=<MEDIAWIKI_URL> --env MEDIAWIKI_USERNAME=<MEDIAWIKI_USERNAME> --env MEDIAWIKI_PASSWORD=<MEDIAWIKI_PASSWORD> -- docker run -i --rm -e MEDIAWIKI_URL -e MEDIAWIKI_USERNAME -e MEDIAWIKI_PASSWORD ghcr.io/olgasafonova/mediawiki-mcp-server:1.36.0
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mediawiki": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "MEDIAWIKI_URL",
                "-e",
                "MEDIAWIKI_USERNAME",
                "-e",
                "MEDIAWIKI_PASSWORD",
                "ghcr.io/olgasafonova/mediawiki-mcp-server:1.36.0"
            ],
            "env": {
                "MEDIAWIKI_URL": "<MEDIAWIKI_URL>",
                "MEDIAWIKI_USERNAME": "<MEDIAWIKI_USERNAME>",
                "MEDIAWIKI_PASSWORD": "<MEDIAWIKI_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mediawiki": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "MEDIAWIKI_URL",
                "-e",
                "MEDIAWIKI_USERNAME",
                "-e",
                "MEDIAWIKI_PASSWORD",
                "ghcr.io/olgasafonova/mediawiki-mcp-server:1.36.0"
            ],
            "env": {
                "MEDIAWIKI_URL": "<MEDIAWIKI_URL>",
                "MEDIAWIKI_USERNAME": "<MEDIAWIKI_USERNAME>",
                "MEDIAWIKI_PASSWORD": "<MEDIAWIKI_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MEDIAWIKI_URL=<MEDIAWIKI_URL> -e MEDIAWIKI_USERNAME=<MEDIAWIKI_USERNAME> -e MEDIAWIKI_PASSWORD=<MEDIAWIKI_PASSWORD> mediawiki docker run -i --rm -e MEDIAWIKI_URL -e MEDIAWIKI_USERNAME -e MEDIAWIKI_PASSWORD ghcr.io/olgasafonova/mediawiki-mcp-server:1.36.0
```
Replace <…> with your own values

## When to use it
- search a wiki for pages on a topic
- retrieve content from several pages
- find broken links and stale pages
- compare recent page revisions
- publish Markdown to a MediaWiki site

## Example prompts
- Search the wiki for API setup pages and summarize what they say.
- Check the `Docs` page for broken links and find pages with no incoming links.
- Publish `README.md` to the wiki as “Getting Started Guide”.

## 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
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
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
