Skip to main content
Glama
mcp-mediawiki-crunchtools

mcp-mediawiki-crunchtools

by crunchtools
README.md
# mcp-mediawiki-crunchtools

Secure MCP server for MediaWiki wikis. Search, read, create, edit, and manage wiki pages, categories, files, and more. Works with any MediaWiki instance — public or private.

## Installation

### uvx (recommended)

```bash
uvx mcp-mediawiki-crunchtools
```

### pip

```bash
pip install mcp-mediawiki-crunchtools
mcp-mediawiki-crunchtools
```

### Container

```bash
podman run -e MEDIAWIKI_URL=https://en.wikipedia.org/w/ \
  quay.io/crunchtools/mcp-mediawiki
```

## Usage with Claude Code

### Read-only (public wiki, no auth needed)

```bash
claude mcp add mcp-mediawiki-crunchtools \
  --env MEDIAWIKI_URL=https://en.wikipedia.org/w/ \
  -- uvx mcp-mediawiki-crunchtools
```

### With authentication (for write operations)

```bash
claude mcp add mcp-mediawiki-crunchtools \
  --env MEDIAWIKI_URL=https://your-wiki.com/w/ \
  --env MEDIAWIKI_USERNAME=BotUser \
  --env MEDIAWIKI_PASSWORD=BotPassword \
  -- uvx mcp-mediawiki-crunchtools
```

### HTTP transport (systemd / container)

```bash
podman run -d --name mcp-mediawiki \
  -p 127.0.0.1:8016:8016 \
  -e MEDIAWIKI_URL=https://your-wiki.com/w/ \
  quay.io/crunchtools/mcp-mediawiki \
  --transport streamable-http --host 0.0.0.0
```

Claude Code config:
```json
{"type": "http", "url": "http://127.0.0.1:8016/mcp"}
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `MEDIAWIKI_URL` | Yes | Wiki base URL (e.g., `https://en.wikipedia.org/w/`) |
| `MEDIAWIKI_USERNAME` | No | Bot/user account for write operations |
| `MEDIAWIKI_PASSWORD` | No | Bot/user password |
| `MEDIAWIKI_HTTP_USER` | No | HTTP Basic Auth username (.htaccess) |
| `MEDIAWIKI_HTTP_PASS` | No | HTTP Basic Auth password |
| `MEDIAWIKI_ALLOW_HTTP` | No | `true` permits plain `http://` to a non-localhost wiki addressed by a private IP literal |

## Tools (19)

| Category | Tool | Description |
|----------|------|-------------|
| Pages | `search` | Full-text search across wiki |
| Pages | `get_page` | Get page wikitext content |
| Pages | `get_page_html` | Parse page to HTML |
| Pages | `list_pages` | List pages with prefix filter |
| Pages | `create_page` | Create a new page |
| Pages | `edit_page` | Edit an existing page |
| Pages | `delete_page` | Delete a page |
| Pages | `move_page` | Move/rename a page |
| Categories | `list_categories` | List all categories |
| Categories | `get_category_members` | Get pages in a category |
| Categories | `get_page_categories` | Get categories for a page |
| Recent Changes | `list_recent_changes` | List recent edits |
| Parsing | `parse_wikitext` | Parse raw wikitext to HTML |
| Site Info | `get_site_info` | Get wiki config and version |
| Site Info | `list_namespaces` | List wiki namespaces |
| Users | `get_user_info` | Get user details |
| Users | `list_user_contributions` | List user edits |
| Files | `get_file_info` | Get file/image metadata |
| Files | `list_files` | List files on the wiki |

## Development

```bash
# Install dev dependencies
uv sync --all-extras

# Quality gates
uv run ruff check src tests
uv run mypy src
uv run pytest -v
gourmand --full .
podman build -f Containerfile .
```

## License

AGPL-3.0-or-later

<!-- mcp-name: io.github.crunchtools/mediawiki -->

TDQS

B3.2/5.0

Scored across 19 tools

Disambiguation4/5

Each tool targets a distinct resource+action pair (pages, categories, files, users, search, namespaces), so misselection is unlikely. The only fuzzy boundary is between get_page_html_tool (renders a page by title) and parse_wikitext_tool (renders raw wikitext), which sound similar until you read the input difference. get_page_tool vs get_page_html_tool is also a subtle distinction but handled by descriptions.

Naming Consistency5/5

Every tool follows the same verb_noun_tool pattern (list_, get_, create_, edit_, delete_, move_, parse_) in consistent snake_case with a uniform _tool suffix. Pluralization for list operations (list_pages, list_files, list_categories) is applied predictably. No mixed conventions.

Tool Count4/5

19 tools is slightly heavy but each one maps to a meaningful MediaWiki operation across pages, categories, files, users, and search. There is very little redundancy — nothing overlaps enough to be pruned. It sits near the upper edge of comfortable scoping for a single wiki API.

Completeness3/5

Page lifecycle is fully covered (list/get/create/edit/delete/move), but revision history and diffs are entirely absent, which is a core wiki workflow. Files and categories are read-only — no upload/delete file, no add/remove category from a page — leaving agents to dead-end on those write paths. User tooling is also read-only.

Maintenance

ActivityActive
ResponsivenessLimited data