Make your Wiki accessible to external AI Agents with MCP

Hello Subscriber,

Welcome to another DokuWiki Newsletter. AI agents are becoming increasingly useful because they can do more than just answer questions. Their ability to use tools allows agents to go beyond what they already know, access information from other sources, and take action on your behalf.

In our previous newsletters, we have focused on our AI Agent plugin for DokuWiki, which brings these capabilities directly into the wiki.

In this issue, we’re looking into using the Model Context Protocol (MCP) to connect DokuWiki to external AI agents and how MCP enables them to retrieve, combine, and act on information from multiple systems.

We hope you enjoy this issue and find it useful.

Your CosmoCode DokuWiki Team

DokuWiki as part of an AI workflow

AI agents become particularly useful when they can work with several systems at the same time.

Consider a support employee working on a customer ticket. The ticketing system contains the customer’s problem, the CRM contains information about the customer, and DokuWiki contains the relevant troubleshooting procedures and product documentation.

An AI agent can combine these sources. It can look at the ticket, find the customer’s information, search DokuWiki for the appropriate procedure, and help the employee work through the issue.

The same principle can be applied to many other workflows. A salesperson can combine an opportunity from the CRM with product information and sales guidelines from DokuWiki. An IT agent can use an alert from a monitoring system to find the corresponding runbook in DokuWiki. Developers may use Claude Code to work with both a source code repository and the documentation in DokuWiki.

Each individual system remains responsible for its own information and applies its own strengths to maintaining that information. The AI agent’s tool use brings the information together as needed.

What is MCP?

MCP, short for Model Context Protocol, is a standardized way of making software accessible to AI systems. It provides the agent with tools specific to the system it shall interact with: an “openTicket” for an issue tracker, a “searchCustomer” for a CRM, or a “readPage” for DokuWiki.

An AI system can connect to several MCP servers and use the tools they provide. This allows it to work with information from different systems as part of the same task. And since tools can not only be used for information retrieval, the agent can also use these tools to change or update information — all it takes is a “closeTicket” or “writePage” tool.

The DokuWiki MCP Plugin

As you probably expected, MCP functionality can simply be added via a DokuWiki plugin. A first prototype of the plugin was released early last year. It provides the basic functionality you’d expect. DokuWiki’s remote API mechanisms are exposed as MCP tools, and authentication is based on the user’s access token — the agent acts on behalf of the authenticated user. This means the same ACLs apply to the agent as they do to the user.

This worked fine for personal use. However, for business use, there were a few shortcomings, which have been addressed in the version recently released in Early Access to our DokuWiki Business Plugin partners.

Connecting to central AI systems

In an enterprise context, you’re probably providing AI access to your employees via a central system such as Microsoft 365 Copilot Cowork, Claude, or ChatGPT. Connecting such a system to DokuWiki raises the question of how to authenticate individual users.

The solution to that is OAuth authentication. The administrator sets up the connection between the AI system and the wiki once. When a user first wants to use the wiki through their AI agent, they are asked to log in to the wiki in their usual browser and authorize the agent to access it on their behalf. The agent then acts with that user’s permissions. All the technical details are handled automatically. This works independently of how users authenticate to the wiki — whether through plain auth, Active Directory, two-factor authentication, or SSO.

Besides making this kind of “connect-once, serve-many-users” scenario possible, the new plugin version also allows administrators to fine-tune which tools shall be available to authenticated agents. You might want to start with read-only tools and only enable write access once you have gained confidence in how your agents behave. Regardless of the enabled tools, ACLs are always honored, of course.

Finally, because Microsoft tends to do things a little differently, we added another feature to the plugin. To add an MCP endpoint to Cowork, you need a special app package that has to be uploaded before users can use the MCP connection. Our plugin provides a convenient way to create the required package right from the admin interface.

MCP or DokuWiki AI Agent?

So, does MCP make the DokuWiki AI Agent plugin obsolete? Not at all. In fact, using both can make a lot of sense.

The AI Agent provides a convenient way to interact with the wiki directly, while an MCP connection can bring your wiki’s knowledge and functionality into other workflows. Actually, the AI Agent’s own tools, like semantic vector search (RAG), can be made available via MCP to let external agents search the wiki even more effectively.