io.github.olgasafonova/mediawiki-mcp-server

平台与服务

by olgasafonova

集成 MediaWiki 的 MCP server,提供 33+ 工具,支持搜索、阅读、编辑和链接分析。

什么是 io.github.olgasafonova/mediawiki-mcp-server

集成 MediaWiki 的 MCP server,提供 33+ 工具,支持搜索、阅读、编辑和链接分析。

README

MediaWiki MCP Server

Connect your AI assistant to any MediaWiki wiki. Search, read, and edit wiki content using natural language.

CI Go Report Card License: MIT

Works with: Claude Desktop, Claude Code, Cursor, ChatGPT, n8n, and any MCP-compatible tool.


Documentation

DocumentDescription
QUICKSTART.mdGet running in 2 minutes
TIETO_SETUP.mdConnect to Tieto's Public 360° Wiki (beginner-friendly)
CHANGELOG.mdVersion history
ARCHITECTURE.mdSystem design
CONTRIBUTING.mdHow to contribute
SECURITY.mdSecurity policies
WIKI_USE_CASES.mdDetailed workflows

What Can You Do?

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 ✨

Get Started

Step 1: Download

Option A: Download pre-built binary (easiest)

Go to Releases and download for your platform.

Option B: Build from source (requires Go 1.24+)

bash
git clone https://github.com/olgasafonova/mediawiki-mcp-server.git
cd mediawiki-mcp-server
go build -o mediawiki-mcp-server .

Step 2: Find Your Wiki's API URL

Your wiki's API URL is usually:

Wiki typeAPI URL
Standard MediaWikihttps://your-wiki.com/api.php
Wikipediahttps://en.wikipedia.org/w/api.php
Fandomhttps://your-wiki.fandom.com/api.php

Tip: Visit Special:Version on your wiki to find the exact API endpoint.

Step 3: Configure Your AI Tool

Pick your tool:

I use...Jump to setup
Claude Desktop (Mac/Windows)Setup instructions
Claude Code CLISetup instructions
CursorSetup instructions
ChatGPTSetup instructions
n8nSetup instructions
VS CodeSetup instructions
Google ADK (Go/Python)Setup instructions

Claude Desktop

Works on Mac and Windows. No terminal needed after initial setup.

<details open> <summary><strong>Mac</strong></summary>
  1. Open the config file:

    bash
    open ~/Library/Application\ Support/Claude/claude_desktop_config.json
    

    If the file doesn't exist, create it.

  2. Add this configuration (replace the path and URL):

    json
    {
      "mcpServers": {
        "mediawiki": {
          "command": "/path/to/mediawiki-mcp-server",
          "env": {
            "MEDIAWIKI_URL": "https://your-wiki.com/api.php"
          }
        }
      }
    }
    
  3. Restart Claude Desktop (quit and reopen)

  4. Test it: Ask "Search the wiki for getting started"

</details> <details> <summary><strong>Windows</strong></summary>
  1. Open the config file:

    code
    %APPDATA%\Claude\claude_desktop_config.json
    

    If the file doesn't exist, create it.

  2. Add this configuration (replace the path and URL):

    json
    {
      "mcpServers": {
        "mediawiki": {
          "command": "C:\\path\\to\\mediawiki-mcp-server.exe",
          "env": {
            "MEDIAWIKI_URL": "https://your-wiki.com/api.php"
          }
        }
      }
    }
    
  3. Restart Claude Desktop (quit and reopen)

  4. Test it: Ask "Search the wiki for getting started"

</details>

Claude Code CLI

The fastest setup. One command and you're done.

bash
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

Cursor has built-in MCP support. Open Cursor Settings > MCP and add a new server, or edit the config file directly:

<details open> <summary><strong>Mac</strong></summary>
  1. Open the config file:

    code
    ~/.cursor/mcp.json
    
  2. Add this configuration:

    json
    {
      "mcpServers": {
        "mediawiki": {
          "command": "/path/to/mediawiki-mcp-server",
          "env": {
            "MEDIAWIKI_URL": "https://your-wiki.com/api.php"
          }
        }
      }
    }
    
  3. Restart Cursor

</details> <details> <summary><strong>Windows</strong></summary>
  1. Open the config file:

    code
    %USERPROFILE%\.cursor\mcp.json
    
  2. Add this configuration:

    json
    {
      "mcpServers": {
        "mediawiki": {
          "command": "C:\\path\\to\\mediawiki-mcp-server.exe",
          "env": {
            "MEDIAWIKI_URL": "https://your-wiki.com/api.php"
          }
        }
      }
    }
    
  3. Restart Cursor

</details>

ChatGPT

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.

Setup

  1. Start the server with HTTP mode:

    bash
    # 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
    
  2. In ChatGPT:

    • Go to SettingsConnectorsAdvancedDeveloper Mode
    • Add a new MCP connector
    • URL: http://your-server:8080 (must be publicly accessible)
    • Authentication: Bearer token → paste your token
  3. Test it: Ask "Search the wiki for getting started"

For production: See Security Best Practices for HTTPS setup.


n8n

n8n connects via HTTP using the MCP Client Tool node.

Setup

  1. Start the server with HTTP mode:

    bash
    export MEDIAWIKI_URL="https://your-wiki.com/api.php"
    export MCP_AUTH_TOKEN="your-secure-token"
    ./mediawiki-mcp-server -http :8080
    
  2. In n8n:

    • Add an MCP Client Tool node
    • Transport: HTTP Streamable
    • URL: http://your-server:8080
    • Authentication: Bearer → your token
  3. Enable for AI agents (add to n8n environment):

    code
    N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
    
  4. Connect the MCP Client Tool to an AI Agent node.


VS Code

VS Code has built-in MCP support via Copilot Chat.

  1. Open the Command Palette: Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac)
  2. Type "MCP: Add Server" and select it
  3. Choose "Stdio" as the transport type
  4. Enter the path to the binary when prompted
  5. Name the server: mediawiki

This creates a .vscode/mcp.json file. Add the environment variables:

json
{
  "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 ADK

Google's Agent Development Kit connects to MCP servers via stdio or Streamable HTTP.

<details open> <summary><strong>Go (stdio)</strong></summary>
go
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},
})
</details> <details> <summary><strong>Go (Streamable HTTP)</strong></summary>

First, start the server in HTTP mode:

bash
export MEDIAWIKI_URL="https://your-wiki.com/api.php"
./mediawiki-mcp-server -http :8080 -token "your-secret-token"

Then connect from your ADK agent:

go
import (
    "google.golang.org/adk/tool/mcptoolset"
    "github.com/modelcontextprotocol/go-sdk/mcp"
)

wikiTools, _ := mcptoolset.New(mcptoolset.Config{
    Transport: mcp.NewStreamableHTTPClientTransport("http://localhost:8080"),
})
</details> <details> <summary><strong>Python (stdio)</strong></summary>
python
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"},
        )
    )
)
</details> <details> <summary><strong>Python (Streamable HTTP)</strong></summary>

Start the server in HTTP mode, then:

python
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"},
    )
)
</details>

Need to Edit Wiki Pages?

Reading works without login on public wikis. Private/corporate wikis often require authentication for all operations, including reading. Editing always requires a bot password.

Create a Bot Password

  1. Log in to your wiki
  2. Go to Special:BotPasswords (e.g., https://your-wiki.com/wiki/Special:BotPasswords)
  3. Enter a bot name: mcp-assistant
  4. Check these permissions:
    • ✅ Basic rights
    • ✅ Edit existing pages
  5. Click Create and save the password (you won't see it again)

Add Credentials to Your Config

Claude Desktop / Cursor:

json
{
  "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:

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

Example Prompts

📖 More examples: See WIKI_USE_CASES.md for detailed workflows by persona (content editors, documentation managers, developers).

Search & Read

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

Sections & Related Content ✨

  • "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?"

Track Changes

  • "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?"

Check Quality

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

Page Management (requires auth) ✨

  • "Rename 'Old Guide' to 'Updated Guide'"
  • "Add category 'API' to the Integration page"
  • "Remove the 'Deprecated' category from this page"

Quick Edits (requires auth)

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

File Uploads (requires auth) ✨

File Search ✨

  • "Search for 'budget' in File:Annual-Report.pdf"
  • "Find mentions of 'API' in the changelog.txt file"

Note: PDF search requires poppler-utils installed. See PDF Search Setup.

Convert Markdown ✨

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

Find Users

  • "Who are the wiki admins?"
  • "List all bot accounts"

Troubleshooting

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

PDF search requires the pdftotext tool from poppler-utils. Text file search (TXT, MD, CSV, etc.) works without any dependencies.

PlatformInstall Command
macOSbrew install poppler
Ubuntu/Debianapt install poppler-utils
RHEL/CentOSyum install poppler-utils
Windowschoco install poppler

Windows alternative: Download binaries from poppler-windows releases and add to PATH.

Verify installation:

bash
pdftotext -v

Compatibility

PlatformTransportStatus
Claude Desktop (Mac)stdio✅ Supported
Claude Desktop (Windows)stdio✅ Supported
Claude Code CLIstdio✅ Supported
Cursorstdio✅ Supported
VS Codestdio✅ Supported
ChatGPTHTTP✅ Supported
n8nHTTP✅ Supported
Google ADKstdio / HTTP✅ Supported

Works with any wiki: Wikipedia, Fandom, corporate wikis, or any MediaWiki installation.


Advanced Configuration

HTTP Transport Options

For ChatGPT, n8n, and remote access, the server supports HTTP transport.

CLI Flags

FlagDefaultDescription
-http(empty)HTTP address (e.g., :8080). Empty = stdio mode
-token(empty)Bearer token for authentication
-origins(empty)Allowed CORS origins (comma-separated)
-rate-limit60Max requests per minute per IP

Examples

bash
# 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"

Security Best Practices

When exposing the server over HTTP:

1. Always Use Authentication

bash
./mediawiki-mcp-server -http :8080 -token "$(openssl rand -hex 32)"

2. Use HTTPS via Reverse Proxy

Example nginx configuration:

nginx
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;
    }
}

3. Restrict Origins

bash
./mediawiki-mcp-server -http :8080 -token "secret" \
  -origins "https://chat.openai.com"

Built-in Security Features

FeatureDescription
Bearer AuthValidates Authorization: Bearer <token> header
Origin ValidationBlocks requests from unauthorized domains
Rate Limiting60 requests/minute per IP (configurable)
Security HeadersX-Content-Type-Options, X-Frame-Options
Circuit BreakerAutomatic failover after consecutive API failures

HTTP Endpoints

When running in HTTP mode, these endpoints are available:

EndpointDescription
/MCP protocol endpoint (tools, resources, prompts)
/healthLiveness check (always returns 200 if server is running)
/readyReadiness check (verifies wiki API connectivity)
/toolsTool discovery (lists all 40+ tools by category)
/statusResilience status (circuit breaker state, dedup stats)
/metricsPrometheus metrics (request counts, latencies)
/.well-known/mcp-server-cardSEP-2127 Server Card (pre-connect discovery) via mcp-servercard-go

Health Checks

Use /health and /ready for container orchestration:

yaml
# Kubernetes example
livenessProbe:
  httpGet:
    path: /health
    port: 8080
readinessProbe:
  httpGet:
    path: /ready
    port: 8080

Tool Discovery

Get a list of all available tools:

bash
curl http://localhost:8080/tools | jq '.categories | keys'

Resilience Monitoring

Check circuit breaker and request deduplication status:

bash
curl http://localhost:8080/status
# Returns: {"circuit_breaker":{"state":"closed",...},"inflight_requests":0}

Environment Variables

VariableRequiredDescription
MEDIAWIKI_URLYesWiki API endpoint (e.g., https://wiki.com/api.php)
MEDIAWIKI_USERNAMENoBot username (User@BotName)
MEDIAWIKI_PASSWORDNoBot password
MEDIAWIKI_TIMEOUTNoRequest timeout (default: 30s)
MCP_AUTH_TOKENNoBearer token for HTTP authentication

All Available Tools

<details> <summary><strong>Read Operations</strong></summary>
ToolDescription
mediawiki_searchFull-text search
mediawiki_get_pageGet page content
mediawiki_get_sectionsGet section structure or specific section content ✨
mediawiki_get_relatedFind related pages via categories/links ✨
mediawiki_get_imagesGet images used on a page ✨
mediawiki_list_pagesList all pages
mediawiki_list_categoriesList categories
mediawiki_get_category_membersGet pages in category
mediawiki_get_page_infoGet page metadata
mediawiki_get_wiki_infoWiki statistics
mediawiki_list_usersList users by group
mediawiki_parsePreview wikitext
mediawiki_get_page_summaryLead section + metadata without full page load ✨
mediawiki_batch_get_pagesFetch multiple page contents in one API call ✨
mediawiki_batch_get_pages_infoGet metadata for multiple pages at once ✨
mediawiki_search_and_readSearch + read top results in one call ✨

search_and_read ✨ — Eliminates the most common two-call pattern (search then read):

code
"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:

code
"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:

code
"Get the content of Main Page, FAQ, and Getting Started"
→ Returns all three pages in a single API request
</details> <details> <summary><strong>Link Analysis</strong></summary>
ToolDescription
mediawiki_get_external_linksGet external URLs from page
mediawiki_get_external_links_batchGet URLs from multiple pages
mediawiki_check_linksCheck if URLs work
mediawiki_find_broken_internal_linksFind broken wiki links
mediawiki_get_backlinks"What links here"
</details> <details> <summary><strong>Content Quality</strong></summary>
ToolDescription
mediawiki_check_terminologyCheck naming consistency
mediawiki_check_translationsFind missing translations
mediawiki_find_orphaned_pagesFind unlinked pages
mediawiki_auditComprehensive health audit (parallel checks, health score)
mediawiki_get_stale_pagesFind pages not edited in N days ✨

get_stale_pages ✨ — Wiki hygiene: find outdated content that needs review:

code
"Find pages not updated in 90 days"
→ Returns stale pages sorted oldest-first with days since last edit
</details> <details> <summary><strong>Content Discovery ✨</strong></summary>
ToolDescription
mediawiki_find_similar_pagesFind pages with similar content based on term overlap
mediawiki_compare_topicCompare how a topic is described across multiple pages

find_similar_pages - Identifies related content that should be cross-linked or potential duplicates:

code
"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):

code
"Compare how 'timeout' is described across all pages"
→ Returns page mentions with context snippets and value mismatches
</details> <details> <summary><strong>History</strong></summary>
ToolDescription
mediawiki_get_revisionsPage edit history
mediawiki_compare_revisionsDiff between versions
mediawiki_get_user_contributionsUser's edit history
mediawiki_get_recent_changesRecent wiki activity with aggregation ✨

Aggregation ✨ - Use aggregate_by parameter to get compact summaries:

  • aggregate_by: "user" → Most active editors
  • aggregate_by: "page" → Most edited pages
  • aggregate_by: "type" → Change type distribution (edit, new, log)
</details> <details> <summary><strong>Quick Edit Tools</strong></summary>
ToolDescription
mediawiki_find_replaceFind and replace text
mediawiki_apply_formattingApply bold, italic, strikethrough
mediawiki_bulk_replaceReplace across multiple pages
mediawiki_search_in_pageSearch within a page
mediawiki_resolve_titleFuzzy title matching

Edit Response Info ✨ - All edit operations return revision tracking and undo instructions:

json
{
  "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"
  }
}
</details> <details> <summary><strong>Write Operations</strong></summary>
ToolDescription
mediawiki_edit_pageCreate or edit pages
mediawiki_upload_fileUpload files from URL ✨
mediawiki_move_pageMove (rename) pages with redirect ✨
mediawiki_manage_categoriesAdd/remove categories without full edit ✨

move_page ✨ — Rename pages properly (don't delete and recreate):

code
"Rename 'Old Guide' to 'Updated Guide'"
→ Moves page, creates redirect, optionally moves talk page

manage_categories ✨ — Quick category management:

code
"Add category 'API' and remove category 'Deprecated' from this page"
→ Modifies categories without touching page content
</details> <details> <summary><strong>File Search ✨</strong></summary>
ToolDescription
mediawiki_search_in_fileSearch 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)

</details> <details> <summary><strong>Markdown Conversion ✨</strong></summary>
ToolDescription
mediawiki_convert_markdownConvert 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 appearance
  • reverse_changelog - Reorder changelog entries newest-first
  • prettify_checks - Replace plain checkmarks (✓) with emoji (✅)

Example:

code
Input:  "# Hello\n**bold** and *italic*"
Output: "= Hello =\n'''bold''' and ''italic''"

Workflow for adding Markdown content to wiki:

  1. Convert: mediawiki_convert_markdown → get wikitext
  2. Save: mediawiki_edit_page → publish to wiki
</details>

Public 360° Wiki (Tieto)

New to this? Check out the Tieto Setup Guide for step-by-step instructions that assume no technical knowledge.

<details> <summary><strong>Quick setup for wiki.software-innovation.com</strong></summary>

Get Your Bot Password

  1. Go to Special:BotPasswords
  2. Log in with your Tieto account
  3. Create a bot named wiki-MCP
  4. Enable: Basic rights + Edit existing pages
  5. Save the generated password

Your username: your.email@tietoevry.com#wiki-MCP

Configuration

This wiki requires authentication for all operations (including reading).

Claude Code CLI:

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

json
{
  "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"
      }
    }
  }
}

Example Prompts

  • "Find all pages about eFormidling"
  • "What does the wiki say about AutoSaver?"
  • "Check for broken links on the API documentation"
</details>

Development

Build from Source

bash
git clone https://github.com/olgasafonova/mediawiki-mcp-server.git
cd mediawiki-mcp-server
go build -o mediawiki-mcp-server .

Requires Go 1.24+

Running Tests

bash
# Unit tests
make test

# With coverage
make test-cover

# Lint
make lint

Integration Tests

Integration tests run against a real MediaWiki instance:

bash
# 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 -v

Integration tests can also be triggered manually via GitHub Actions.

Project Structure

code
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

Like This Project?

If this server saved you time, consider giving it a ⭐ on GitHub. It helps others discover the project.


More MCP Servers

Check out my other MCP servers:

ServerDescriptionStars
gleif-mcp-serverAccess GLEIF LEI database. Look up company identities, verify legal entities.GitHub stars
miro-mcp-serverControl Miro whiteboards with AI. Boards, diagrams, mindmaps, and more.GitHub stars
nordic-registry-mcp-serverAccess Nordic business registries. Look up companies across Norway, Denmark, Finland, Sweden.GitHub stars
productplan-mcp-serverTalk to your ProductPlan roadmaps. Query OKRs, ideas, launches.GitHub stars
tilbudstrolden-mcpNordic grocery deal hunting. Find offers, plan meals, track spending.GitHub stars
mcp-servercard-goGo library for SEP-2127 Server Cards. Pre-connect discovery for MCP servers.GitHub stars

License

MIT License

Credits

常见问题

io.github.olgasafonova/mediawiki-mcp-server 是什么?

集成 MediaWiki 的 MCP server,提供 33+ 工具,支持搜索、阅读、编辑和链接分析。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.8k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.8k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.8k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.9k

评论