An MCP (Model Context Protocol) server that enables Large Language Model (LLM) clients to interact with any MediaWiki wiki.
| 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 |
mcp://wikis/{wikiKey}
- Credentials (e.g.,
token,username,password) are never exposed in resource content. - After
add-wiki/remove-wiki, the server sendsnotifications/resources/list_changedso 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 }"
}
]
}| 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 |
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.
{
"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
}
}
}| 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 |
| 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 |
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.
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 credentials in config.json still work but print a one-line warning to stderr on startup. Prefer ${VAR} or an exec source when possible.
For tools marked with 🔐, authentication is required.
Preferred method: OAuth2 Token
- Navigate to
Special:OAuthConsumerRegistration/propose/oauth2on your wiki - Select "This consumer is for use only by [YourUsername]"
- Grant the necessary permissions
- After approval, you'll receive:
- Client ID
- Client Secret
- Access Token
- Add the
tokento your wiki configuration inconfig.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.
Install via Smithery
To install MediaWiki MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ProfessionalWiki/mediawiki-mcp-server --client claudeInstall 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"
}
}
}
}