MCP servers
$OSCAR_HOME/mcp.json:
{"servers": {"demo": {"command": "python3", "args": ["server.py"]}}}Servers start when first used; mcp_list shows their tools, mcp_call calls
one. Without the file the MCP tools are not registered. oscar mcp disable <name> switches one off without removing it ("enabled": false), oscar mcp enable <name> back on; a server's trust stays as it is (an untrusted
server's tools that do not say they only read ask a person every time).
Oscar as an MCP server
oscar mcp serve lets another MCP client (an editor, another agent) use
Oscar's sessions, over stdio:
{"mcpServers": {"oscar": {"command": "oscar", "args": ["--approve", "never", "mcp", "serve"]}}}Tools:
sessions_list— recent sessions (id, title, last activity, model, workspace, number of messages);querykeeps the matching ones.sessions_search— full-text search over every session's messages, the best match per session.session_messages— the latest messages of one session (by id, id prefix or title).session_send— a prompt to a session (or a new one), answered with Oscar's reply. Nobody can be asked over MCP, so the turn follows the unattended policy (unattended_approve, see approvals), never the approval mode of the chats: unset, what needs approval is refused unlessapprove = "auto"was chosen, and dangerous commands are always refused.
Everything returned is redacted like any reply. A prompt runs as a turn
nobody watches, in the session's own workspace: through the approval gate
with the configured mode (--approve sets it for the server), never asking
anyone — stdin is the protocol. Under auto what is not dangerous runs and
is written to the audit log; under smart the reviewer decides; under
never every call that needs approval is refused; dangerous commands are
always refused. With approvals ask, which needs a person at a terminal,
prompts are refused before they run (the list, search and read tools still
work). Calls that were refused are named after the reply. Logs go to
stderr; only the protocol is on stdout.
Read-only data sources
$OSCAR_HOME/sources.json:
{"sources": {"billing": {"base_url": "http://127.0.0.1:8080", "allow": ["/schema/"]}}}source_query reads allowed paths only and distinguishes "source
unavailable" from "no such record".
API server and editors
oscar api serve offers an OpenAI-compatible HTTP API and oscar acp the
Agent Client Protocol for editors such as Zed; see
API server and editors.
Harness protocol
oscar serve --jsonl speaks a JSON-lines protocol on stdin/stdout (task,
deltas, tool events, approval requests, result). A Pi adapter lives in
contrib/pi-adapter.