Skip to main content

A MCP server for MediaWiki

Project description

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 🤖!

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

Features ✨

  • 🔍 Search wiki pages with customizable wiki site. e.g. wikipedia.org, fandom.com, wiki.gg and more!
  • 📖 Retrieve detailed page content

Usage 💻

  1. Ensure that uv is installed on your device.
  2. Clone this repo and execute:
uv sync
  1. Configure in your client:

Command:

uv

Args:

The server defaults to using https://en.wikipedia.org/. 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 https://mediawiki.org/), check by going to base-url/rest.php/v1/page in a browser (like https://noita.wiki.gg/rest.php/v1/page) 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.

run
--directory
path/to/project/src/mediawiki_mcp_server
mediawiki-mcp-server
--base-url
https://example.com/

Envs:

HTTP_PROXY=http://host:port

Supported Tools 🛠

Search

async def search(query: str, limit: int = 5)
  • query: Search term (preferably short and focused)
  • limit: Maximum number of results to return (default: 5)

Get Page

async def get_page(title: str)
  • title: The exact title of the Wikipedia page to retrieve

Development 👨‍💻

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

Here's some document that might help:

Contributing 🤝

This server is under development. Contributions are welcome! Feel free to submit issues and pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mediawiki_mcp_server-0.0.1.tar.gz (76.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mediawiki_mcp_server-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file mediawiki_mcp_server-0.0.1.tar.gz.

File metadata

  • Download URL: mediawiki_mcp_server-0.0.1.tar.gz
  • Upload date:
  • Size: 76.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mediawiki_mcp_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 61156e6465dfa2df7d38b47597a317ed55d5ebdabe7f950ccb3bce21e86aaf58
MD5 58c07eeb244e65c39a6a1295c9c0d389
BLAKE2b-256 0caa09f62e89aa8ca7ed012c7816088de94808af2f9b308f802efa11b6e9e7df

See more details on using hashes here.

Provenance

The following attestation bundles were made for mediawiki_mcp_server-0.0.1.tar.gz:

Publisher: publish.yml on shiquda/mediawiki-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mediawiki_mcp_server-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mediawiki_mcp_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8febb0f51cb825f447e1e4e61c0452c958ada513f25c0b3559d5cde0e41b10
MD5 2667c3d4aa38c19809dd12837f9b28a3
BLAKE2b-256 e5201ac2a92a3d1dba8a924f2827ac21bfacbf4f5fb33cfd2f0c13becdc97c5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mediawiki_mcp_server-0.0.1-py3-none-any.whl:

Publisher: publish.yml on shiquda/mediawiki-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page