Add Perfect Wiki to OpenCode with a few lines of opencode.json. Whichever model you pair it with, your terminal agent can look up internal docs, cite the page it used, and keep that page accurate.
Declare Perfect Wiki as a remote MCP server in opencode.json. The first time OpenCode connects, it notices the server needs sign-in and starts the OAuth flow for you.
Because the knowledge lives in Perfect Wiki rather than in a prompt file, every model you use in OpenCode sees the same up-to-date pages β and can edit them when you allow it.
~/.config/opencode/opencode.json (or opencode.json in your project) and add the perfect-wiki entry with "type": "remote" and the URL https://api.perfectwiki.xyz/mcp. Prefer a wizard? Run opencode mcp add.opencode mcp auth perfect-wiki β or just start OpenCode, which begins the OAuth flow when the server asks for authentication.More details in the Perfect Wiki MCP server guide and OpenCode's MCP documentation.
Set "oauth": false so OpenCode doesnβt try to sign in, and export PERFECT_WIKI_TOKEN in your shell. The token is scoped to one knowledge base and has read & write access.
The code shows what the system does; the wiki explains why. OpenCode can pull that context before touching sensitive areas.
Try a different provider for a task without re-explaining your conventions β the knowledge base comes along.
Found a troubleshooting page thatβs wrong while debugging? Have OpenCode correct it on the spot.
Ask a question in plain language and get an AI answer from your SOPs and FAQs, with the source pages.
See which knowledge bases the connection covers and the access level for each.
List every page in a knowledge base.
Read the full content of a specific page.
Create a new page β draft SOPs straight from chat.
Update an existing page, so SOPs never go stale.
Remove pages that are no longer needed.
Get the name and access level of one knowledge base.
Download any of our 294 standard operating procedure templates in Word, PDF, Excel or CSV, no sign-up needed. Then put it in Perfect Wiki so your team can find it and ask about it.
Browse all 294 SOP templates βUnder the "mcp" key of ~/.config/opencode/opencode.json for every project, or opencode.json in a project root for that project only. Use "type": "remote" with the Perfect Wiki URL.
OpenCode starts OAuth automatically when the server responds that authentication is required. You can also run opencode mcp auth perfect-wiki to sign in explicitly.
Yes. Add "oauth": false and a headers object with "Authorization": "Bearer {env:PERFECT_WIKI_TOKEN}", then export the token as an environment variable so it stays out of the config file.
Uploaded files are a snapshot: they go stale the moment a policy changes, and they stay in one chat or project. Through the MCP server, OpenCode reads the current version of your SOPs and FAQs from Perfect Wiki every time, links to the source page, and only reaches the knowledge bases you connect.
Only if you allow it. When you sign in with OAuth you choose Read only or Read & write on the consent screen, and writes only work in knowledge bases where you can edit. Legacy API tokens always have full access to their one knowledge base. Most MCP clients also ask for your confirmation before running a tool that writes.
Yes, with a single connection. When you sign in, choose all knowledge bases you can access (including ones you get access to later) or only the ones you select. OpenCode can search across all of them at once and has to name the target knowledge base for every change. API tokens cover one knowledge base each, so add one server entry per token.
The Perfect Wiki MCP server only forwards the requests OpenCode makes. Tool results β the pages and answers it fetches β are passed to the model as part of the conversation and handled under your AI provider's data policy.
The MCP server is included in every Perfect Wiki plan, and the same API rate limits apply. You can try it with the 14-day free trial β no credit card required.
Didn't find what you're looking for? Contact our support β
Keep your SOPs, manuals and FAQs in Perfect Wiki β and give your whole team answers right where they work.