AI assistants have gotten good enough at a lot of tasks. But with each iteration of newer and better models, one thing remains true: The more quality data you feed your AI, the better the answers it'll spit out.
Right now, for most companies, the answer to your questions already exists somewhere in a wiki. Without linking that data to your AI assistant, you're just begging for hallucinations served with confidence. Your assistant will gladly be of service.
Fixing the data-linking issue has become really easy, though. As long as you're using XWiki as a knowledge base, you can now connect any AI assistant to your wiki through our Model Context Protocol (MCP) Server. You choose whether it's the latest state-of-the-art model or a self-hosted model you want to use with sensitive data. All you need is the XWiki MCP Server Extension and your preferred AI tool. These include: OpenCode, Pi, Codex, Claude Code, some of the millions of Copilots Microsoft has to offer, or any other tool that supports MCP.
What is an MCP Server (and why your wiki benefits from one)
MCP is an open standard introduced by Anthropic in late 2024. Its goal is to connect AI applications to external tools and data. The official docs compare MCP to USB-C: You get a standardized way of connecting AI apps to external data. This means you don't need to build a custom integration for every source.
An MCP Server is a service that "speaks" the language defined in the protocol and exposes tools for the AI to use. For example, when you tell an agent to "search for this wiki page", behind the scenes XWiki runs a Solr query and returns the results to the agent.
AI assistants interact directly with XWiki through the MCP Server
By connecting AI to your wiki through the MCP Server, you can use natural language to do tasks you'd otherwise do manually. Tasks that would normally take you a couple of hours can now be done in a matter of minutes, in the background, while you work on something else. Make sure to check the results, though, and never fully trust the machine!
Why we built the XWiki MCP Server
When we started thinking about integrating an MCP Server into XWiki, making it optional and self-hostable was the default choice. While useful, AI tools are just that — tools. We believe it is your right to choose whether you want to use these tools, and if you do, in what capacity.
How you use AI, and to what extent, should be your choice. At XWiki, we make it optional. We're transparent about how it uses your data, and we let you stay in control. You should be able to choose if you host your LLM inference server on your own infrastructure or in the cloud. Ludovic Dubost, CEO and Founder of XWiki SAS
How you can use the XWiki MCP Server
A wiki is not just a collection of plain files, and treating it as such would skip over important data. Pages have links to each other, and backlinks tell you what depends on a specific page. Version history tells you what changed, when, and who changed it. Attachments hold spreadsheets, PDFs, and other documents with valuable insights. You can query App Within Minutes (AWM\*) to extract information, and now you can also turn messy pages into structured data.
*AWM enables a user to quickly create web applications using structured data, with minimal setup and no coding.
The XWiki MCP Server exposes tools for all these functionalities. This allows your agent to efficiently navigate the wiki and find the data you're actually looking for. It also allows the agent to manipulate content in the ways that are most useful to you.
For example, you could have a workflow in which you prompt the agent to turn today's meeting notes into a nicely formatted report. Then turn that report into tasks assigned to meeting participants, through the Task Manager Application (Pro). It's also just as easy to turn structured data from external sources, such as spreadsheets, into AWMs. You can also do the reverse and turn AWMs into spreadsheets.
You can also use AI to bring data into your wiki. Any other tool, MCP Server, API, or extension that your AI agent can access is now a data source for your XWiki instance. This allows you to use XWiki as the primary source of truth for your business data. Users and agents can then find the right insights in one place.
Other potential use cases include:
- Support answers with citations: Public-facing wikis can connect an AI chat widget to the MCP Server. This way, users of the wiki could ask questions through the chat widget, receive relevant answers, and get links to the pages they are looking for.
- Wiki gardening: Large wikis in particular have a tendency to outgrow the efforts necessary to keep them clean. Drafts and outdated pages tend to pile up and cause confusion. An AI agent connected to the wiki through the MCP Server could identify pages that need attention and either flag them or fix them directly.
- Small tools that live inside your wiki: XWiki pages can hold more than just text. You can add your own scripts and stylesheets to each and every page. This allows you to have all kinds of small, highly specialized tools available right inside your wiki. Examples include:
Various converters (e.g. PNG to JPG or MD to HTML) Data aggregation from multiple sources (e.g. GitHub, Jira, and GitLab tickets, all in one place)
\\ Tools for your blog, such as a slug generator or a simple word counter
Any of these, and certainly more, are now easy to do with a little bit of AI and MCP help.
How to connect an AI assistant to your wiki
The prerequisites are:
- MCP Server (BETA) extension installed
- OpenID Connect Provider extension installed
- MCP Authentication set up
In the MCP configuration section, you'll be able to copy the URL necessary for connecting to the XWiki MCP Server. It should look something like
````
https://wiki.example.com/xwiki/rest/wikis/xwiki/aiLLM/mcp
.
Configuration page for the XWiki MCP Server
The next steps depend on which AI tool you want to use to connect to the XWiki MCP Server. You can find a list pointing to MCP-related documentation pages for multiple tools on the Assistant documentation links page.
For now, we'll use OpenCode as an example.
After downloading and installing OpenCode, you need to add the MCP Server to the configuration. OpenCode's configuration file is either in
````
~/.config/opencode/opencode.jsonc
, or in an
````
opencode.jsonc
file in the project root directory. The snippet you need to add to your configuration looks like this (make sure to change the example URL to yours):
````
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"xwiki": {
"type": "remote",
"url": "https://xwiki.example.com/xwiki/rest/wikis/xwiki/aiLLM/mcp",
"enabled": true
}
}
}
You now need to run
````
opencode mcp auth xwiki
in your terminal, accept the connection, and then you should be set!
Note that by default, the agent can only read content. You'll need to enable write permissions in the MCP configuration.
Explore what the MCP Server can do with your knowledge
Use the XWiki MCP Server in XWiki Cloud, on your self-hosted instance, or not at all. Connecting AI to your wiki should always be your choice. Everything we've built was built with these principles in mind.
Even in beta, the current version of the XWiki MCP Server extension can already do a lot. You can work with pages, structured data, and attachments, all in natural language, and while using your preferred AI tools.
If you're looking into adding AI to your wiki, we hope you'll try out the new XWiki MCP Server. If you run into any issues, let us know! We'll get it sorted out as quickly as humanly possible.
FREE WEBINAR
Your wiki, your AI: Meet the XWiki MCP Server (BETA)
In this 30-minute demo, you’ll see how the open-source XWiki MCP Server connects AI agents to the knowledge in XWiki.