Configure the MCP Server
Steps
In the wiki's administration, under "MCP Server":
- Server name - the name advertised to connecting agents (defaults to the wiki pretty name).
- Server description - sent as the MCP initialization instructions. A "call man first" hint is appended automatically.
- Optionally enable write tools (
edit_document,write_document), which are off by default. - MCP Server is enabled by default. Subwikis have a toggle, the main wiki is controlled from the farm dashboard.
Set up authentication
The MCP uses XWiki's configured authentication method(s). By default, it doesn't ask for authentication which makes it possible to also query pages that are available to guests. An authentication header, e.g., for basic auth can be used to authenticate the user using the configured authentication method in XWiki.
When the OpenID Connect Provider extension is installed:
- Access for guest users is denied.
- The OpenID connect provider is indicated as the authentication method.
- The MCP client should trigger an authentication flow to obtain an authentication token.
For production use, install the OpenID Connect Provider extension and configure it for token-based authentication:
- Install the OpenID Connect Provider extension.
- In Administration > Users & Rights > OpenID Connect, change the clients to "Dynamic mode".
- In Administration > Users & Rights > Authentication, change the authenticator to "Token based authenticator" (see "Select the Authenticator").
- If needed, set up a fallback authenticator (see the OpenID Connect Provider documentation).
When OIDC is configured, unauthenticated callers receive HTTP 401 with a WWW-Authenticate header pointing at the wiki's OIDC provider metadata.
Security recommendation
Create a dedicated wiki user for MCP access with only the rights the use case requires. Do not grant programming or admin rights to the MCP user.
FAQ
What is the endpoint URL?
The endpoint URL is https://<server>/<context>/rest/wikis/<wiki>/aiLLM/mcp where <server> is the domain and possibly port of the XWiki installation, <context> is usually either empty or xwiki (check if other URLs have the xwiki prefix) and <wiki> is the wiki where the collections are configured, xwiki for the main wiki.
Do I need to restart the MCP Server for changes to take effect?
No restart is needed. Saving the configuration invalidates the cached MCP server, and the next request rebuilds with the new settings. A change on the main wiki refreshes all wikis; a change on a subwiki refreshes only that wiki.