AI knowledge base for OpenCode.

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.

No credit cardSetup in under 10 minutesCancel anytime
01MCP setup

Connect OpenCode in two minutes.

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.

  • β†’Remote server entry β€” no local process to run
  • β†’OAuth starts automatically on first connection
  • β†’Global or per-project config, committed or not
~/.config/opencode/opencode.json Β· OpenCode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"perfect-wiki": {
"type": "remote",
"url": "https://api.perfectwiki.xyz/mcp",
"enabled": true
}
}
}
02Read & write

Any model, your knowledge β€” always the current version.

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.

  • β†’Same knowledge base regardless of the model provider
  • β†’No stale copies of docs pasted into AGENTS.md
  • β†’Page edits only when the connection has write access
OpenCode
> Why does staging use a separate Stripe account? Check the wiki.
⏺ perfect-wiki · ask("staging stripe account")
⏺ perfect-wiki · get_page("Environments overview")
Per Environments overview: staging uses its own Stripe account so test webhooks never reach production reconciliation. Keys live in the staging vault, rotated quarterly.
Setup guide

How to connect Perfect Wiki to OpenCode.

  1. 1Open ~/.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.
  2. 2Run opencode mcp auth perfect-wiki β€” or just start OpenCode, which begins the OAuth flow when the server asks for authentication.
  3. 3Sign in to Perfect Wiki in the browser, pick the knowledge base and click Allow access.
  4. 4Ask β€œWhat does our wiki say about feature flag cleanup?”

More details in the Perfect Wiki MCP server guide and OpenCode's MCP documentation.

Prefer a static API token?
opencode.json Β· 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 is scoped to one knowledge base and has read & write access.

Use cases

What your team does with Perfect Wiki in OpenCode.

Answers about β€œwhy”, not just β€œwhat”

The code shows what the system does; the wiki explains why. OpenCode can pull that context before touching sensitive areas.

> Before changing rate limits, check the wiki for why they were set.

Switch models, keep the context

Try a different provider for a task without re-explaining your conventions β€” the knowledge base comes along.

> Follow our Go error-handling guide from Perfect Wiki for this refactor.

Fix the docs when you fix the bug

Found a troubleshooting page that’s wrong while debugging? Have OpenCode correct it on the spot.

> The cache reset steps are outdated β€” update the Troubleshooting page.
The full toolset
ask()

Ask a natural-language question and get an AI answer with sources.

list_pages()

List every page in the connected knowledge base.

get_page()

Read the full content of a specific page.

create_page()

Create a new page β€” draft SOPs straight from chat.

update_page()

Update an existing page, so SOPs never go stale.

delete_page()

Remove pages that are no longer needed.

get_knowledgebase()

Get info about the connected knowledge base.

Free SOP templates

Start from a ready-made SOP. Keep it alive here.

Download any of our 284 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 284 SOP templates β†’
Common questions

Frequently asked questions

Didn't find what you're looking for? Contact our support β†’

Ready when you are

Put your SOPs to work in OpenCode.

Keep your SOPs, manuals and FAQs in Perfect Wiki β€” and give your whole team answers right where they work.

No credit cardSetup in under 10 minutesCancel anytime