by lucamauri
Provides programmatic access to MediaWiki and WikiBase APIs, enabling fetching and editing of pages through MCP resources and tools.
Enables interaction with MediaWiki and WikiBase instances via the Model Context Protocol, exposing resources to retrieve page content and tools to edit pages programmatically.
git clone https://github.com/lucamauri/MediaWiki-MCP-adapter.git
cd MediaWiki-MCP-adapter
npm install
npm run build
server.configure({
mediaWikiAPIBase: "https://my.mediawiki.instance/api.php",
wikiBaseAPIBase: "https://my.wikibase.instance/api.php",
});
node build/index.js
const page = await server.callResource("getPageContent", { title: "Main Page" });
console.log(page.content);
const editResult = await server.callTool("editPage", {
title: "Main Page",
content: "Updated content",
summary: "Updated via MediaWiki Adapter"
});
console.log(editResult.success ? "Edit successful" : "Edit failed");
getPageContent
resource.editPage
tool.Q: Which Node.js version is required? A: Node.js v16 or later.
Q: Is there a test suite?
A: No tests are currently shipped; you can add them under the test
directory and run npm test
.
Q: How do I contribute? A: Fork the repository, create a feature/bug‑fix branch, and submit a pull request with a clear description.
Q: Can I use the default Wikipedia API?
A: Yes, the default MediaWiki API base is https://en.wikipedia.org/w/api.php
and the default WikiBase API base is https://www.wikidata.org/w/api.php
.
Q: What license governs the project? A: LGPL‑3.0‑or‑later.
A custom Model Context Protocol (MCP) adapter for interacting with MediaWiki and WikiBase APIs. This adapter allows you to fetch and edit MediaWiki pages programmatically using the MCP framework.
git clone https://github.com/yourusername/mediawikiadapter.git
cd mediawikiadapter
Install dependencies:
npm install
Build the project:
npm run build
You can configure the adapter to use custom MediaWiki and WikiBase API endpoints:
server.configure({
mediaWikiAPIBase: "https://my.mediawiki.instance/api.php",
wikiBaseAPIBase: "https://my.wikibase.instance/api.php",
});
Run the MCP server using the following command:
node build/index.js
Fetches the content of a MediaWiki page.
{
"title": "string"
}
{
"content": "string"
}
const response = await server.callResource("getPageContent", {
title: "Main Page",
});
console.log(response.content);
Edits a MediaWiki page with new content.
{
"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");
To run the project in development mode with TypeScript:
npm run dev
Run the linter to check for code quality:
npm run lint
Currently, no tests are implemented. You can add tests to the test
directory and run them using:
npm test
The adapter uses the following default API base URLs:
You can override these defaults using the server.configure()
method.
Contributions are welcome! Please follow these steps:
This project is licensed under the LGPL-3.0-or-later license. See the LICENSE file for details.
Created by Luca Mauri.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.