SM

shiquda/mediawiki-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

27 stars 8 forks 质量 53 趋势 11

支持一个MCP服务器,允许你在使用MediaWiki搜索和检索任何维基网站上的内容,同时支持使用 wikipedia.org、fandom.com、wiki.gg 等使用Mediawiki的大型语言模型🤖!

概览

已经过时了。请改用https://github.com/ProfessionalWiki/MediaWiki-MCP-Server! 一个MCP服务器,提供与维基百科API的无缝交互。该工具允许你用LLM 🤖搜索和检索维基百科内容! 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.)

概述(AI 翻译)

已经过时了。请改用https://github.com/ProfessionalWiki/MediaWiki-MCP-Server!

MediaWiki MCP 服务器 🚀

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

特色 ✨

用途 💻

  1. 确保你的设备上安装了紫外线。
  2. 在客户端中配置:

服务器默认使用 。此外,你还可以让服务器搜索其他维基网站!

要确认维基网站是否支持该服务器,请检查它是否使用MediaWiki软件(通常在网站底部有图标显示)。

要进一步检查并找到端点(通常是网站域名,比如),可以在浏览器里访问base-url/rest.php/v1/page(比如),看看输出是否正确。如果不合适,就在基础URL后加上’/w’,再试一次。

然后,将该端点设为 --base-url:

可用传输方式:stdio(默认)、streamable-http(http://localhost/mcp),和SSE([[T2])。所有选项请参见 -h。

示例JSON配置:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Outdated. Please use https://github.com/ProfessionalWiki/MediaWiki-MCP-Server instead!

MediaWiki MCP Server 🚀

A MCP server that provides seamless interaction with Wikipedia’s API. This tool allows you to search and retrieve Wikipedia content with LLMs 🤖!

Features ✨

Usage 💻

  1. Ensure that uv is installed on your device.
  2. Configure in your client:

The server defaults to using . Also, you can make the server search other wiki sites!

To see if a wiki site works with this server, check if it uses MediaWiki software (usually shown by an icon at the bottom of the site).

To check further and find the endpoint (usually the website’s domain, like ), check by going to base-url/rest.php/v1/page in a browser (like ) and see if the output looks right. If not, add ‘/w’ to the base URL and try again.

Then, set this endpoint as --base-url:

Available transports: stdio (default), streamable-http (http://localhost/mcp), and SSE (http://localhost/sse). See -h for all options.

uvx mediawiki-mcp-server --h
usage: main.py [-h] [--base-url BASE_URL] [--http] [--sse] [--port PORT]

MediaWiki MCP Server

options:
  -h, --help           show this help message and exit
  --base-url BASE_URL  Base URL for the MediaWiki API (default: https://en.wikipedia.org/w/``)
  --http               Run server as streamable-http (instead of stdio)
  --sse                Run server as sse-http (instead of stdio)
  --port PORT          Default port for http transport (default: 8000)

Example JSON configurations:

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

Or, if you want to run this server from source:

{
  "mcpServers": {
    "mediawiki-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "--directory", 
        "mediawiki-mcp-server",
        "path/to/project/src/mediawiki_mcp_server",
在 GitHub 查看完整 README

安装

uvx mediawiki-mcp-server --base-url https://example.com/
新手?先看 mcpskill.org 教程 →

配置

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