@professional-wiki/mediawiki-mcp-server
Model Context Protocol (MCP) server for MediaWiki
Versions
@professional-wiki/mediawiki-mcp-server0.16.0latest0.15.00.14.00.13.10.13.0+ show 23 moreshow less
0.12.00.11.00.10.00.9.10.9.00.8.00.7.00.6.50.6.40.6.30.6.20.6.10.6.00.5.00.4.00.3.00.2.10.2.00.1.10.0.50.0.40.0.20.0.1mediawiki-mcp-server-olioex0.7.0latestTools 53
foo d
bar d
qux d
ping test tool
whoami Returns the identity the current session is authenticated as on the targeted wiki: the username, whether the session is anonymous (no user is logged in), and the user groups it belongs to. Set includeRights to also return the full list of user rights. Use to confirm who edits and uploads will be attributed to before writing — for example, to resolve your own username before building a title under your own user namespace (User:<username>/…). Reports anonymous access rather than failing when the session has no credentials. For which wikis have stored OAuth tokens and their scopes, use oauth-status instead.
search-page-by-prefix Returns wiki page titles beginning with a given prefix (suited to autocomplete and title lookup). Only titles are returned — no snippets, sizes, or IDs. Accepts up to 500 titles per call (default 10); additional matches beyond the cap are flagged in the response. For full-text content search, use search-page.
upload-file-from-url Fetches a file from a remote web URL and uploads it into the wiki's File namespace, returning the resulting file title and URL. The upload appears in the wiki's upload log. Works whether or not the wiki has upload-by-URL enabled: the server retrieves the file and uploads it directly, falling back to wiki-side fetching only when it cannot reach the URL itself. Fails if a file with the target title already exists. To replace an existing file with a new revision, use update-file-from-url.
compare-pages Returns the changes between two versions of a wiki page as a compact text diff. Each side accepts a revision ID, page title (latest revision), or supplied wikitext; text-vs-text is rejected. Only the changes are returned over the wire. For the full text of both sides, fetch with get-page instead. If a title or revision ID does not exist, an error is returned. Set includeDiff=false for a cheap change-detection response that skips diff rendering and returns just the change flag, revision metadata, and size delta. Diff output is truncated at 75000 bytes by default, with a marker reporting how much of it was returned; a narrower revision range or includeDiff=false avoids truncation.
get-site-info Returns key facts about the targeted wiki from its MediaWiki siteinfo: general settings (sitename, MediaWiki version, content language, page-title case-sensitivity, live read-only state, and maxarticlesize in bytes), the namespace map with localized names and aliases, the list of installed extension names, and the content license. Set includeStatistics to also return page, article, edit, image, user, active-user, and admin counts.
undelete-page Restores a previously deleted wiki page, including its full revision history, and returns the restored title. The page must currently be in a deleted state (from delete-page); fails if no deleted revisions exist for the title or the authenticated user lacks the undelete permission.
get-recent-changes Returns recent change events, newest first, in segments of 50. Defaults to edits and page creations; set types to include log actions, categorizations, or external changes. Each row includes title, timestamp, user, revision IDs, size change, flags (minor/bot/new/anon), tags, and change type. Filter by timestamp window, namespaces, user, change tag, or hide flags (hideBots/hideMinor/hideAnon/hideRedirects/hidePatrolled). Pass showPatrolStatus to include per-row patrol state (requires patrol rights). Paginate with the continue token from the truncation marker. For a single page's revision history, use get-page-history. Boolean flags appear only when true; rows report the size delta, not raw old/new lengths.
add-wiki Registers a new wiki as an MCP resource by fetching its sitename and API configuration from any URL on the wiki (e.g. a page URL). The wiki becomes available at mcp://wikis/<servername> and can be targeted by passing its key as the `wiki` argument to any wiki tool. Fails if the URL is not a MediaWiki wiki or if a wiki with the same key is already registered.
move-page Renames a wiki page, moving it — and by default its talk page — to a new title, and returns the old and new titles plus whether a redirect was left behind. By default leaves a redirect at the old title; set leaveRedirect=false to suppress it (requires the suppressredirect right, otherwise the redirect is left regardless). Fails if the source page does not exist, if the target title already exists (unless it is a redirect and ignoreWarnings is set), or if the authenticated user lacks the move permission. Moving a File page additionally requires the file-move permission.
remove-wiki Removes a wiki from the MCP resources. Clears any cached credentials and license metadata for the wiki. Fails if the specified wiki is the configured default wiki.
delete-page Removes a wiki page from public view and returns the deleted title. This is a soft delete: the page and its revision history remain in the database and can be restored with undelete-page until an administrator purges them. Fails if the page does not exist or the authenticated user lacks the delete permission.
update-file Uploads a new revision of an existing file from the local disk, preserving prior revisions in the file history, and returns the file title and URL. The upload appears in the wiki's upload log. Replaces the file content (bytes) only; for editing the wikitext on a file's description page, use update-page. The operator restricts which directories are readable; filepath must be an absolute path inside a configured upload directory, or the call fails before contacting the wiki. Fails if no file exists at the target title; for the initial upload, use upload-file. To upload a new revision from a remote web address instead of a local path, use update-file-from-url.
get-revision Returns a specific historical revision of a wiki page by revision ID (wikitext source, rendered HTML, or metadata only). If the revision ID does not exist, an error is returned. Content is truncated at 75000 bytes by default; a past revision has no narrower read, so for a large one use compare-pages to see what changed. For the latest revision plus metadata, use get-page with metadata=true.
create-page Creates a new wiki page with the provided content and returns the new page's title, page ID, and first revision ID. Fails if a page with the given title already exists; for existing pages, use update-page. The optional contentModel parameter selects a non-default content format (e.g. javascript, css); when omitted, MediaWiki picks the default for the title's namespace. For building up a large page across multiple calls, pair create-page with chained update-page(operation='append') calls, each adding a chunk.
oauth-logout Removes stored OAuth tokens. With no argument, removes all stored tokens; with `wiki`, removes only that wiki. Stdio only.
parse-wikitext Renders wikitext through the live wiki without saving. Returns HTML, parse warnings, categories, wikilinks, templates, external URLs, and display title. Suited to dry-running a planned edit before create-page or update-page, or previewing standalone wikitext (template combinations, sanitizer checks) with no target page. HTML output is truncated at 75000 bytes by default, with a marker reporting how much of it was returned; a smaller wikitext fragment in a follow-up call returns the rest.
get-category-members Lists members of a category, returning each member's page ID, namespace ID, and wiki page title. Optionally filter by member type (page, file, subcat) or by namespace ID — filters apply server-side before the cap. Returns up to 500 members per call; paginate with continueFrom (opaque cursor echoed from the previous response). A member's type is omitted when it is an ordinary page (present only for files and subcategories).
update-page Writes to an existing wiki page and returns the new revision ID. Fails if the page does not exist; for new pages, use create-page. operation says what the write does and section says where: omit section to act on the whole page, or set it to confine the write to one section. For changing part of a page, use operation='find-replace', which carries only the text being rewritten, so nothing outside find can be lost and the rest of the page never has to travel to or from the caller; a find that matches nothing, or more than one place, is refused without writing, which also makes it safe to resend a call whose result never arrived. For replacing a target outright, use operation='replace', whose source must carry every byte meant to survive; it is refused when source would shorten a target too large for one read to return whole, since the rest was never seen. With section set it also takes out every subsection nested under that section, is refused when source would drop them, and needs latestId to say which revision the section number was read from. operation='append' and 'prepend' add a delta: a new section at the end of the page is an append whose source begins with the heading, and with section set a prepend inserts one immediately above that section. Pass latestId (reported as latestRevisionId by any get-page read that returns wikitext) for edit-conflict detection: the write is rejected rather than silently clobbering a concurrent change. Each call is a separate revision, and resending an append or prepend whose result never arrived adds the delta a second time.
get-file-data Fetches a wiki file server-side and returns the image inline as a content block, for clients that cannot reach the wiki host (sandboxed or network-restricted) and need the image sent to the model for visual analysis. Returns a scaled rendition sized by width. Files MediaWiki can rasterize (images, SVG, PDF, DjVu) come back as an image; other types (audio, video, arbitrary binaries) error — for those, and for metadata or a download URL, use get-file.
get-pages Returns multiple wiki pages in one call (wikitext source or metadata only). Suited to reading a cluster of related pages, diffing a page family, or syncing pages to local storage. Accepts up to ${MAX_TITLES} titles; missing pages are reported inline (not as errors). One byte budget covers the whole response, 75000 bytes by default: pages come back whole in the order asked for until it is spent, and the pages past that point are named rather than returned, so a follow-up call for those names fetches the rest. Only a first page larger than the budget on its own is truncated, with a marker reporting how much of it was returned and which sections a narrower read can target. For a single page or HTML output, use get-page. requestedTitle is included only when it differs from the resolved title.
get-page Returns a single wiki page (wikitext source, rendered HTML, or metadata only). If the title does not exist, an error is returned. Use metadata=true to retrieve the revision ID (for edit-conflict detection), page size, and section outline. Set content="none" to fetch only metadata. Large content is truncated at 75000 bytes by default, with a marker reporting how much of it was returned and which sections a narrower read can target; a follow-up call with section=N fetches a specific section. For more than one page at a time, use get-pages. For a specific historical revision, use get-revision.
get-links-here Lists pages that reference a target wiki page, returning each referencing page's title, page ID, namespace ID, and whether it is a redirect. The type parameter selects the relationship — wikilinks (pages that link to the target), transclusions (pages that embed it, such as a template), or fileusage (pages that display it, for File pages) — one relationship per call. With expandRedirects, a referencing redirect also yields the pages that link through it (wikilinks and fileusage only), each tagged with the via redirect. Filter by namespace ID or by redirect status. For members of a category, use get-category-members; for full-text content search, use search-page. Returns up to 500 per call; paginate with continueFrom. The redirect flag appears only when the referencing page is a redirect.
update-file-from-url Fetches a file from a remote web URL and uploads it as a new revision of an existing file, preserving prior revisions in the file history, and returns the file title and URL. The upload appears in the wiki's upload log. Replaces the file content (bytes) only; for editing the wikitext on a file's description page, use update-page. Works whether or not the wiki has upload-by-URL enabled: the server retrieves the file and uploads it directly, falling back to wiki-side fetching only when it cannot reach the URL itself. Fails if no file exists at the target title; for the initial upload, use upload-file-from-url.
upload-file Uploads a file from the local disk into the wiki's File namespace and returns the resulting file title and URL. The upload appears in the wiki's upload log. The operator restricts which directories are readable; filepath must be an absolute path inside a configured upload directory, or the call fails before contacting the wiki. Fails if a file with the target title already exists (the wiki does not silently overwrite existing files). To upload directly from a remote web address instead of a local path, use upload-file-from-url. To replace an existing file with a new revision, use update-file.
get-file Returns metadata for a file (uploader, timestamp, size, MIME type) along with download URLs for the thumbnail, preview, and original. The File: prefix is added automatically if omitted.
get-page-history Returns revision metadata (revision ID, timestamp, user, comment, size, minor flag) for a wiki page, in segments of ${PAGE_HISTORY_LIMIT} revisions, newest first. Paginate with olderThan or newerThan (mutually exclusive). If the title does not exist, an error is returned. Boolean flags appear only when true.
search-page Searches wiki page titles and page content (full-text) for the provided terms. Returns matching pages with a snippet, size, timestamp, and the namespace the match came from. Covers the namespaces the wiki counts as content unless namespaces names the namespace IDs to search; get-site-info lists a wiki's namespaces and flags which of them hold content. Accepts up to 100 matches per call (default 10); additional matches beyond the cap are flagged in the response — narrow the query to surface more. For title-prefix lookup (e.g. autocomplete), use search-page-by-prefix.
wikibase-search-entities Finds Wikibase items and properties by label or alias on the targeted wiki, returning one `id — label — description` line per match. Enabled only when the wiki is a Wikibase repository.\n\nEntity IDs are wiki-specific: the same concept has different Q-ids on Wikidata and on a private Wikibase, so IDs are discovered here rather than recalled. Properties carry their datatype in brackets, which tells wikibase-add-statement what a value for them looks like.\n\nMatching is prefix-and-alias based, not full-text: it finds entities whose name starts with the terms, not entities that mention them. To read an entity's statements, use wikibase-get-entity; to select entities by their statements, use wikibase-query.
wikibase-get-entity Returns one Wikibase item, property or lexeme as compact text: its label, description and aliases, then its statements, one line per property in the form \
wikibase-edit-entity Creates or changes a Wikibase entity from a JSON description of the change, and returns the entity ID and new revision ID. Enabled only when the wiki is a Wikibase repository. Omit entityId to create a new item or property, or name an item, property or lexeme to edit it. Requires the edit right.\n\ndata is merged into the entity: terms and statements it does not mention are left alone, and a term given for a language replaces that language\'s term. clear=true empties the entity first, so anything absent from data is deleted.\n\nExample data, setting an English label and adding one statement:\n{"labels":{"en":{"language":"en","value":"Berlin"}},"claims":[{"mainsnak":{"snaktype":"value","property":"P31","datavalue":{"type":"wikibase-entityid","value":{"entity-type":"item","id":"Q515"}}},"type":"statement","rank":"normal"}]}\n\nCreating a property requires datatype in data, which is fixed once the property exists, and sitelinks apply to items only. A lexeme names its terms lemmas rather than labels, so its data uses that key. A statement\'s datavalue shape follows its property\'s datatype (read it with wikibase-get-entity on the property). For a single statement with an item, string, external-id or url value, wikibase-add-statement builds the JSON instead.
wikibase-add-statement Adds one statement to a Wikibase item, property or lexeme and returns the new statement ID. Enabled only when the wiki is a Wikibase repository. Requires the edit right.\n\nThe value is given as text and interpreted by the property's datatype, which is read from the wiki first: an item ID such as Q515 for a wikibase-item property, and the literal text for a string, external-id or url property. A property of any other datatype is rejected, naming it; those statements go through wikibase-edit-entity, which takes the full statement JSON and also writes qualifiers, references and several statements at once.\n\nExisting statements are left in place, so calling twice with the same value leaves the entity holding it twice.
wikibase-query Runs a SPARQL query against the targeted wiki's query service and returns the solutions as rows, one line per solution with the cells joined by \
cargo-describe-table Returns the field schema for a Cargo table on the targeted wiki: each field's name, type (String/Integer/Boolean/Date/Page/Coordinates/etc.), and — for list-typed fields — its delimiter. Enabled only when the wiki has Cargo installed. Use before constructing a cargo-query so the where clause uses the right operators (HOLDS / HOLDS LIKE for list fields, MATCHES for Searchtext, NEAR for Coordinates). Use cargo-list-tables to discover table names.
cargo-list-tables Returns the names of all Cargo tables defined on the targeted wiki, including Cargo's built-in system tables (underscore-prefixed: `_pageData`, `_fileData`, etc.). Enabled only when the wiki has Cargo installed. Use cargo-describe-table to inspect a table's fields and types before constructing a cargo-query.
cargo-query Returns rows from one or more Cargo tables on the targeted wiki, matching a SQL-style filter. Supports WHERE, JOIN ON, GROUP BY, HAVING, and ORDER BY clauses. Enabled only when the wiki has Cargo installed. Use cargo-list-tables to discover table names and cargo-describe-table to inspect field types before constructing a query — field types determine which operators apply (HOLDS / HOLDS LIKE for list fields, MATCHES for Searchtext, NEAR for Coordinates). Cargo collapses NULL to empty string on output, so `where=field=''` matches both unset and truly-empty values. Up to 500 rows per call; paginate with continueFrom.
smw-list-properties Lists Semantic MediaWiki properties on the targeted wiki. Enabled only when the wiki has SMW installed. Each entry has the property name, a copy-paste `[[name::value]]` template for smw-query, and — when SMW exposes them — a description and usage count. Wikis often have hundreds of properties; supply search to narrow. Up to 200 per call; paginate with continueFrom.
smw-query Runs a Semantic MediaWiki `#ask` query against the targeted wiki. Enabled only when the wiki has SMW installed. One row per matching page, with the requested printouts as columns. For grounded property names, use smw-list-properties first.\n\nExamples:\n- Pages in a category: [[Category:Person]]|?Has occupation|limit=20\n- Numeric comparison: [[Born in::>1900]]|?Has name|?Born in\n- Multiple conditions: [[Category:Person]][[Born in::>1900]][[Has occupation::Architect]]\n\nNumeric operators: write `>N` and `<N`; SMW's default config treats them as ≥ and ≤. `>=` and `<=` are rejected unless the wiki enables strict comparators (`$smwStrictComparators`).\n\nUp to 500 rows per call; paginate with continueFrom. Syntax errors return the SMW message verbatim.
bucket-query Runs a Bucket extension query against the targeted wiki. One row per match. Enabled only when the wiki has Bucket installed.\n\nGround bucket and field names first: schemas are JSON pages in the `Bucket:` namespace (id 9592). The `bucket(...)` argument is the page title lowercased with spaces replaced by underscores — page `Bucket:Combat achievement` is queried as `bucket("combat_achievement")`. Discover with `search-page-by-prefix` (namespace 9592 plus a starting-letter prefix), then `get-page` to read the schema. Field names appear already lowercase-underscored in the schema; pass them verbatim.\n\nExamples:\n- Lookup: bucket("exchange").select("name","high_alch").where("name","Abyssal whip").run()\n- Sort: bucket("exchange").select("name","value").orderBy("value","desc").limit(10).run()\n- Comparator: bucket("exchange").select("name","value").where({"value",">",1000000}).run()\n\nWhere syntax: shorthand `where("field","value")` for equality; table form `where({"field","op","value"})` for `=`, `!=`, `>`, `<`, `>=`, `<=`. Compose with `Bucket.And/Or/Not`. Full Lua reference: https://meta.weirdgloop.org/w/Extension:Bucket/Usage.\n\nUp to 500 rows per call; paginate with continueFrom. Bucket\'s API is not yet stable upstream — error wording may shift, but errors come through verbatim.
neowiki-delete-subject Deletes one NeoWiki Subject by ID from its page. Enabled only when the wiki has NeoWiki installed. Requires the edit right. Pre-1.0: the NeoWiki API may change without notice.
neowiki-cypher-query Runs a read-only Cypher query against the wiki\'s NeoWiki knowledge graph (Neo4j) and returns rows. Enabled only when the wiki has NeoWiki installed.\n\nDiscover the data model first — the graph CANNOT be introspected from Cypher (CALL db.labels(), db.schema.* and all procedure calls are rejected as not-read-only). Use neowiki-list-schemas for the entity types, then neowiki-get-schema for a type\'s properties and relations.\n\nGraph model:\n- Subjects are nodes labelled `:Subject` plus a per-schema label, e.g. (s:Subject:Person). Subject node properties are the schema\'s properties plus `id` and `name`; backtick-escape names with spaces: s.`Birth year`.\n- Pages are (:Page) nodes linked by (:Page)-[:HasSubject]->(:Subject). Subject-to-subject relations are typed edges named in the schema\'s `relation` field (see neowiki-get-schema).\n- `select` values are stored as opaque option IDs (e.g. o1abc…), not labels — decode them with neowiki-get-schema.\n\nGotchas:\n- Do NOT RETURN whole nodes: a node carrying a temporal property fails the request. Return specific scalar properties and cast temporals: toString(s.creationTime).\n- Plain list values (labels(n), collect(...)) come back as 1-indexed JSON objects ({"1":…,"2":…}), not arrays.\n- Read-only only; write clauses are rejected.\n\nLimits: ~5,000 rows / 30s by default (50,000 / 300s with the apihighlimits right). When `truncated` is true, narrow with WHERE or add LIMIT/SKIP. Pre-1.0: the NeoWiki API may change without notice.\n\nExample:\n cypher: MATCH (s:Subject:Person) WHERE s.`Birth year` > $minYear RETURN s.name AS name, s.`Birth year` AS year ORDER BY year\n parameters: { "minYear": 2000 }
neowiki-validate-subject Dry-runs validation of a proposed NeoWiki Subject against its Schema and returns any violations WITHOUT writing. Enabled only when the wiki has NeoWiki installed. Provide id to validate an update to an existing Subject (its schema is used), or omit id and provide schema to validate a new Subject. Use before neowiki-create-subject / neowiki-update-subject to catch type mismatches, missing required properties, and the propertyType-vs-type footgun. Returns { violations: [] } when valid. Pre-1.0: the NeoWiki API may change without notice.
neowiki-list-schemas Lists the Schemas (entity types, e.g. Person, Company) defined in the wiki's NeoWiki knowledge graph, each with its description and property count. Enabled only when the wiki has NeoWiki installed. Start here to discover what types exist, then use neowiki-get-schema for one type's properties, or neowiki-cypher-query to query the graph. Paginate with continueFrom. Pre-1.0: the NeoWiki API may change without notice.
neowiki-get-page-subjects Lists the NeoWiki Subjects attached to a wiki page — each with full structured data — and identifies the page's Main Subject. Enabled only when the wiki has NeoWiki installed. This is the bridge from a wiki page (which you may already have from get-page) into its knowledge-graph data: one call returns every subject's statements, so you don't need to resolve subject IDs first. Accepts a page title or a numeric page ID. Pre-1.0: the NeoWiki API may change without notice.
neowiki-get-subject Fetches one NeoWiki Subject by ID — its label, schema, and statements with typed values. Enabled only when the wiki has NeoWiki installed. Richer than a flattened Cypher node: it preserves multi-part values and per-statement types. `select` values are option IDs — decode them with neowiki-get-schema. Get an ID from neowiki-search-subjects or a Cypher query. Pre-1.0: the NeoWiki API may change without notice.
neowiki-get-schema Returns one NeoWiki Schema's property definitions: each property's name, type (text/number/boolean/url/date/datetime/select/relation), and type-specific attributes. Enabled only when the wiki has NeoWiki installed. `relation` properties name the graph edge (`relation`) and the `targetSchema` they point to — this is the relationship vocabulary for neowiki-cypher-query. `select` properties carry the option ID->label map needed to decode select values returned by queries. Use neowiki-list-schemas to discover schema names. Pre-1.0: the NeoWiki API may change without notice.
neowiki-set-main-subject Sets which existing Subject on a wiki page is its Main Subject, or clears it. Enabled only when the wiki has NeoWiki installed. Pass subjectId to promote a Subject that already exists on the page, or null to clear the Main Subject. This differs from neowiki-create-subject with isMain, which creates a NEW main Subject. Requires the edit right. Pre-1.0: the NeoWiki API may change without notice.
neowiki-update-subject Replaces a NeoWiki Subject\'s label and statements — a FULL replace: property names absent from `statements` are deleted, and {} clears all statements. Enabled only when the wiki has NeoWiki installed. The Subject\'s id and schema are immutable. Requires the edit right. Read the current state with neowiki-get-subject first. Each statement is keyed by property name as { propertyType, value } — the key is propertyType, NOT the `type` key read tools return. Value by type: text/url/date/datetime → array of strings; select → array of option IDs (resolve via neowiki-get-schema); number → a number; boolean → a boolean; relation → array of { target: "<subjectId>", properties? }. Pre-validate with neowiki-validate-subject. Pre-1.0: the NeoWiki API may change without notice.
neowiki-search-subjects Finds NeoWiki Subjects by label within a Schema, returning each match's opaque Subject ID (s…) and label. Enabled only when the wiki has NeoWiki installed. Subject IDs are not human-readable, so use this to resolve a name to an ID for neowiki-get-subject or a parameterized neowiki-cypher-query. Pre-1.0: the NeoWiki API may change without notice.
neowiki-create-subject Creates a new NeoWiki Subject on a wiki page and attaches its statements. Enabled only when the wiki has NeoWiki installed. Set isMain to make it the page\'s Main Subject (a page has at most one); otherwise it is added as a child Subject. Requires the edit right. Each statement is keyed by property name as { propertyType, value } — the key is propertyType, NOT the `type` key read tools return; a statement lacking propertyType is rejected. Value by type: text/url/date/datetime → array of strings (dates ISO, e.g. ["2020-12-31"]); select → array of option IDs (resolve labels via neowiki-get-schema); number → a number; boolean → a boolean; relation → array of { target: "<subjectId>", properties? }. Pre-validate with neowiki-validate-subject. Pre-1.0: the NeoWiki API may change without notice.
Permissions 4
network medium filesystem low shell high env_vars low