Connect your AI assistant to any MediaWiki wiki, or script it directly from the terminal. Search, read, and edit wiki content using natural language or the wiki CLI.
Works with: Claude Desktop, Claude Code, Cursor, ChatGPT, n8n, and any MCP-compatible tool. Also ships a wiki CLI for shell scripts and CI pipelines, see Use from the Terminal.
| Document | Description |
|---|---|
| QUICKSTART.md | Get running in 2 minutes |
| TIETO_SETUP.md | Connect to Tieto's Public 360° Wiki (beginner-friendly) |
| CHANGELOG.md | Version history |
| ARCHITECTURE.md | System design |
| CONTRIBUTING.md | How to contribute |
| SECURITY.md | Security policies |
| WIKI_USE_CASES.md | Detailed workflows |
Once connected, just ask your AI:
| You say... | What happens |
|---|---|
| "What does our wiki say about onboarding?" | AI searches and summarizes relevant pages |
| "Find all pages mentioning the API" | Full-text search across your wiki |
| "Who edited the Release Notes last week?" | Shows revision history |
| "Are there broken links on the Docs page?" | Checks all external URLs |
| "Strike out John Smith on the Team page" | Applies formatting (requires auth) |
| "Convert this README to wiki format" | Transforms Markdown → MediaWiki markup ✨ |
Option A: Download pre-built binary (easiest)
Go to Releases and download for your platform.
Option B: Build from source (requires Go 1.24+)
git clone https://github.com/olgasafonova/mediawiki-mcp-server.git
cd mediawiki-mcp-server
go build -o mediawiki-mcp-server .Your wiki's API URL is usually:
| Wiki type | API URL |
|---|---|
| Standard MediaWiki | https://your-wiki.com/api.php |
| Wikipedia | https://en.wikipedia.org/w/api.php |
| Fandom | https://your-wiki.fandom.com/api.php |
Tip: Visit Special:Version on your wiki to find the exact API endpoint.
Pick your tool:
| I use... | Jump to setup |
|---|---|
| Claude Desktop (Mac/Windows) | Setup instructions |
| Claude Code CLI | Setup instructions |
| Cursor | Setup instructions |
| ChatGPT | Setup instructions |
| n8n | Setup instructions |
| VS Code | Setup instructions |
| Google ADK (Go/Python) | Setup instructions |
| Shell scripts / CI (no AI) | Use from the Terminal |
Works on Mac and Windows. No terminal needed after initial setup.
Mac
-
Open the config file:
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
If the file doesn't exist, create it.
-
Add this configuration (replace the path and URL):
{ "mcpServers": { "mediawiki": { "command": "/path/to/mediawiki-mcp-server", "env": { "MEDIAWIKI_URL": "https://your-wiki.com/api.php" } } } } -
Restart Claude Desktop (quit and reopen)
-
Test it: Ask "Search the wiki for getting started"
Windows
-
Open the config file:
%APPDATA%\Claude\claude_desktop_config.jsonIf the file doesn't exist, create it.
-
Add this configuration (replace the path and URL):
{ "mcpServers": { "mediawiki": { "command": "C:\\path\\to\\mediawiki-mcp-server.exe", "env": { "MEDIAWIKI_URL": "https://your-wiki.com/api.php" } } } } -
Restart Claude Desktop (quit and reopen)
-
Test it: Ask "Search the wiki for getting started"
The fastest setup. One command and you're done.
claude mcp add mediawiki /path/to/mediawiki-mcp-server \
-e MEDIAWIKI_URL="https://your-wiki.com/api.php"Test it: Ask "Search the wiki for getting started"
Cursor has built-in MCP support. Open Cursor Settings > MCP and add a new server, or edit the config file directly:
Mac
-
Open the config file:
~/.cursor/mcp.json -
Add this configuration:
{ "mcpServers": { "mediawiki": { "command": "/path/to/mediawiki-mcp-server", "env": { "MEDIAWIKI_URL": "https://your-wiki.com/api.php" } } } } -
Restart Cursor
Windows
-
Open the config file:
%USERPROFILE%\.cursor\mcp.json -
Add this configuration:
{ "mcpServers": { "mediawiki": { "command": "C:\\path\\to\\mediawiki-mcp-server.exe", "env": { "MEDIAWIKI_URL": "https://your-wiki.com/api.php" } } } } -
Restart Cursor
ChatGPT connects via HTTP. You need to run the server on a machine ChatGPT can reach.
Requirements: ChatGPT Pro, Plus, Business, Enterprise, or Education account.
-
Start the server with HTTP mode:
# Set your wiki URL export MEDIAWIKI_URL="https://your-wiki.com/api.php" # Generate a secure token export MCP_AUTH_TOKEN=$(openssl rand -hex 32) echo "Save this token: $MCP_AUTH_TOKEN" # Start the server ./mediawiki-mcp-server -http :8080
-
In ChatGPT:
- Go to Settings → Connectors → Advanced → Developer Mode
- Add a new MCP connector
- URL:
http://your-server:8080(must be publicly accessible) - Authentication: Bearer token → paste your token
-
Test it: Ask "Search the wiki for getting started"
For production: See Security Best Practices for HTTPS setup.
n8n connects via HTTP using the MCP Client Tool node.
-
Start the server with HTTP mode:
export MEDIAWIKI_URL="https://your-wiki.com/api.php" export MCP_AUTH_TOKEN="your-secure-token" ./mediawiki-mcp-server -http :8080
-
In n8n:
- Add an MCP Client Tool node
- Transport: HTTP Streamable
- URL:
http://your-server:8080 - Authentication: Bearer → your token
-
Enable for AI agents (add to n8n environment):
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true -
Connect the MCP Client Tool to an AI Agent node.
VS Code has built-in MCP support via Copilot Chat.
- Open the Command Palette: Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac)
- Type "MCP: Add Server" and select it
- Choose "Stdio" as the transport type
- Enter the path to the binary when prompted
- Name the server:
mediawiki
This creates a .vscode/mcp.json file. Add the environment variables:
{
"servers": {
"mediawiki": {
"command": "/path/to/mediawiki-mcp-server",
"env": {
"MEDIAWIKI_URL": "https://your-wiki.com/api.php"
}
}
}
}On Windows, use the .exe path with double backslashes.
Reload VS Code, then use the wiki tools through Copilot Chat.
Google's Agent Development Kit connects to MCP servers via stdio or Streamable HTTP.
Go (stdio)
import (
"os/exec"
"google.golang.org/adk/tool/mcptoolset"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
// Create MCP toolset for wiki access
wikiTools, _ := mcptoolset.New(mcptoolset.Config{
Transport: &mcp.CommandTransport{
Command: exec.Command("/path/to/mediawiki-mcp-server"),
Env: []string{
"MEDIAWIKI_URL=https://your-wiki.com/api.php",
},
},
})
// Add to your agent
agent := llmagent.New(llmagent.Config{
Name: "wiki-agent",
Model: model,
Toolsets: []tool.Set{wikiTools},
})Go (Streamable HTTP)
First, start the server in HTTP mode:
export MEDIAWIKI_URL="https://your-wiki.com/api.php"
./mediawiki-mcp-server -http :8080 -token "your-secret-token"Then connect from your ADK agent:
import (
"google.golang.org/adk/tool/mcptoolset"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
wikiTools, _ := mcptoolset.New(mcptoolset.Config{
Transport: mcp.NewStreamableHTTPClientTransport("http://localhost:8080"),
})Python (stdio)
from google.adk.tools.mcp_tool import MCPToolset, StdioConnectionParams, StdioServerParameters
wiki_tools = MCPToolset(
connection_params=StdioConnectionParams(
server_params=StdioServerParameters(
command="/path/to/mediawiki-mcp-server",
env={"MEDIAWIKI_URL": "https://your-wiki.com/api.php"},
)
)
)Python (Streamable HTTP)
Start the server in HTTP mode, then:
from google.adk.tools.mcp_tool import MCPToolset, StreamableHTTPConnectionParams
wiki_tools = MCPToolset(
connection_params=StreamableHTTPConnectionParams(
url="http://localhost:8080",
headers={"Authorization": "Bearer your-secret-token"},
)
)The wiki CLI is a command-line companion to the MCP server. It shares the same API client, auth, and configuration. Reach for it when a prompt is overkill: shell pipelines, CI checks, batch edits, cron jobs.
git clone https://github.com/olgasafonova/mediawiki-mcp-server.git
cd mediawiki-mcp-server
go build -o ~/go/bin/wiki ./cmd/wikiThe CLI reads the same environment variables as the MCP server.
export MEDIAWIKI_URL="https://your-wiki.com/api.php"
# Optional, for write operations
export MEDIAWIKI_USERNAME="User@BotName"
export MEDIAWIKI_PASSWORD="your-bot-password"
wiki config # verify setupYou can also override the URL per-invocation with --url.
| Command | What it does |
|---|---|
wiki search <query> |
Full-text search |
wiki page <title> |
Read a page |
wiki edit <title> |
Create or edit a page |
wiki replace <find> <replace> |
Find and replace across pages |
wiki lint <page> |
Check terminology and links (exit code 4 on findings) |
wiki audit |
Wiki-wide health check |
wiki recent |
Recent changes |
wiki history <page> |
Revision history |
wiki diff <page> |
Compare revisions |
wiki links [external|backlinks|broken|orphans|batch] |
Link analysis |
wiki list [pages|categories|members|users] |
Listing queries |
wiki publish <file.md> |
Convert Markdown to wikitext and publish |
wiki config |
Show or verify configuration |
wiki version |
Print CLI version |
Every command supports --json (machine-readable output) and --quiet (errors only).
# Pipe lint results into CI
wiki lint "Release Notes" --json > lint.json
# Find broken external links as structured data
wiki links broken --json | jq '.[] | select(.status >= 400)'
# Publish a Markdown file
wiki publish docs/onboarding.md --title "Onboarding"
# Cron-friendly health check
wiki audit --quiet --json > /tmp/wiki-health.jsonRun wiki <command> --help for full flags.
Reading works without login on public wikis. Private/corporate wikis often require authentication for all operations, including reading. Editing always requires a bot password.
- Log in to your wiki
- Go to
Special:BotPasswords(e.g.,https://your-wiki.com/wiki/Special:BotPasswords) - Enter a bot name:
mcp-assistant - Check these permissions:
- ✅ Basic rights
- ✅ Edit existing pages
- Click Create and save the password (you won't see it again)
Claude Desktop / Cursor:
{
"mcpServers": {
"mediawiki": {
"command": "/path/to/mediawiki-mcp-server",
"env": {
"MEDIAWIKI_URL": "https://your-wiki.com/api.php",
"MEDIAWIKI_USERNAME": "YourWikiUsername@mcp-assistant",
"MEDIAWIKI_PASSWORD": "your-bot-password-here"
}
}
}
}Claude Code CLI:
claude mcp add mediawiki /path/to/mediawiki-mcp-server \
-e MEDIAWIKI_URL="https://your-wiki.com/api.php" \
-e MEDIAWIKI_USERNAME="YourWikiUsername@mcp-assistant" \
-e MEDIAWIKI_PASSWORD="your-bot-password-here"📖 More examples: See WIKI_USE_CASES.md for detailed workflows by persona (content editors, documentation managers, developers).
- "What does our wiki say about deployment?"
- "Find all pages mentioning the API"
- "Show me the Getting Started guide"
- "List all pages in the Documentation category"
- "Give me a quick overview of the Configuration page" ✨
- "Get the content of Main Page, FAQ, and Setup all at once" ✨
- "Show me the sections of the Installation Guide"
- "Get the 'Troubleshooting' section from the FAQ page"
- "Find pages related to the API Reference"
- "What images are on the Product Overview page?"
- "What pages were updated this week?"
- "Who edited the Release Notes page?"
- "Show me the diff between the last two versions"
- "Who are the most active editors this month?" ✨
- "Which pages get edited most frequently?" ✨
- "Are there broken links on this page?"
- "Find orphaned pages with no links to them"
- "Check terminology consistency in the Product category"
- "Find pages similar to the Installation Guide" ✨
- "Compare how 'API version' is documented across pages" ✨
- "Find pages not updated in the last 90 days" ✨
- "Rename 'Old Guide' to 'Updated Guide'"
- "Add category 'API' to the Integration page"
- "Remove the 'Deprecated' category from this page"
- "Strike out John Smith on the Team page"
- "Replace 'version 2.0' with 'version 3.0' on Release Notes"
- "Make 'API Gateway' bold on the Architecture page"
- "Upload this image from URL to the wiki"
- "Add the logo from https://example.com/logo.png as Company_Logo.png"
- "Search for 'budget' in File:Annual-Report.pdf"
- "Find mentions of 'API' in the changelog.txt file"
Note: PDF search requires
poppler-utilsinstalled. See PDF Search Setup.
- "Convert this README to wiki format"
- "Transform my release notes from Markdown to MediaWiki"
- "Convert with Tieto branding and CSS" (use theme="tieto", add_css=true)
Themes:
tieto- Tieto brand colors (Hero Blue headings, yellow code highlights)neutral- Clean output without custom colors (default)dark- Dark mode optimized
- "Who are the wiki admins?"
- "List all bot accounts"
"MEDIAWIKI_URL environment variable is required" → Check your config file has the correct path and URL.
"authentication failed"
→ Check username format: WikiUsername@BotName
→ Verify bot password hasn't expired
→ Ensure bot has required permissions
"page does not exist" → Page titles are case-sensitive. Check the exact title on your wiki.
Tools not appearing in Claude/Cursor → Restart the application after config changes.
ChatGPT can't connect → Ensure your server is publicly accessible (not just localhost) → Check the bearer token matches exactly
"PDF search requires 'pdftotext'" → Install poppler-utils for your platform (see PDF Search Setup)
PDF search requires the pdftotext tool from poppler-utils. Text file search (TXT, MD, CSV, etc.) works without any dependencies.
| Platform | Install Command |
|---|---|
| macOS | brew install poppler |
| Ubuntu/Debian | apt install poppler-utils |
| RHEL/CentOS | yum install poppler-utils |
| Windows | choco install poppler |
Windows alternative: Download binaries from poppler-windows releases and add to PATH.
Verify installation:
pdftotext -v| Platform | Transport | Status |
|---|---|---|
| Claude Desktop (Mac) | stdio | ✅ Supported |
| Claude Desktop (Windows) | stdio | ✅ Supported |
| Claude Code CLI | stdio | ✅ Supported |
| Cursor | stdio | ✅ Supported |
| VS Code | stdio | ✅ Supported |
| ChatGPT | HTTP | ✅ Supported |
| n8n | HTTP | ✅ Supported |
| Google ADK | stdio / HTTP | ✅ Supported |
Works with any wiki: Wikipedia, Fandom, corporate wikis, or any MediaWiki installation.
For ChatGPT, n8n, and remote access, the server supports HTTP transport.
| Flag | Default | Description |
|---|---|---|
-http |
(empty) | HTTP address (e.g., :8080). Empty = stdio mode |
-token |
(empty) | Bearer token for authentication |
-origins |
(empty) | Allowed CORS origins (comma-separated) |
-rate-limit |
60 | Max requests per minute per IP |
# Basic HTTP server
./mediawiki-mcp-server -http :8080
# With authentication
./mediawiki-mcp-server -http :8080 -token "your-secret-token"
# Restrict to specific origins
./mediawiki-mcp-server -http :8080 -token "secret" \
-origins "https://chat.openai.com,https://n8n.example.com"
# Bind to localhost only (for use behind reverse proxy)
./mediawiki-mcp-server -http 127.0.0.1:8080 -token "secret"When exposing the server over HTTP:
./mediawiki-mcp-server -http :8080 -token "$(openssl rand -hex 32)"Example nginx configuration:
server {
listen 443 ssl;
server_name mcp.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}./mediawiki-mcp-server -http :8080 -token "secret" \
-origins "https://chat.openai.com"| Feature | Description |
|---|---|
| Bearer Auth | Validates Authorization: Bearer <token> header |
| Origin Validation | Blocks requests from unauthorized domains |
| Rate Limiting | 60 requests/minute per IP (configurable) |
| Security Headers | X-Content-Type-Options, X-Frame-Options |
| Circuit Breaker | Automatic failover after consecutive API failures |
When running in HTTP mode, these endpoints are available:
| Endpoint | Description |
|---|---|
/ |
MCP protocol endpoint (tools, resources, prompts) |
/health |
Liveness check (always returns 200 if server is running) |
/ready |
Readiness check (verifies wiki API connectivity) |
/tools |
Tool discovery (lists all 40+ tools by category) |
/status |
Resilience status (circuit breaker state, dedup stats) |
/metrics |
Prometheus metrics (request counts, latencies) |
/.well-known/mcp-server-card |
SEP-2127 Server Card (pre-connect discovery) via mcp-servercard-go |
Use /health and /ready for container orchestration:
# Kubernetes example
livenessProbe:
httpGet:
path: /health
port: 8080
readinessProbe:
httpGet:
path: /ready
port: 8080Get a list of all available tools:
curl http://localhost:8080/tools | jq '.categories | keys'Check circuit breaker and request deduplication status:
curl http://localhost:8080/status
# Returns: {"circuit_breaker":{"state":"closed",...},"inflight_requests":0}| Variable | Required | Description |
|---|---|---|
MEDIAWIKI_URL |
Yes | Wiki API endpoint (e.g., https://wiki.com/api.php) |
MEDIAWIKI_USERNAME |
No | Bot username (User@BotName) |
MEDIAWIKI_PASSWORD |
No | Bot password |
MEDIAWIKI_TIMEOUT |
No | Request timeout (default: 30s) |
MCP_AUTH_TOKEN |
No | Bearer token for HTTP authentication |
Read Operations
| Tool | Description |
|---|---|
mediawiki_search |
Full-text search |
mediawiki_get_page |
Get page content |
mediawiki_get_sections |
Get section structure or specific section content ✨ |
mediawiki_get_related |
Find related pages via categories/links ✨ |
mediawiki_get_images |
Get images used on a page ✨ |
mediawiki_list_pages |
List all pages |
mediawiki_list_categories |
List categories |
mediawiki_get_category_members |
Get pages in category |
mediawiki_get_page_info |
Get page metadata |
mediawiki_get_wiki_info |
Wiki statistics |
mediawiki_list_users |
List users by group |
mediawiki_parse |
Preview wikitext |
mediawiki_get_page_summary |
Lead section + metadata without full page load ✨ |
mediawiki_batch_get_pages |
Fetch multiple page contents in one API call ✨ |
mediawiki_batch_get_pages_info |
Get metadata for multiple pages at once ✨ |
mediawiki_search_and_read |
Search + read top results in one call ✨ |
search_and_read ✨ — Eliminates the most common two-call pattern (search then read):
"What does the wiki say about deployment?"
→ Searches, reads top result, returns content + remaining hits as summaries
get_page_summary ✨ — Quick overview without loading full page content:
"What is the API Reference page about?"
→ Returns intro section, categories, section list, and metadata
batch_get_pages ✨ — Fetch up to 50 pages in one call:
"Get the content of Main Page, FAQ, and Getting Started"
→ Returns all three pages in a single API request
Link Analysis
| Tool | Description |
|---|---|
mediawiki_get_external_links |
Get external URLs from page |
mediawiki_get_external_links_batch |
Get URLs from multiple pages |
mediawiki_check_links |
Check if URLs work |
mediawiki_find_broken_internal_links |
Find broken wiki links |
mediawiki_get_backlinks |
"What links here" |
Content Quality
| Tool | Description |
|---|---|
mediawiki_check_terminology |
Check naming consistency |
mediawiki_check_translations |
Find missing translations |
mediawiki_find_orphaned_pages |
Find unlinked pages |
mediawiki_audit |
Comprehensive health audit (parallel checks, health score) |
mediawiki_get_stale_pages |
Find pages not edited in N days ✨ |
get_stale_pages ✨ — Wiki hygiene: find outdated content that needs review:
"Find pages not updated in 90 days"
→ Returns stale pages sorted oldest-first with days since last edit
Content Discovery ✨
| Tool | Description |
|---|---|
mediawiki_find_similar_pages |
Find pages with similar content based on term overlap |
mediawiki_compare_topic |
Compare how a topic is described across multiple pages |
find_similar_pages - Identifies related content that should be cross-linked or potential duplicates:
"Find pages similar to the API Reference page"
→ Returns similarity scores, common terms, and linking recommendations
compare_topic - Detects inconsistencies in documentation (different values, conflicting info):
"Compare how 'timeout' is described across all pages"
→ Returns page mentions with context snippets and value mismatches
History
| Tool | Description |
|---|---|
mediawiki_get_revisions |
Page edit history |
mediawiki_compare_revisions |
Diff between versions |
mediawiki_get_user_contributions |
User's edit history |
mediawiki_get_recent_changes |
Recent wiki activity with aggregation ✨ |
Aggregation ✨ - Use aggregate_by parameter to get compact summaries:
aggregate_by: "user"→ Most active editorsaggregate_by: "page"→ Most edited pagesaggregate_by: "type"→ Change type distribution (edit, new, log)
Quick Edit Tools
| Tool | Description |
|---|---|
mediawiki_find_replace |
Find and replace text |
mediawiki_apply_formatting |
Apply bold, italic, strikethrough |
mediawiki_bulk_replace |
Replace across multiple pages |
mediawiki_search_in_page |
Search within a page |
mediawiki_resolve_title |
Fuzzy title matching |
Edit Response Info ✨ - All edit operations return revision tracking and undo instructions:
{
"revision": {
"old_revision": 1234,
"new_revision": 1235,
"diff_url": "https://wiki.../index.php?diff=1235&oldid=1234"
},
"undo": {
"instruction": "To undo: use wiki URL or revert to revision 1234",
"wiki_url": "https://wiki.../index.php?title=...&action=edit&undo=1235"
}
}Write Operations
| Tool | Description |
|---|---|
mediawiki_edit_page |
Create or edit pages |
mediawiki_upload_file |
Upload files from URL ✨ |
mediawiki_move_page |
Move (rename) pages with redirect ✨ |
mediawiki_manage_categories |
Add/remove categories without full edit ✨ |
move_page ✨ — Rename pages properly (don't delete and recreate):
"Rename 'Old Guide' to 'Updated Guide'"
→ Moves page, creates redirect, optionally moves talk page
manage_categories ✨ — Quick category management:
"Add category 'API' and remove category 'Deprecated' from this page"
→ Modifies categories without touching page content
File Search ✨
| Tool | Description |
|---|---|
mediawiki_search_in_file |
Search text in PDFs and text files |
Supported formats: PDF (text-based), TXT, MD, CSV, JSON, XML, HTML
PDF requires: poppler-utils installed (see PDF Search Setup)
Markdown Conversion ✨
| Tool | Description |
|---|---|
mediawiki_convert_markdown |
Convert Markdown text to MediaWiki markup |
Themes:
tieto- Tieto brand colors (Hero Blue #021e57 headings, yellow code highlights)neutral- Clean output without custom colors (default)dark- Dark mode optimized
Options:
add_css- Include CSS styling block for branded appearancereverse_changelog- Reorder changelog entries newest-firstprettify_checks- Replace plain checkmarks (✓) with emoji (✅)
Example:
Input: "# Hello\n**bold** and *italic*"
Output: "= Hello =\n'''bold''' and ''italic''"
Workflow for adding Markdown content to wiki:
- Convert:
mediawiki_convert_markdown→ get wikitext - Save:
mediawiki_edit_page→ publish to wiki
New to this? Check out the Tieto Setup Guide for step-by-step instructions that assume no technical knowledge.
Quick setup for wiki.software-innovation.com
- Go to Special:BotPasswords
- Log in with your Tieto account
- Create a bot named
wiki-MCP - Enable: Basic rights + Edit existing pages
- Save the generated password
Your username: your.email@tietoevry.com#wiki-MCP
This wiki requires authentication for all operations (including reading).
Claude Code CLI:
claude mcp add mediawiki /path/to/mediawiki-mcp-server \
-e MEDIAWIKI_URL="https://wiki.software-innovation.com/api.php" \
-e MEDIAWIKI_USERNAME="your.email@tietoevry.com#wiki-MCP" \
-e MEDIAWIKI_PASSWORD="your-bot-password-here"Claude Desktop / Cursor:
{
"mcpServers": {
"mediawiki": {
"command": "/path/to/mediawiki-mcp-server",
"env": {
"MEDIAWIKI_URL": "https://wiki.software-innovation.com/api.php",
"MEDIAWIKI_USERNAME": "your.email@tietoevry.com#wiki-MCP",
"MEDIAWIKI_PASSWORD": "your-bot-password-here"
}
}
}
}- "Find all pages about eFormidling"
- "What does the wiki say about AutoSaver?"
- "Check for broken links on the API documentation"
git clone https://github.com/olgasafonova/mediawiki-mcp-server.git
cd mediawiki-mcp-server
go build -o mediawiki-mcp-server .Requires Go 1.24+
# Unit tests
make test
# With coverage
make test-cover
# Lint
make lintIntegration tests run against a real MediaWiki instance:
# Start MediaWiki container
docker-compose -f docker-compose.test.yml up -d
# Wait for MediaWiki to be ready (about 60 seconds)
# Run integration tests
go test -tags=integration ./wiki/...
# Stop and clean up
docker-compose -f docker-compose.test.yml down -vIntegration tests can also be triggered manually via GitHub Actions.
mediawiki-mcp-server/
├── main.go # Server entry point, HTTP transport
├── main_test.go # Server tests
├── wiki_editing_guidelines.go # AI guidance for editing
├── docker-compose.test.yml # Integration test environment
│
├── .github/workflows/
│ ├── ci.yml # Unit tests, lint, build
│ └── integration.yml # Integration tests (manual trigger)
│
├── scripts/
│ └── LocalSettings.php # MediaWiki config for tests
│
├── tools/ # MCP tool definitions
│ ├── definitions.go # Tool schemas and metadata
│ ├── handlers.go # Tool request handlers
│ └── registry.go # Tool registration
│
├── wiki/ # MediaWiki API client
│ ├── client.go # HTTP client with auth
│ ├── config.go # Configuration management
│ ├── types.go # Request/response types
│ ├── errors.go # Error handling
│ ├── read.go # Page reading operations
│ ├── write.go # Page editing operations
│ ├── search.go # Search functionality
│ ├── methods.go # Core API methods
│ ├── history.go # Revision history
│ ├── categories.go # Category operations
│ ├── users.go # User management
│ ├── links.go # Link analysis
│ ├── quality.go # Content quality checks
│ ├── audit.go # Wiki health audits
│ ├── similarity.go # Content similarity detection
│ ├── pdf.go # PDF text extraction
│ ├── security.go # Input sanitization, SSRF protection
│ ├── integration_test.go # Integration tests (build tag)
│ └── *_test.go # Unit tests
│
├── converter/ # Markdown to MediaWiki converter
│ ├── converter.go # Conversion logic
│ ├── converter_test.go # Tests
│ └── themes.go # Theme definitions (tieto, neutral, dark)
│
├── cmd/
│ └── benchmark/ # Performance benchmarking
│ └── main.go
│
├── ARCHITECTURE.md # System design documentation
├── CONTRIBUTING.md # Contribution guidelines
├── SECURITY.md # Security policy
├── WIKI_USE_CASES.md # Usage examples by persona
└── README.md
If this server saved you time, consider giving it a ⭐ on GitHub. It helps others discover the project.
Check out my other MCP servers:
| Server | Description | Stars |
|---|---|---|
| gleif-mcp-server | Access GLEIF LEI database. Look up company identities, verify legal entities. | |
| miro-mcp-server | Control Miro whiteboards with AI. Boards, diagrams, mindmaps, and more. | |
| nordic-registry-mcp-server | Access Nordic business registries. Look up companies across Norway, Denmark, Finland, Sweden. | |
| productplan-mcp-server | Talk to your ProductPlan roadmaps. Query OKRs, ideas, launches. | |
| tilbudstrolden-mcp | Nordic grocery deal hunting. Find offers, plan meals, track spending. | |
| mcp-servercard-go | Go library for SEP-2127 Server Cards. Pre-connect discovery for MCP servers. |
MIT License
- Built with Go MCP SDK
- Powered by MediaWiki API