Meko for OpenCode
Meko connects to OpenCode with one config block. OpenCode is an MCP client and Meko is a remote MCP server, so they connect directly. OpenCode reads and writes the same datapack your other tools already work with.
Over MCP, Meko provides OpenCode with:
Agent-scoped memory
What your agent learns persists beyond the session and is readable via every AI tool you connect to.
A shared knowledge base
Documents and promoted conclusions are searchable by all agents and teammates with access to the datapack.
A trace of every read and write
Each conversation is stored with its reasoning, so you can see what an agent did and why.
OpenCode reads the same datapack as everything else you use
If you already point Claude Code or Cursor at a datapack, OpenCode reads and writes the same one.
Integration is one config block plus instructions in AGENTS.md; the agent calls Meko tools on demand.
How Meko Benefits OpenCode
Use the memory your other tools built
“Ask Meko what we already know about the flaky checkout test.”
Claude Code and Cursor write the datapack; OpenCode reads it back.
Add with one config block
Meko goes under the MCP key in opencode.json as a remote server. No install step, nothing to download. Confirm with opencode mcp list.
Scope the tools per agent
Tools arrive prefixed by server name (meko_memory_add, meko_memory_search, etc). Disable the group globally with “meko_*”: false, then re-enable it only for the agents that should have memory.
Write the habit into AGENTS.md
Put the record and recall instructions in the repo, the same pattern OpenCode’s own docs use. Three lines are enough.
Connecting Meko in OpenCode
OpenCode connects through its own config. Three levels are available: the config makes the connection, the behavioral guide sets the habit, and a plugin makes capture automatic.
1. Add Meko to opencode.json:
{ "$schema": "https://opencode.ai/config.json", "mcp": { "meko": { "type": "remote", "url": "https://mcp.mekodata.ai/mcp", "oauth": false, "headers": { "API_KEY": "{env:MEKO_API_KEY}" } } } }Set your key as the MEKO_API_KEY environment variable, and confirm with opencode mcp list.
2. With this step done, Meko is “on demand”. All of Meko’s tools are available in every session, and the agent calls them when you ask, mentioning Meko so it knows to. Nothing is searched or saved unless you say so.
3. To make record and recall the agent’s habit, adapt the meko-mcp-tools behavioral guide from the Meko community skills repo into AGENTS.md at the repo root. The guide’s rules tell the agent when to search before starting, what to save as it works, and when to check team knowledge. The file lives in the repo, so every teammate who clones the project gets the same behavior.
4. For capture that runs on every session without the agent deciding, write an OpenCode plugin. OpenCode loads plugins from opencode.json and fires them on session and tool events, so your plugin can record to the Meko endpoint as sessions start, run, and finish. The behavioral guide is your ruleset for what to record.