MediaWiki MCP adapter
@lucamauri
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.
Overview
What is MediaWiki MCP adapter?
A custom Model Context Protocol (MCP) adapter for interacting with MediaWiki and WikiBase APIs. It allows you to fetch and edit MediaWiki pages programmatically using the MCP framework.
How to use MediaWiki MCP adapter?
Clone the repository, run npm install and npm run build, then start the server with node build/index.js. Configure custom API endpoints using server.configure().
Key features of MediaWiki MCP adapter
- Fetch the content of a MediaWiki page.
- Edit a MediaWiki page with new content and optional summary.
- Configurable API base URLs for different MediaWiki and WikiBase instances.
Use cases of MediaWiki MCP adapter
- Retrieve page content from any MediaWiki instance via MCP.
- Automate editing of wiki pages (e.g., bots, content updates).
- Integrate MediaWiki/Wikidata actions into larger MCP-based workflows.
- Develop custom tools that read and write wiki content.
FAQ from MediaWiki MCP adapter
What are the system requirements?
Node.js v16 or later is required. TypeScript is needed for development. You also need a MediaWiki instance with API access enabled.
How do I configure a different MediaWiki or WikiBase endpoint?
Use the server.configure() method, passing mediaWikiAPIBase and/or wikiBaseAPIBase with the desired API URLs. Defaults are https://en.wikipedia.org/w/api.php and https://www.wikidata.org/w/api.php.
How do I run the server in development mode?
Run npm run dev to use TypeScript directly without a manual build step.
Are there any tests included?
No tests are implemented yet. You can add tests in the test directory and run them using npm test.
What license is MediaWiki MCP adapter under?
This project is licensed under the LGPL-3.0-or-later license.