OpenCode integration commands.
- me opencode install -- register
meas an MCP server with OpenCode - me opencode import -- import OpenCode sessions from
~/.local/share/opencode/storage
Register me as an MCP server with OpenCode by editing ~/.config/opencode/opencode.json.
me opencode install [options]
| Option | Description |
|---|---|
--api-key <key> |
API key to embed in the MCP config. |
--server <url> |
Server URL to embed in the MCP config. |
If no --api-key or --server is provided, values are resolved from ~/.config/me/credentials.yaml (set by me login and me engine use).
For manual MCP client configuration, see MCP Integration.
Import OpenCode sessions from ~/.local/share/opencode/storage/.
me opencode import [options]
See agent session imports for the full option reference, tree layout, idempotency rules, content shape, and metadata schema.
OpenCode stores data across four directories:
project/<project-id>.json-- project metadatasession/<project-id>/ses_<id>.json-- session metadata (title, directory, timestamps)message/ses_<id>/msg_<id>.json-- per-message metadata (role, model)part/msg_<id>/prt_<id>.json-- content parts (text, reasoning, tool, step-start/finish)
Each msg_<id> becomes one memory. Parts are stitched into the message's ordered block list (text / reasoning / tool_use + tool_result). OpenCode's agent field becomes meta.source_agent_mode (e.g. "plan").
Synthetic OpenCode user text wrapper parts marked with synthetic: true are ignored.