freshcrate
Home > MCP Servers > MediaWiki-MCP-Server

MediaWiki-MCP-Server

Model Context Protocol (MCP) Server to connect your AI with any MediaWiki

Description

Model Context Protocol (MCP) Server to connect your AI with any MediaWiki

README

MediaWiki MCP Server

NPM Version smithery badge MIT licensed

An MCP (Model Context Protocol) server that enables Large Language Model (LLM) clients to interact with any MediaWiki wiki.

Feature

Tools

Name Description Permissions
add-wiki Adds a new wiki as an MCP resource from a URL. Disabled when allowWikiManagement is false. -
compare-pages Diff two versions of a wiki page by revision, title, or supplied wikitext. -
create-page 🔐 Create a new wiki page. Create, edit, and move pages
delete-page 🔐 Delete a wiki page. Delete pages, revisions, and log entries
get-category-members Gets all members in the category -
get-file Returns the standard file object for a file page. -
get-page Returns the standard page object for a wiki page. -
get-page-history Returns information about the latest revisions to a wiki page. -
get-pages Returns multiple wiki pages in one call (up to 50). -
get-revision Returns the standard revision object for a page. -
parse-wikitext Renders wikitext and returns the HTML, parse warnings, wikilinks, templates, and external URLs without saving a page. -
remove-wiki Removes a wiki resource. Disabled when allowWikiManagement is false. -
search-page Search wiki page titles and contents for the provided search terms. -
search-page-by-prefix Perform a prefix search for page titles. -
set-wiki Sets the wiki resource to use for the current session. -
undelete-page 🔐 Undelete a wiki page. Delete pages, revisions, and log entries
update-page 🔐 Update an existing wiki page. Edit existing pages
upload-file 🔐 Uploads a file to the wiki from the local disk. Upload new files
upload-file-from-url 🔐 Uploads a file to the wiki from a web URL. Upload, replace, and move files

Resources

mcp://wikis/{wikiKey}

  • Credentials (e.g., token, username, password) are never exposed in resource content.
  • After add-wiki/remove-wiki, the server sends notifications/resources/list_changed so clients refresh.
Example list result
{
  "resources": [
    {
      "uri": "mcp://wikis/en.wikipedia.org",
      "name": "wikis/en.wikipedia.org",
      "title": "Wikipedia",
      "description": "Wiki \"Wikipedia\" hosted at https://en.wikipedia.org"
    }
  ]
}
Example read result
{
  "contents": [
    {
      "uri": "mcp://wikis/en.wikipedia.org",
      "mimeType": "application/json",
      "text": "{ \"sitename\":\"Wikipedia\",\"server\":\"https://en.wikipedia.org\",\"articlepath\":\"/wiki\",\"scriptpath\":\"/w\",\"private\":false }"
    }
  ]
}

Environment variables

Name Description Default
CONFIG Path to your configuration file config.json
MCP_TRANSPORT Type of MCP server transport (stdio or http) stdio
PORT Port used for StreamableHTTP transport 3000

Configuration

Note: Config is only required when interacting with a private wiki or using authenticated tools.

Create a config.json file to configure wiki connections. Use the config.example.json as a starting point.

Basic structure

{
  "allowWikiManagement": true,
  "defaultWiki": "en.wikipedia.org",
  "wikis": {
    "en.wikipedia.org": {
      "sitename": "Wikipedia",
      "server": "https://en.wikipedia.org",
      "articlepath": "/wiki",
      "scriptpath": "/w",
      "token": null,
      "username": null,
      "password": null,
      "private": false
    }
  }
}

Configuration fields

Field Description
allowWikiManagement Enables the add-wiki and remove-wiki tools. Set to false to freeze the list of configured wikis. Default: true
defaultWiki The default wiki identifier to use (matches a key in wikis)
wikis Object containing wiki configurations, keyed by domain/identifier

Wiki configuration fields

Field Required Description
sitename Yes Display name for the wiki
server Yes Base URL of the wiki (e.g., https://en.wikipedia.org)
articlepath Yes Path pattern for articles (typically /wiki)
scriptpath Yes Path to MediaWiki scripts (typically /w)
token No OAuth2 access token for authenticated operations (preferred)
username No Bot username (fallback when OAuth2 is not available)
password No Bot password (fallback when OAuth2 is not available)
private No Whether the wiki requires authentication to read (default: false)
tags No Change tag(s) applied to every write. The tag must be created and activated on the wiki at Special:Tags before use; MediaWiki returns a badtags error otherwise. Accepts a string or array of strings

Environment variable substitution

Config values support ${VAR_NAME} syntax for referencing environment variables. This allows you to keep secrets out of your config.json file.

{
  "defaultWiki": "my.wiki.org",
  "wikis": {
    "my.wiki.org": {
      "sitename": "My Wiki",
      "server": "https://my.wiki.org",
      "articlepath": "/wiki",
      "scriptpath": "/w",
      "token": "${WIKI_OAUTH_TOKEN}",
      "username": "${WIKI_USERNAME}",
      "password": "${WIKI_PASSWORD}"
    }
  }
}

If a referenced variable is not set:

  • Secret fields (token, username, password): the server exits at startup with an error naming the wiki, the field, and the missing variable. This surfaces authentication problems up front instead of as confusing failures later.
  • Non-secret fields: the ${VAR_NAME} text is kept as-is.

Secret sources

As an alternative to ${VAR_NAME}, secret fields can run an external command at startup and use its output as the secret. This lets you fetch credentials from a password manager, keyring, or secret store without writing them to disk:

{
  "defaultWiki": "my.wiki.org",
  "wikis": {
    "my.wiki.org": {
      "sitename": "My Wiki",
      "server": "https://my.wiki.org",
      "articlepath": "/wiki",
      "scriptpath": "/w",
      "token": {
        "exec": {
          "command": "op",
          "args": ["read", "op://Private/my-wiki/oauth-token"]
        }
      }
    }
  }
}

The command runs directly without a shell, with args passed exactly as given. Its trimmed stdout becomes the secret value. A 10-second timeout applies.

If the command fails, times out, or prints nothing, the server exits at startup. Error messages identify the failing wiki and field — the secret value itself is never logged.

Any CLI that prints a credential to stdout works: 1Password's op, pass, secret-tool, Bitwarden's bw, HashiCorp Vault, or a custom script.

Plaintext secrets

Plaintext credentials in config.json still work but print a one-line warning to stderr on startup. Prefer ${VAR} or an exec source when possible.

Authentication setup

For tools marked with 🔐, authentication is required.

Preferred method: OAuth2 Token

  1. Navigate to Special:OAuthConsumerRegistration/propose/oauth2 on your wiki
  2. Select "This consumer is for use only by [YourUsername]"
  3. Grant the necessary permissions
  4. After approval, you'll receive:
    • Client ID
    • Client Secret
    • Access Token
  5. Add the token to your wiki configuration in config.json

Note: OAuth2 requires the OAuth extension to be installed on the wiki.

Fallback method: Username & Password

If OAuth2 is not available on your wiki, you can use bot credentials (from Special:BotPasswords ) instead of the OAuth2 token.

Installation

Install via Smithery

To install MediaWiki MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @ProfessionalWiki/mediawiki-mcp-server --client claude
Install in Claude Desktop

Follow the guide, use following configuration:

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "npx",
      "args": [
        "@professional-wiki/mediawiki-mcp-server@latest"
      ],
      "env": {
        "CONFIG": "path/to/config.json"
      }
    }
  }
}
Install in VS Code

Install in VS CodeInstall in VS Code Insiders

code --add-mcp '{"name":"mediawiki-mcp-server","command":"npx","args":["@professional-wiki/mediawiki-mcp-server@latest"]}'
Install in Cursor

Install in Cursor

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @professional-wiki/mediawiki-mcp-server. You can also verify config or add command like arguments via clicking Edit.

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "npx",
      "args": [
        "@professional-wiki/mediawiki-mcp-server@latest"
      ],
      "env": {
        "CONFIG": "path/to/config.json"
      }
    }
  }
}
Install in Windsurf

Follow the guide, use following configuration:

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "npx",
      "args": [
        "@professional-wiki/mediawiki-mcp-server@latest"
      ],
      "env": {
        "CONFIG": "path/to/config.json"
      }
    }
  }
}
Install in Claude Code

Follow the Claude Code MCP docs.

Run the below command, optionally with -e flags to specify environment variables.

claude mcp add mediawiki-mcp-server npx @professional-wiki/mediawiki-mcp-server@latest

You should end up with something like the below in your .claude.json config:

"mcpServers": {
  "mediawiki-mcp-server": {
    "type": "stdio",
    "command": "npx",
    "args": [
      "@professional-wiki/mediawiki-mcp-server@latest"
    ],
    "env": {
      "CONFIG": "path/to/config.json"
    }
  }
},

Development

🐋 Develop with Docker: Replace the npm run part of the command with make (e.g. make inspector).

Test and debug the MCP server without a MCP client and LLM.

To start the development server and the MCP Inspector together:

npm run inspector

The command will build and start the MCP Proxy server locally at 6277 and the MCP Inspector client UI at http://localhost:6274.

Test and debug the MCP server, with a built-in MCP client and support for different LLMs.

To start the development server and the MCP Inspector together:

npm run mcpjam

Test with MCP clients

To enable your MCP client to use this MediaWiki MCP Server for local development:

  1. Install the MCP server on your MCP client.

  2. Change the command and args values as shown in the mcp.json file (or mcp.docker.json if you prefer to run the MCP server in Docker).

  3. Run the dev command so that the source will be compiled whenever there is a change:

    npm run dev

Release process

To release a new version:

1. Use npm version to create a release
# For patch release (0.1.1 → 0.1.2)
npm version patch

# For minor release (0.1.1 → 0.2.0)
npm version minor

# For major release (0.1.1 → 1.0.0)
npm version major

# Or specify exact version
npm version 0.2.0

This command automatically:

  • Updates package.json and package-lock.json
  • Syncs the version in server.json, mcpb/manifest.json, Dockerfile (via the version script)
  • Creates a git commit
  • Creates a git tag (e.g., v0.2.0)
2. Push to GitHub
git push origin master --follow-tags

The release GitHub workflow will trigger automatically:

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for bugs, feature requests, or suggestions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Release History

VersionChangesUrgencyDate
v0.6.5## What's Changed * Enhance release flow by adding preversion checks by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/184 * Streamline CI and bundle workflows by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/185 * Improve naming of CI steps by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/187 * Bump @modelcontextprotocol/sdk from 1.25.1 to 1.25.2 by @dependabot[bot] in https://github.com/ProfessionLow1/8/2026
v0.6.4**Full Changelog**: https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/compare/v0.6.3...v0.6.4Low1/5/2026
v0.6.3**Full Changelog**: https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/compare/v0.6.2...v0.6.3Low1/5/2026
v0.6.0## What's Changed * Use resource for public wiki config and break down set-wiki tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/136 * Improve Docker image and Docker make commands by @alistair3149 and @JeroenDeDauw in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/147 * Add security policy by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/149 * Clean up existing development commands by @alistair3149 in httpLow11/17/2025
v0.5.0## What's Changed * Add `search-page-by-prefix` tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/135 * Update license from GPL-2.0 to MIT by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/146 * Improve tool parameter validations and definitions by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/137 * Add metadata instructions for get-page tool by @alistair3149 in https://github.com/ProfessionLow11/15/2025
v0.4.0## What's Changed * Add get-category-members tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/126 * Refactor get-page and get-revision tool parameters by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/127 **Full Changelog**: https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/compare/v0.3.0...v0.4.0Low10/30/2025
v0.3.0## What's Changed * Support authentication via CSRF token by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/112 * Add get-revision tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/117 * Add undelete-page tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/124 * Add delete-page tool by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/116 * Allow get-page to rLow10/27/2025
v0.2.1Version bump for publishing to MCP registry **Full Changelog**: https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/compare/v0.2.0...v0.2.1Low10/23/2025
v0.2.0## What's Changed * Rename `getConfig` to `getCurrentWikiConfig` for clarity by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/61 * Add setting for private wikis by @AJDurant in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/72 * Add private key to example config by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/73 * Include tools and MCP in edit comment by @alistair3149 in https://github.com/ProfessionalWiki/MediLow10/23/2025
v0.1.1## What's Changed * Support multi-wiki local config by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/22 * Add installation badges for VS Code, VS Code Insiders, and Cursor in … by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/54 * Revert to use Studio for Smithery by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/55 * Update entry point to use environment variable instead by @alistair3149 in htLow6/23/2025
v0.0.5## What's Changed * Add installation instructions for Claude Desktop, VS Coded, Cursor, a… by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/48 * Deployment: Dockerfile and Smithery config by @smithery-ai in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/50 * Add StreamableHTTP transport and prep for Smithery by @alistair3149 in https://github.com/ProfessionalWiki/MediaWiki-MCP-Server/pull/49 * Use StreamableHTTP for Smithery by @alistair3149 inLow6/7/2025
v0.0.4Initial releaseLow6/3/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

notebooklm-mcpMCP server for Google NotebookLM — 32 tools for notebooks, sources, research, and studio content generationv0.2.3
studioOpen-source control plane for your AI agents. Connect tools, hire agents, track every token and dollarv2.268.2
spaceship-mcp🚀 Manage domains, DNS, contacts, and listings with spaceship-mcp, a community-built MCP server for the Spaceship API.main@2026-04-21
apify-mcp-serverThe Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automav0.9.19
@baseplate-dev/plugin-aiAI agent integration plugin for Baseplate — generates AGENTS.md, CLAUDE.md, .mcp.json, and .agents/ configuration files0.6.8