xwiki-mcp
Click on "Install 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-mcpsearch 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: Sprinklr 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.
| Name | Required | Description | Default |
|---|---|---|---|
| pageRef | Yes | Page reference in the form Space.PageName, as returned by search_pages. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It adds meaningful behavioral details: pages are addressed by Space.PageName, bare names fail, and long pages are truncated with an explicit marker. These go beyond a simple 'read a page' statement, though it does not mention error or auth behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact sentences, each earning its place. The main purpose is front-loaded, followed by reference sourcing guidance and a behavioral note about truncation. No redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read operation with a fully documented schema, the description covers purpose, reference format, reference sourcing, and truncation behavior. It does not describe the exact return format or not-found behavior, but given the low complexity this is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage for pageRef, so the baseline is 3. The description adds value beyond the schema by giving concrete examples and emphasizing the Space.PageName format and the bare-name restriction, which helps agents construct valid inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read one page's content by its reference') and distinguishes it from the sibling list/search tools by focusing on content retrieval for a single page. Concrete examples like 'Onboarding.Checklist' and 'Main.WebHome' make the intended use immediately clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly tells the agent to obtain the reference from search_pages or list_pages_in_space, and warns that a bare page name without a space is not addressable. This gives strong usage context, though it does not explicitly list when-not-to-use scenarios or name alternative tools for other cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_page_attachmentsList page attachmentsA
List the files attached to one page, with name, size and MIME type. The file contents are not downloaded.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum attachments to return. Default 50. | |
| pageRef | Yes | Page reference in the form Space.PageName. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It clearly states that file contents are not downloaded, which is an important behavioral safeguard, and indicates a read-only metadata listing. It does not discuss auth, errors, or rate limits, but for a simple list operation this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences contain the essential information, with the main action and output fields front-loaded and the no-download caveat kept as a single clarifying sentence. No filler or redundant wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with no output schema, the description covers the return fields and the key no-download behavior. It omits minor details like ordering or pagination semantics, but the schema already documents the limit parameter, making the description adequately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with both pageRef and limit already documented including format, constraints, and default. The description adds no new parameter-level meaning, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb-resource pair ('List the files attached to one page') and explicitly names the return fields (name, size, MIME type). This clearly distinguishes it from sibling tools that target pages, spaces, or wikis rather than attachments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: it is for listing attachment metadata for one page and not for downloading files. It does not explicitly name alternative tools or provide when-not-to-use guidance, but the one-page scope and no-download caveat make the intended use obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum pages to return. Default 100. | |
| spaceRef | Yes | Space reference, for example 'Main' or 'Main.Sub', as returned by list_spaces. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure. It does disclose the important non-recursive traversal behavior, which is valuable. But it does not describe response shape, ordering, or other runtime behaviors, leaving some burden unfulfilled.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences, with the primary purpose front-loaded and the behavioral caveat placed second. Every clause earns its place; no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The definition is complete enough for correct invocation: required parameter, optional limit, and the key recursion pattern are covered. However, since there is no output schema, the description does not explain return value structure, which is a minor but real gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: spaceRef and limit are both fully documented with examples and defaults. The description adds only a contextual echo ('nested space's reference'), providing no new semantic information beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('List') and resource ('pages directly inside one space'), and explicitly clarifies scope by noting nested spaces are not expanded. This clearly distinguishes it from siblings like list_spaces, list_wikis, and search_pages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives direct usage context for hierarchical descent ('call this again with the nested space's reference to descend'), which is helpful. However, it does not explicitly name alternative tools or state when not to use it, so it falls short of the highest bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum spaces to return. Default 100. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral burden. It usefully discloses that the output includes a reference for list_pages_in_space and that the scope is the configured wiki. It does not mention pagination, ordering, or output shape, but for a simple list operation this is acceptable though not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences communicate the core function, the connection to a sibling tool, and the intended usage context with no filler. The most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read-only listing tool, the description plus schema covers what an agent needs: what is listed, the output's purpose, and how to control the result count. A full return-value description is not necessary given the simple nature, though a bit more on output format would make it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the sole limit parameter, including its default and bounds. The description adds no parameter-specific details, which matches the baseline of 3 for well-covered schemas.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource: listing the spaces of the configured wiki. It also distinguishes itself by explaining that the result provides the reference needed for list_pages_in_space, which separates it from sibling tools like list_wikis and search_pages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The instruction 'Use this to orient yourself before browsing' gives clear contextual guidance on when to call it. It does not explicitly describe when not to use it or contrast it with list_wikis, but the purpose is concrete enough for an agent to select it appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does reveal account-scoped visibility and environment dependency (XWIKI_WIKI plus restart), which is useful. However, it does not mention output format, pagination, or explicitly confirm there are no side effects, leaving some behavioral details undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no wasted words. The core purpose is front-loaded, and the environment-specific guidance is placed after the main definition, making it easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter list tool, the description covers the key context: account visibility, multi-wiki applicability, and configuration guidance. However, there is no output schema, and the description does not explicitly state the return format (e.g., array of wiki names/IDs), which would round out the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema already fully describes the inputs. The description adds value by mentioning the XWIKI_WIKI environment variable as a way to change which wiki is targeted, even though it is not a formal tool parameter. The baseline of 4 for a zero-parameter tool is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('List'), the resource ('wikis'), and the scope ('this account can see'). It clearly distinguishes this from sibling tools that operate on pages or spaces, so an agent can tell what list_wikis is for without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context by saying it is 'Only relevant on a multi-wiki farm' and explains what to do if the desired wiki is not the configured one. It does not explicitly name alternatives, but sibling tools are sufficiently different that no exclusion is strictly necessary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return. Default 20. | |
| query | Yes | Search terms. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the tool is a search operation, lists the returned fields, and signals a read-only, non-destructive action. It omits auth/rate-limit details, but these are not essential for a simple query tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences: the first states the operation, scope, and return fields; the second gives the follow-up action. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter, no-output-schema tool, the description is complete: it covers what is searched, what is returned, the wiki scope, and how to use the result with get_page.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description reinforces that query searches names, titles, and content, but adds no parameter details beyond the schema's type, constraints, and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('full-text search'), a clear resource ('page names, titles and content of the configured wiki'), and the returned hit fields. This distinguishes it from read-single-page (get_page) and listing tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the operation and result shape clear, and explicitly tells the agent to pass the returned pageRef to get_page to read a page. It doesn't explicitly state when to prefer this over list_pages_in_space, but the 'full-text' scope implies the distinction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only MCP for provider identity, runtime, API, MCP, A2A, and x402 trust checks.
Read-only access to InfluSense influencer discovery, ratings, watchlists, and reports via MCP.
Read-only MCP access to authorized Vocci sessions, notes, files, and memory search.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables read-only access to LCM2M Caddis VM2M API for equipment, runs, telemetry, alarms, etc., via MCP tools.3127MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants read-only access to Sprinklr data via MCP, allowing querying reports, searching cases, and calling Sprinklr API endpoints.12ISC
- FlicenseNot gradedqualityBmaintenanceEnables read-only access to GitLab projects, files, directories, and merge requests through MCP tools.
- AlicenseNot gradedqualityBmaintenanceEnables read-only file-management operations from AI assistants, including health checks, connection and folder listings, search, share-link resolution, metadata retrieval, and on-demand document reading.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nraitschew/xwiki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server