Connect Perfect Wiki to OpenCode, and the agent reads your team's docs from the terminal and keeps them up to date.
How to connect
- Open
~/.config/opencode/opencode.json(oropencode.jsonin your project) and add theperfect-wikientry. Prefer a wizard? Runopencode mcp add.{ "mcp": { "perfect-wiki": { "type": "remote", "url": "https://api.perfectwiki.xyz/mcp" } } } - Run
opencode mcp auth perfect-wiki, or just start OpenCode, which begins the sign-in when the server asks for it. - Sign in to Perfect Wiki in the browser, choose the knowledge bases and the access level, then click Allow access.
- Ask "What does our wiki say about feature flag cleanup?"
With an API token
{
"mcp": {
"perfect-wiki": {
"type": "remote",
"url": "https://api.perfectwiki.xyz/mcp",
"enabled": true,
"oauth": false,
"headers": { "Authorization": "Bearer {env:PERFECT_WIKI_TOKEN}" }
}
}
}Set "oauth": false so OpenCode doesn't try to sign in, and export PERFECT_WIKI_TOKEN in your shell. The token covers one knowledge base and has read & write access.
Tip: OpenCode can also move your old wiki or a docs folder into Perfect Wiki: ๐ค Import with an AI agent (ChatGPT, Claude, Codexโฆ)