MediaWiki MCP Server
Enables LLM clients to interact with any MediaWiki wiki using the Model Context Protocol.
MediaWiki MCP Server
An MCP (Model Context Protocol) server that enables Large Language Model (LLM) clients to interact with any MediaWiki wiki.
Feature
Tools
| Name | Description | Permissions |
|---|---|---|
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-revision | Returns the standard revision object for a page. | - |
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 | Set the wiki 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 |
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
{
"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 |
|---|---|
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) |
Authentication setup
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.
Installation
To install MediaWiki MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ProfessionalWiki/mediawiki-mcp-server --client claude
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"
}
}
}
}
code --add-mcp '{"name":"mediawiki-mcp-server","command":"npx","args":["@professional-wiki/mediawiki-mcp-server@latest"]}'
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"
}
}
}
}
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"
}
}
}
}
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 runpart of the command withmake(e.g.make dev).
MCP Inspector
To start the development server and the MCP Inspector:
npm run dev
The command will build and start the MCP Proxy server locally at 6277 and the MCP Inspector client UI at http://localhost:6274.
Test with MCP clients
To enable your MCP client to use this MediaWiki MCP Server for local development:
-
Install the MCP server on your MCP client.
-
Change the
commandandargsvalues as shown in themcp.jsonfile (ormcp.docker.jsonif you prefer to run the MCP server in Docker). -
Run the watch command so that the source will be compiled whenever there is a change:
npm run watch
Release process
To release a new version:
# 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.jsonandpackage-lock.json - Syncs the version in
server.json(via the version script) - Creates a git commit
- Creates a git tag (e.g.,
v0.2.0)
git push origin master --follow-tags
- Go to the Releases page
- Click "Create a new release"
- Select the tag you just pushed (e.g.,
v0.2.0) - Add a title and release notes
- Click "Publish release"
The GitHub Actions workflow will automatically:
- Build and publish to NPM
- Publish to the MCP Registry
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 GPL 2.0 License. See the LICENSE file for details.
Related Servers
RefactorMCP
Automated refactoring tools for C# code transformation using Roslyn.
MCP VSCode Cline
A guide for using the Cline VSCode extension to interact with Model Context Protocol (MCP) servers.
Replicate Recraft V3
Generate high-quality images using the Recraft V3 model via the Replicate API.
Interactive Feedback MCP
An MCP server for AI-assisted development tools like Cursor and Claude, supporting interactive feedback workflows with AI.
Swift MCP Server - JavaScript Version
Answers Swift and SwiftUI questions based on the '100 Days of SwiftUI' course using a local SQLite database.
Terry-Form MCP
Execute Terraform commands locally in a secure, containerized environment. Features LSP integration for intelligent Terraform development.
PipeCD
Integrate with PipeCD to manage applications and deployments.
MCP Terminal Server
A secure command-line interface server for the Model Context Protocol (MCP) that allows AI models to interact with a user's terminal.
MCP Devkit
A persistent development partner that prevents context drift and maintains project memory across all development sessions.
SAP Documentation
Provides offline access to SAP documentation and real-time SAP Community content.