MediaWiki MCP Server

MediaWiki MCP Server

Enables LLM clients to interact with any MediaWiki wiki, supporting page creation/editing, search, file uploads, category browsing, and page history retrieval. Supports multiple wikis with OAuth2 or bot password authentication for both public and private wikis.

Category
访问服务器

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. -
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. -
remove-wiki Removes a wiki resource. -
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.

<details><summary>Example list result</summary>

{
  "resources": [
    {
      "uri": "mcp://wikis/en.wikipedia.org",
      "name": "wikis/en.wikipedia.org",
      "title": "Wikipedia",
      "description": "Wiki \"Wikipedia\" hosted at https://en.wikipedia.org"
    }
  ]
}

</details>

<details><summary>Example read result</summary>

{
  "contents": [
    {
      "uri": "mcp://wikis/en.wikipedia.org",
      "mimeType": "application/json",
      "text": "{ \"sitename\":\"Wikipedia\",\"server\":\"https://en.wikipedia.org\",\"articlepath\":\"/wiki\",\"scriptpath\":\"/w\",\"private\":false }"
    }
  ]
}

</details>

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

  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

<details><summary><b>Install via Smithery</b></summary>

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

npx -y @smithery/cli install @ProfessionalWiki/mediawiki-mcp-server --client claude

</details>

<details> <summary><b>Install in Claude Desktop</b></summary>

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

</details>

<details><summary><b>Install in VS Code</b></summary>

Install in VS Code Install in VS Code Insiders

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

</details>

<details> <summary><b>Install in Cursor</b></summary>

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

</details>

<details> <summary><b>Install in Windsurf</b></summary>

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

</details>

<details> <summary><b>Install in Claude Code</b></summary>

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"
    }
  }
},

</details>

Development

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

MCP 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.

MCPJam Inspector

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:

<details> <summary><b>1. Use npm version to create a release</b></summary>

# 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) </details>

<details> <summary><b>2. Push to GitHub</b></summary>

git push origin master --follow-tags

The release GitHub workflow will trigger automatically:

  • Build a MCP bundle .mcpb and publish to GitHub
  • Build and publish to NPM
  • Publish to the MCP Registry </details>

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选