MCP Server

Version 1.1 by Michael Hamann on 2026/03/18 12:41

Reference

The MCP server can be used to give an LLM-based agent access to data that is indexed in the index for the LLM application. For example, a coding agent could use this to access technical documentation in the wiki.

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 collections that are available to guests. When the OpenID Connect Provider extension is installed, access for the guest user is denied and the OpenID connect provider is indicated as authentication method. The MCP client should then trigger an authentication flow to obtain an authentication token.

Authorization

The MCP server exposes all collections that are enabled for queries for the current user. The collection settings allow controlling access by enabling/disabling guest access and configuring user groups that can query the collection. Inaccessible collections are ignored. Results are filtered based on the right checking method that is configured in the respective collection.

Client Configuration

The MCP server needs to be configured as "HTTP" or streamable HTTP (without SSE) server, the URL is at 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.

Tools

The MCP server currently supports the following tools:

search_wiki

Search the wiki using semantic and keyword similarity. Returns the most relevant content chunks from indexed pages.

Parameters

ParameterTypeRequiredDescription
querystringrequiredThe text to search for.
collectionsarray[string]optionalOptional list of collection IDs to search in. Omit to search all accessible collections.
limitKeywordResultsintegeroptionalMaximum number of keyword search results (default: 10).
limitSemanticResultsintegeroptionalMaximum number of semantic similarity results (default: 10).

Return format: Text containing XML-like results; each result uses <result>, with optional <url>, <documentId> and <content> elements.

list_collections

List all collections available for searching.

Parameters: None (empty object)

Return format: Text with one collection id per line (newline-separated).

FAQ

Is the MCP server always available when the LLM application is installed?

No, the MCP server currently isn't installed as a dependency of any other extension of the LLM extension and needs to be installed explicitly to be available.

Get Connected