Skip to main content
Glama

MediaWiki MCP adapter

MediaWiki适配器

一个自定义的**模型上下文协议 (MCP)**适配器,用于与 MediaWiki 和 WikiBase API 交互。此适配器允许您使用 MCP 框架以编程方式获取和编辑 MediaWiki 页面。

特征

  • 获取 MediaWiki 页面的内容。
  • 使用新内容和可选摘要编辑 MediaWiki 页面。
  • 可为不同的 MediaWiki 和 WikiBase 实例配置 API 基本 URL。

要求

  • Node.js(v16 或更高版本)
  • TypeScript(用于开发)
  • 启用 API 访问的 MediaWiki 实例

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/mediawikiadapter.git cd mediawikiadapter
  1. 安装依赖项:
    npm install
  2. 构建项目:
    npm run build

用法

配置适配器

您可以配置适配器以使用自定义 MediaWiki 和 WikiBase API 端点:

server.configure({ mediaWikiAPIBase: "https://my.mediawiki.instance/api.php", wikiBaseAPIBase: "https://my.wikibase.instance/api.php", });

启动 MCP 服务器

使用以下命令运行 MCP 服务器:

node build/index.js

资源

获取页面内容

获取 MediaWiki 页面的内容。

  • 输入模式
{ "title": "string" }
  • 输出模式
    { "content": "string" }
示例用法:
const response = await server.callResource("getPageContent", { title: "Main Page", }); console.log(response.content);

工具

编辑页面

使用新内容编辑 MediaWiki 页面。

  • 输入模式
{ "title": "string", "content": "string", "summary": "string (optional)" }
  • 输出模式
{ "success": "boolean" }
示例用法:
const response = await server.callTool("editPage", { title: "Main Page", content: "Updated content for the page.", summary: "Updated via MediaWikiAdapter", }); console.log(response.success ? "Edit successful" : "Edit failed");

发展

以开发模式运行

要使用 TypeScript 以开发模式运行项目:

npm run dev

代码检查

运行 linter 来检查代码质量:

npm run lint

测试

目前尚未实现任何测试。您可以将测试添加到test目录并使用以下命令运行它们:

npm test

配置

适配器使用以下默认 API 基本 URL:

您可以使用server.configure()方法覆盖这些默认值。


贡献

欢迎贡献!请按以下步骤操作:

  1. 分叉存储库。
  2. 为您的功能或错误修复创建一个新的分支。
  3. 提交拉取请求并附上更改的详细描述。

执照

本项目采用LGPL-3.0 或更高版本许可证。详情请参阅许可证文件。


作者

Luca Mauri创作。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

适用于 MediaWiki 和 WikiBase API 的自定义模型上下文协议适配器

  1. 特征
    1. 要求
      1. 安装
        1. 用法
          1. 配置适配器
          2. 启动 MCP 服务器
          3. 资源
          4. 工具
        2. 发展
          1. 以开发模式运行
          2. 代码检查
          3. 测试
        3. 配置
          1. 贡献
            1. 执照
              1. 作者

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that retrieves information from Wikipedia to provide context to LLMs, allowing users to search articles, get summaries, full content, sections, and links from Wikipedia.
                  Last updated -
                  31
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server for accessing Confluence API using Personal Access Tokens, enabling users to retrieve space lists, view pages, create new pages, and update existing content.
                  Last updated -
                  TypeScript
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server implementation for interacting with Wikidata API using the Model Context Protocol, providing tools for searching identifiers, extracting metadata, and executing SPARQL queries.
                  Last updated -
                  5
                  8
                  Python
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that enables searching, reading, and editing wiki pages on Wizzypedia from MCP-enabled tools like Cursor or Claude Desktop.
                  Last updated -
                  6
                  JavaScript
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucamauri/MediaWiki-MCP-adapter'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server