Access the Ubuntu wiki with an MCP server
Testing
An MCP server is available that can be used to read and query content from the Ubuntu wiki.
In this guide, you will set up the MCP on Ubuntu using the following tools:
- Inference snap[1]: an easy way to install an AI model that is optimized for your machine.
- OpenCode[2]: an open-source, model-agnostic AI coding harness.
- MediaWiki MCP Server[3]: an open-source MCP server that can run locally on your device.
This guide only describes a local, read-only configuration. It does not provide credentials or access to perform edits on the Ubuntu Wiki using the MCP.
Install OpenCode
There are a number of methods[4] for installing OpenCode.
Here, we will assume you are using NPM:
npm i -g opencode-ai
Configure OpenCode
Create or edit the configuration file at ~/.config/opencode/opencode.jsonc, remembering to replace <username>:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mediawiki-mcp-server": {
"type": "local",
"command": ["npx", "-y", "@professional-wiki/mediawiki-mcp-server@latest"],
"environment": {
"CONFIG": "/home/<username>/.config/mediawiki-mcp/config.json"
}
}
}
}
This ensures that the MCP server will be installed and available to OpenCode.
Configure the MCP server
Next, configure the MCP server itself:
{
"defaultWiki": "wiki.staging.ubuntu.com",
"wikis": {
"wiki.staging.ubuntu.com": {
"sitename": "Ubuntu Wiki",
"server": "https://wiki.staging.ubuntu.com",
"articlepath": "/$1",
"scriptpath": "/w",
"readOnly": true
}
}
}
Install the inference snap
For this guide, you need to install a model with tool support.
We will use GLM 4.7 Flash but you can choose any model you prefer:
sudo snap install glm-4-7-flash
Check the output of glm-4-7-flash status:
engine: cpu
services:
server: active
server-webui: active
endpoints:
openai: http://127.0.0.1:8354/v1
webui: http://127.0.0.1:8355/
model:
name: glm-4.7-flash
Note the openai endpoint and the model name, then add those details to the MCP configuration:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mediawiki-mcp-server": {
"type": "local",
"command": ["npx", "-y", "@professional-wiki/mediawiki-mcp-server@latest"],
"environment": {
"CONFIG": "~/.config/mediawiki-mcp/config.json"
}
}
- }
+ },
+ "provider": {
+ "glm47flash": {
+ "api": "openai",
+ "name": "GLM 4.7 Flash Inference Snap",
+ "options": {
+ "baseURL": "http://127.0.0.1:8354/v1"
+ },
+ "models": {
+ "glm-4.7-flash": {}
+ }
+ }
}
}
Chat with the wiki
Run opencode.
Type /models in OpenCode and select glm-4.7-flash.
Ask a question about the wiki, such as:
List the last 5 new pages in the wiki.
The last five pages that were created should be returned, which you can check against Special:NewPages. Example output:
List the last 5 new pages in the wiki
+ Thought: 541ms
mediawiki-mcp-server_get-recent-changes [limit=5]
+ Thought: 1.6s
The 5 most recently created pages:
1. User talk:Mrbite — 2026-09-09 (Mrbite)
2. User:Shanecrowley/drafts/AI — 2026-09-08 (Shanecrowley)
3. Install the Arduino IDE — 2026-09-08 (Marek-suchanek)
4. Ubuntu Wiki:Migration/Temporary/DesktopTeam/TestPlans/Localsearch — 2026-09-07 (Aleasto)
5. Configure SSH to use two-factor authentication — 2026-09-07 (Marek-suchanek)
Next steps
Refer to the README[3] in the GitHub repo to learn about what else is possible with the MCP server.