OpenCode Peer
v0.3.0MCP 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.
| Parameter | Type | Description |
|---|---|---|
server | string | Server 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.
| Parameter | Type | Description |
|---|---|---|
archived | boolean | Include archived sessions. |
cursor | string | Pagination cursor from previous page. |
directory | string | Filter by working directory. |
limit | integer | Max sessions to return. |
order | string | Sort order by updated time. |
parent_id | string | Filter by parent session id. |
project | string | Filter by project id. |
search | string | Substring to match in title or id. |
server | string | Server id. Omit when exactly one server is available. |
subpath | string | Filter by subpath. |
session_get
Get a session by ID from one server. Omit the server argument when exactly one server is available.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session id on that server. |
server | string | Server id. Omit when exactly one server is available. |
session_status
Get derived status for a session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session id on that server. |
server | string | Server 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.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session id on that server. |
cursor | string | Pagination cursor from previous page. |
limit | integer | Max messages to return. |
order | string | Sort order by updated time. |
server | string | Server id. Omit when exactly one server is available. |
type | string | Filter by message type. |
session_diff
Get structured diffs for a session turn. Returns only the diff; does not fetch messages or session details.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session id on that server. |
context | integer | Lines of context around changes. |
from | string | Starting turn id. |
server | string | Server id. Omit when exactly one server is available. |
to | string | Ending turn id. |
sessions_search
Search sessions across all available servers. Returns matching sessions with their ids, titles, and time.updated; no follow-up calls are needed for topic or recency questions. Omit the servers parameter to search every server; do not call servers_list first.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query. |
limit | integer | Max results per server. |
servers | array | Server ids to search. Omit to search all available servers. |
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.
| Parameter | Type | Description |
|---|---|---|
session_a * | string | First session id. |
session_b * | string | Second session id. |
server_a | string | First server id. Omit when exactly one server is available. |
server_b | string | Second 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.
| Parameter | Type | Description |
|---|---|---|
directory * | string | Working directory for the session. |
agent | string | Agent name to use. |
allowed | boolean | Allow write operations (gated). |
model | object | |
server | string | Server id. Omit when exactly one server is available. |
title | string | Session title. |
session_prompt
Prompt a session on one server. Omit the server argument when exactly one server is available.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Prompt text to send. |
session_id * | string | Session id on that server. |
allowed | boolean | Allow write operations (gated). |
server | string | Server id. Omit when exactly one server is available. |
wait_for | integer | Wait 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.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session id on that server. |
allowed | boolean | Allow write operations (gated). |
server | string | Server 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.
| Parameter | Type | Description |
|---|---|---|
delay * | string | When to fire: a duration like "30s", "5m", "1h", "90s", "2m30s" or an ISO timestamp like "2026-11-22T13:00:00". Max 1 hour. |
prompt * | string | Prompt text to send when the timer fires. |
session_id * | string | Session id on that server. |
allowed | boolean | Allow write operations (gated). |
server | string | Server id. Omit when exactly one server is available. |