xwiki-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xwiki-mcp search for pages mentioning "Q3 roadmap" in the Sales space"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xwiki-mcp
A Model Context Protocol server for XWiki. It gives an MCP-capable assistant read-only access to the spaces, pages and attachments that one XWiki account can see.
Why this exists
XWiki has announced an MCP server of its own, but at the time this was written it had not been released. Until it is, there is no supported way to point an assistant at an XWiki instance, which also leaves the knowledge module of every openDesk deployment out of reach.
This server uses the documented
XWiki REST API,
which every instance exposes under /rest.
Related MCP server: GitLab MCP Server
Scope and safety
Every tool in this server is read-only. There is no code path that creates, edits or deletes a page, and no tool that writes to disk or makes a request to any host other than the configured instance.
The server authenticates as one XWiki account and therefore sees exactly what that account sees. XWiki's own page and space rights remain the access boundary; this server does not widen them.
Responses are size-capped before they reach the assistant. A single response
body is read up to a limit and then aborted, and long page content is truncated
with an explicit [truncated] marker rather than silently cut.
Requirements
Node.js 20 or newer
An XWiki instance reachable from the machine running the server
An XWiki account whose password works against
/rest
A note on single sign-on
XWiki instances behind an SSO-only setup often have HTTP Basic authentication
disabled on /rest. When that is the case, this server cannot authenticate,
and it says so explicitly rather than failing vaguely: an unauthenticated REST
call returns the login page with status 200, which the server reports as
unauthorized.
Before setting anything up, check from a shell:
curl -u 'username:password' 'https://wiki.example.org/xwiki/rest/wikis?media=json'JSON means this server will work. HTML means Basic authentication is not available and an administrator would have to enable it.
Installation
git clone https://github.com/Nraitschew/xwiki-mcp.git
cd xwiki-mcp
npm install
npm run buildThe build writes an executable entry point to dist/index.js.
Configuration
The server is configured through environment variables. The host application that starts the server passes them in.
Variable | Required | Default | Meaning |
| yes | Instance URL, for example | |
| yes | XWiki login name. | |
| yes | The account's password. | |
| no |
| Wiki name in the REST path. Only relevant on a multi-wiki farm; |
| no |
| Per-request timeout in milliseconds. |
| no |
| Hard cap on a single response body. |
| no |
| Cap on page content handed to the assistant. |
A missing or malformed variable makes the server exit with a message on stderr that names the variable, rather than starting and failing on the first tool call.
Connecting a client
Claude Desktop
Edit the MCP configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"xwiki": {
"command": "node",
"args": ["/absolute/path/to/xwiki-mcp/dist/index.js"],
"env": {
"XWIKI_URL": "https://wiki.example.org/xwiki",
"XWIKI_USERNAME": "your-login",
"XWIKI_PASSWORD": "your-password"
}
}
}
}Restart Claude Desktop afterwards.
Claude Code
claude mcp add xwiki \
--env XWIKI_URL=https://wiki.example.org/xwiki \
--env XWIKI_USERNAME=your-login \
--env XWIKI_PASSWORD=your-password \
-- node /absolute/path/to/xwiki-mcp/dist/index.jsAny other MCP client
The server speaks MCP over stdio. Start it with node dist/index.js and the
three required environment variables set; any client that can spawn a stdio
server will work.
Tools
Tool | Purpose |
| Full-text search across page names, titles and content. Returns the references to read next. |
| One page's content, with its version and syntax. |
| The spaces of the configured wiki, with the references to browse them. |
| The pages directly inside one space. Nested spaces are not expanded. |
| The files attached to a page: name, size, MIME type. Contents are not downloaded. |
| The wikis this account can see, and which one is configured. Only relevant on a multi-wiki farm. |
Tool results are JSON.
Page references
XWiki addresses a page as Space.PageName, and a nested space as
A.B.PageName. Two details are easy to get wrong, and this server handles both:
A literal dot inside a name is escaped as
\.in a reference. Splitting on every dot would break exactly the pages whose names contain one, such as release notes or dates. The parser here resolves the escapes.A reference may be fully qualified as
wiki:Space.Page. The wiki part is a separate REST path segment, not a dot-separated one.
A bare page name with no space is rejected rather than guessed at, because
guessing a space would silently read a different page. Always pass a reference
that search_pages, list_spaces or list_pages_in_space returned.
Errors
A failing tool call returns a result marked as an error whose text starts with a stable machine code:
Code | Meaning |
| The credentials were rejected, or the instance does not allow Basic authentication on |
| The account is authenticated but not permitted to read that page or space. |
| No such page, space or wiki. |
| The instance is rate limiting this client. |
| The instance did not answer, or the request timed out. |
| The page reference names no space. |
| The response was not the expected document. |
| Any other non-success status, with the status code in the message. |
Testing against your instance
npx @modelcontextprotocol/inspector node dist/index.jsThe MCP Inspector lists the tools and lets you call them by hand, which is the fastest way to confirm the URL, credentials and wiki name are right.
Development
npm install
npm run typecheck
npm test
npm run buildThe unit tests cover the configuration parsing and the reference grammar, which is the part most likely to break silently. They make no network requests, so they run anywhere.
Limitations
Read-only by design. Creating or editing pages is not implemented.
Attachment contents are listed but not downloaded.
get_pagereturns the page source in its stored syntax (usuallyxwiki/2.1), not rendered HTML or plain text.Objects, classes and comments attached to a page are not exposed.
Search pages once with the requested limit rather than paging through a large result set.
Related
opendesk-mcp connects a whole openDesk instance, including this server's XWiki tools.
openproject-mcp does the same for OpenProject.
License
Apache License 2.0. See LICENSE.
This project is not affiliated with or endorsed by the XWiki project or XWiki SAS. "XWiki" is a trademark of its respective owner and is used here only to describe what this software connects to.
Available Tools
6 toolsget_pageGet pageA
Read one page's content by its reference, for example 'Onboarding.Checklist' or 'Main.WebHome'. Get the reference from search_pages or list_pages_in_space; a bare page name without a space is not addressable. Long pages are truncated with an explicit marker.
Inputs: pageRef (required).
list_page_attachmentsList page attachmentsA
List the files attached to one page, with name, size and MIME type. The file contents are not downloaded.
Inputs: pageRef (required), limit.
list_pages_in_spaceList pages in a spaceA
List the pages directly inside one space. Nested spaces are not expanded; call this again with the nested space's reference to descend.
Inputs: spaceRef (required), limit.
list_spacesList spacesA
List the spaces of the configured wiki, with the reference to pass to list_pages_in_space. Use this to orient yourself before browsing.
Inputs: limit.
list_wikisList wikisA
List the wikis this account can see. Only relevant on a multi-wiki farm: if the wiki you want is not the configured one, set XWIKI_WIKI to its name and restart the server.
Inputs: no named parameters.
search_pagesSearch pagesA
Full-text search across page names, titles and content of the configured wiki. Returns each hit's pageRef, title, space and last-modified date. Pass a pageRef to get_page to read the page.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource/action: full-text search, single page retrieval, space listing, in-space page listing, attachment listing, and wiki listing. Although list_spaces and list_wikis sound similar, their descriptions clearly separate spaces within a wiki from wiki instances on a farm. No two tools appear interchangeable.
Tool names follow a consistent verb_noun pattern: search_pages, get_page, list_spaces, list_pages_in_space, list_page_attachments, and list_wikis. All use lowercase snake_case and list_ for enumeration operations. Minor singular/plural variation is natural and does not create confusion.
Six tools is well-scoped for a wiki browsing/reading server. Each tool has a clear role in navigation or retrieval, with no redundancy. The count is not excessive for the feature set.
The server covers the core read/browse cycle: discover wikis, navigate spaces, search/list pages, fetch page content, and see attachments. The only notable gaps are that attachment contents cannot be fetched and there are no page lifecycle operations, but the exposed surface appears intentionally read-oriented. No critical dead end blocks typical wiki research.
Maintenance
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only access to InfluSense influencer discovery, ratings, watchlists, and reports via MCP.
Raily personal-agent MCP with scoped reads and approved actions.
Read-only access to Communicate developer guides, OpenAPI summaries, and support contact.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables read-only access to LCM2M Caddis VM2M API for equipment, runs, telemetry, alarms, etc., via MCP tools.3161 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables read-only access to GitLab projects, files, directories, and merge requests through MCP tools.-
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable assistants to read files, work packages, and wiki pages from an openDesk instance using the account's existing permissions.1Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables read-only retrieval of Jira Cloud issues, JQL search, and project issue listing through MCP tools.-