M

MediaWiki MCP服务

@shiquda/mediawiki-mcp-server
0 Stars 38 次浏览 shiquda 更新于 2026-08-23

一个MCP服务器,允许您使用大型语言模型(LLMs)在任何使用MediaWiki的维基站点上搜索和检索内容。支持wikipedia.org、fandom.com、wiki.gg等使用MediaWiki的更多站点!

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "args": [
        "run",
        "--directory",
        "mediawiki-mcp-server",
        "path/to/project/src/mediawiki_mcp_server",
        "--base-url",
        "https://example.com/"
      ],
      "command": "uv",
      "env": {
        "HTTP_PROXY": "http://example.com:port"
      }
    }
  }
}

该服务需要配置环境变量:HTTP_PROXY

可用工具 (2 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

search 2 个参数 需填 1 项

Search for a wiki page. The shorter the request, the better, preferably containing only the main term to be searched. Args: query: The query to search for limit: The number of results to return Returns: A list of pages that match the query

必填参数:query

get_page 1 个参数 需填 1 项

Get a page from mediawiki.org Args: title: The title of the page to get, which can be found in title field of the search results Returns: The page content

必填参数:title

服务介绍

MediaWiki MCP Server 🚀

smithery badge

这是一个提供与维基百科 API 无缝交互的MCP服务器。该工具允许您使用LLMs 🤖搜索和检索维基百科内容!

https://github.com/user-attachments/assets/b5d9c5f3-a60e-48ea-8b4b-f1a7524d4fbb

特性 ✨

  • 🔍 使用可自定义的维基站点搜索维基页面,例如:wikipedia.org, fandom.com, wiki.gg 等!
  • 📖 检索详细的页面内容

使用 💻

  1. 确保您的设备上已安装 uv。

  2. 在客户端中进行配置:

    服务器默认使用 https://en.wikipedia.org/。同时,您也可以让服务器搜索其他维基站点!

要检查一个维基站点是否与本服务器兼容,请查看该站点是否使用了MediaWiki软件(通常在网站底部会有相应的图标显示)。

要进一步检查并找到端点(通常是网站的域名,如 https://mediawiki.org/),请尝试在浏览器中访问 base-url/rest.php/v1/page (比如 https://noita.wiki.gg/rest.php/v1/page)看看输出是否正确。如果不正确,可以在基本URL后加上 '/w' 再试一次。

然后,将此端点设置为 --base-url。

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "uvx",
      "args": [
        "mediawiki-mcp-server",
        "--base-url", "https://example.com/"
      ],
      "env": {
        "HTTP_PROXY": "http://example.com:port"
      }
    }
  }
}

或者,如果您想从源代码运行这个服务器:

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "--directory", 
        "mediawiki-mcp-server",
        "path/to/project/src/mediawiki_mcp_server",
        "--base-url", "https://example.com/"
      ],
      "env": {
        "HTTP_PROXY": "http://example.com:port"
      }
    }
  }
}

支持的工具 🛠

搜索

  • query: 搜索词(最好是简短且具体的)
  • limit: 返回的最大结果数(默认:5)

获取页面

  • title: 要检索的维基百科页面的确切标题

开发 👨‍💻

npx @modelcontextprotocol/inspector uv run mediawiki-mcp-server

以下是一些可能有帮助的文档:

贡献 🤝

此服务器正在开发中。欢迎贡献!您可以自由提交问题和拉取请求。

相关项目 ♥️

  • Cherry Studio: 一款支持多个LLM提供商的桌面客户端。支持MCP。