OpenCode Peer

v0.3.0
io.github.jacklaw1410/opencode-peer-mcp Checked 4 days ago Published 5 hours ago

MCP server bridging OpenCode sessions on this machine and across machines

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

servers_list

List available OpenCode servers. Without a config file, the local server on this machine is discovered automatically.

server_get

Get one OpenCode server, including its description when configured. Omit the server argument when exactly one server is available.

ParameterTypeDescription
serverstringServer id. Omit when exactly one server is available.

sessions_list

List sessions on one server. Use this for a single server, including filtered listings; sessions_search is for searches across servers. Omit the server argument when exactly one server is available.

ParameterTypeDescription
archivedbooleanInclude archived sessions.
cursorstringPagination cursor from previous page.
directorystringFilter by working directory.
limitintegerMax sessions to return.
orderstringSort order by updated time.
parent_idstringFilter by parent session id.
projectstringFilter by project id.
searchstringSubstring to match in title or id.
serverstringServer id. Omit when exactly one server is available.
subpathstringFilter by subpath.

session_get

Get a session by ID from one server. Omit the server argument when exactly one server is available.

ParameterTypeDescription
session_id *stringSession id on that server.
serverstringServer id. Omit when exactly one server is available.

session_status

Get derived status for a session.

ParameterTypeDescription
session_id *stringSession id on that server.
serverstringServer id. Omit when exactly one server is available.

session_messages

Get messages for a session. Returns only the message list; does not fetch session details or status.

ParameterTypeDescription
session_id *stringSession id on that server.
cursorstringPagination cursor from previous page.
limitintegerMax messages to return.
orderstringSort order by updated time.
serverstringServer id. Omit when exactly one server is available.
typestringFilter by message type.

session_diff

Get structured diffs for a session turn. Returns only the diff; does not fetch messages or session details.

ParameterTypeDescription
session_id *stringSession id on that server.
contextintegerLines of context around changes.
fromstringStarting turn id.
serverstringServer id. Omit when exactly one server is available.
tostringEnding turn id.

sessions_compare

Compare two sessions. Returns both sessions side by side; does not fetch messages or diffs. Omit a server argument when exactly one server is available.

ParameterTypeDescription
session_a *stringFirst session id.
session_b *stringSecond session id.
server_astringFirst server id. Omit when exactly one server is available.
server_bstringSecond server id. Omit when exactly one server is available.

session_create

Create a session on one server. Omit the server argument when exactly one server is available.

ParameterTypeDescription
directory *stringWorking directory for the session.
agentstringAgent name to use.
allowedbooleanAllow write operations (gated).
modelobject
serverstringServer id. Omit when exactly one server is available.
titlestringSession title.

session_prompt

Prompt a session on one server. Omit the server argument when exactly one server is available.

ParameterTypeDescription
prompt *stringPrompt text to send.
session_id *stringSession id on that server.
allowedbooleanAllow write operations (gated).
serverstringServer id. Omit when exactly one server is available.
wait_forintegerWait up to this many milliseconds for the remote session to complete, then return its response. Null/omitted returns immediately.

session_interrupt

Interrupt a session on one server. Omit the server argument when exactly one server is available.

ParameterTypeDescription
session_id *stringSession id on that server.
allowedbooleanAllow write operations (gated).
serverstringServer id. Omit when exactly one server is available.

session_schedule

Schedule a message on a session after a delay. Fire-and-forget: does not survive server restart. For recurring checks, use OpenCode built-in automations.

ParameterTypeDescription
delay *stringWhen to fire: a duration like "30s", "5m", "1h", "90s", "2m30s" or an ISO timestamp like "2026-11-22T13:00:00". Max 1 hour.
prompt *stringPrompt text to send when the timer fires.
session_id *stringSession id on that server.
allowedbooleanAllow write operations (gated).
serverstringServer id. Omit when exactly one server is available.