gori ships a built-in MCP (Model Context Protocol) server. It exposes the project as a set of tools, so any MCP-capable agent (Claude, Codex, Grok, and others) can read your traffic and drive the tools.
youFind an IDOR on the users API and log it.
→ list_history path~/v1/users status:200
← 14 flows, customer and admin tokens
→ send_request GET /v1/users/2 · customer token
← 200 {"id":2,"email":"other-tenant@example.com"}, not the caller's row
→ create_issue "IDOR on /v1/users/{id}" severity:high
✓ Issue logged; the request is saved as a Repeater session for repro.
gori mcp
The server speaks JSON-RPC 2.0 over stdio. STDOUT carries the protocol and STDERR carries logs. Tool results include both backward-compatible text and MCP structuredContent when the payload is JSON.
Choosing a Project
cd /path/to/my-repository && gori mcp # path-binds this Git workspace to its own gori project
gori mcp --project my-engagement # serve a named project's database
gori mcp --db /path/to/project.db # serve a specific database file
gori mcp --workspace /path/to/dir # path-bind any directory, Git or not, to its own project
gori mcp --use-active-project # explicitly serve the active TUI/MRU project
gori mcp --no-project # force unbound even inside a Git workspace
With no explicit selector, gori discovers the nearest Git root and binds its canonical path to an isolated project. The binding prevents two repositories with the same directory name from sharing a database. --workspace DIR makes the same binding for a directory you name, whether or not it is a Git repository and wherever the client starts the server (see Running from a host app).
Outside a Git workspace (the common case when an AI client spawns MCP from a home or app directory), the server starts unbound. The MCP handshake and tool list succeed immediately, but traffic tools (list_history, send_request, …) return NO_PROJECT until the agent calls list_projects, create_project (auto-binds when unbound), or switch_project. Unbound mode never opens the active TUI or MRU project on its own. Pass --use-active-project for that (or --project / --db / --workspace / GORI_MCP_PROJECT / GORI_MCP_DB).
A few tool families never need a project and work unbound: project management (project_info, list_projects, create_project, switch_project, delete_project, export_project, import_project, diff_projects), the pure-compute helpers (decode, jwt_*, cookie_*, sequence_analyze), the query-language reference (ql_reference, ql_explain), the global wordlist catalog (list_wordlists, get_wordlist, save_wordlist, rename_wordlist, delete_wordlist), and the ad-hoc OAST listener (oast_presets, oast_payload, oast_start, oast_stop, oast_poll). Everything else, including the persisted oast_resume / oast_release, answers NO_PROJECT until one is bound.
If the selected project cannot be opened (a database that is missing, corrupt, or unreadable, a project name that no longer exists), the server still completes the handshake and starts unbound rather than exiting. The reason is written to stderr, repeated in the handshake instructions, returned with every NO_PROJECT tool error, and reported as bind_error by project_info, so the agent can call list_projects and switch_project to recover without a restart.
When the profile exposes project_info, call it before using data. It reports bound, the selected project, database path, workspace root, selection source, the full project description (engagement guidance saved during setup), and the project's tags. If a description exists and project_info is advertised, the handshake instructions tell the agent to read it before acting. The text is read live, not cached in the instructions.
switch_project and an auto-binding create_project also return description, or null if none is set. These receipts cap it at 2,000 characters. A truncated receipt sets description_truncated:true. It points the agent to project_info via description_next_call when that tool is advertised, or asks the agent to get the full text from the operator. A create_project that does not rebind omits these fields. Every non-null description comes with description_note: it is guidance written for this engagement by whoever set the project up, not an authorization. Scope, the Sandbox and the server's permissions still decide what is sent.
The project named in instructions is the one bound at the handshake. That text is sent once and never updated, so after a switch_project it still describes the old binding while every later call reads and writes the new project. project_info reports the current binding. switch_project (and create_project when it auto-binds) returns the same correction in their result, alongside previous_project, the binding they moved off.
Read-Only Mode
By default the server also exposes action tools that send live requests and write issues. To expose only the read tools (safe for handing a project to an untrusted agent), start it read-only:
gori mcp --read-only
A read-only server also keeps no writer. It never writes the project it serves and runs no background indexing, so it does not contend with a TUI capturing into the same project (SQLite allows a single writer). The exception is a database written by an older gori, which is migrated on open because this build cannot read it otherwise.
A default (actions-on) server still has a writer (send_request and create_issue need one), but it does not idle-index. Free-text search drains the backlog on demand. The capturing TUI keeps the index current in the background.
Free-text search (body:) reads an index built off the capture commit, and a read-only server cannot build it. If flows are still waiting to be indexed, such a query is refused with FTS_BACKLOG instead of being answered from a partial index. Open the project in gori, or drop --read-only, to drain it.
Permissions from Preferences
--read-only is decided where the agent is installed. For a switch you flip from gori itself, Settings → AI → MCP permissions has one row per group of tools, each on, ask or off, all on by default:
| Group | What turning it off withholds |
|---|---|
| Send traffic | Every tool that dials a target or an OAST server, with the pollers of the jobs they start: send_request, send_websocket, ws_session_*, ws_inject, race_requests, timing_requests, fuzz_*, mine_*, discover_*, authorize_*, sequence_* (not sequence_analyze), run_retest, minimize_repeater, cache_deception_check, grpc_reflect, refresh_session_slot, oast_* (not oast_presets), list_jobs / get_job / stop_job, probe_scan with active:true, graphql_schema with send:true, and set_probe_mode raised to active or aggressive |
| Intercept control | intercept_forward, intercept_forward_edit, intercept_drop, intercept_toggle, intercept_set_filter, intercept_set_direction |
| Edit project data | Every other in-project write: issues, notes, repeaters, rules, env, host overrides, session slots, evidence, links, views, saved wordlists (save_wordlist, rename_wordlist, delete_wordlist: the global catalog, not a project record), probe scans and triage (a passive probe_scan records what it finds), writing an OpenAPI document to a file (export_openapi with output_path; the inline document is never switched off), JavaScript endpoint scans (scan_js_endpoints stores what it reads and sends nothing), and deleting flows or history |
| Change scope & sandbox | add_scope_rule, update_scope_rule, delete_scope_rule, set_scope_enabled, set_sandbox; list_scope stays served |
| Manage projects | create_project, switch_project, delete_project, import_project, export_project |
| Run local commands | No tool, only the calls that would make gori run a program on this machine: create_rule / update_rule leaving a pipe rule, set_rule_enabled turning one on, create_probe_rule / update_probe_rule with match_kind: exec and set_probe_rule_enabled turning such a rule on, mine_start with a hook, and fuzz_start whose ¦chain has an exec: step (directly or inside a saved chain). It adds to the tool's own group, so Edit project data or Send traffic off still refuses those tools |
The read tools and operator_messages / reply_to_operator belong to no group and are always served. A tool in a group that is off is absent from tools/list and refused with TOOL_DISABLED if called anyway, and the handshake instructions tell the agent which groups you turned off. The switches compose with --read-only and --tools. A tool is served only when all three allow it. They are read when a gori mcp process starts, so an agent already running keeps the tools it was given until its server is started again. If that start cannot read the settings file, every group is off.
Ask keeps a group's tools listed and asks you before each call runs. The call returns APPROVAL_PENDING with an approval_id at once, and gori shows an approval card on the ask: chip, built from gori's own facts (the tool and, for a send, the host and port it dials). Answer it there. Allow once lets that exact call (same tool and arguments) run on its retry, Always (this server) lets the group through until that gori mcp process exits, and Deny refuses the retry with TOOL_DISABLED. A send from send_request, send_websocket, ws_session_*, ws_inject, race_requests, timing_requests, fuzz_start, mine_start, sequence_start, minimize_repeater, cache_deception_check or grpc_reflect is asked about per host instead, with Always this host and Always host:port. Those grants are saved in the project and survive a restart. They are dropped when the project is imported from an archive, and a host's grants are dropped whenever a host override for it is added, changed or removed. The sandbox, and an exclude rule for a sweep, still stop a granted host. Pollers and stops (fuzz_status, stop_job, oast_poll, …) never ask. The answer reaches the agent as an operator message with in_reply_to set to the approval id, and the agent retries the same call. Nothing blocks, so other calls keep working meanwhile. An unanswered card expires after 30 minutes and the next retry asks again. Ask needs a bound project the server can write to. Without one, the call is refused with TOOL_DISABLED.
A group gates tools, and more than one group can put bytes on the wire. With Intercept control on, an agent can still forward a held request it has edited, and those bytes reach the target even with Send traffic off. Turn both off to keep an agent's bytes away from the target. Change scope & sandbox off stops an agent editing the scope, but a send with allow_unscoped:true still reaches a target the rules do not cover (the sandbox still blocks it). Turn off Send traffic too if that matters, or set Change scope & sandbox to ask, so the waiver waits for your approval of the host. Two other switches can change where a request lands: host overrides (Edit project data) remap an in-scope hostname to another address, and Manage projects lets the agent bind a project with a different scope and sandbox.
Features from Preferences
Settings → AI → MCP features narrows the catalogue by workbench tab instead of by capability. It has one checkbox per tab (Target, Intercept, Repeater, Fuzzer, Miner, OAST, Sequencer, Decoder, JWT, Cookie, Comparer, Rewriter, Colormarker, Probe, Authorize, Issues, Evidence, Notes), all on by default. Unchecking a tab hides that tab's tools from tools/list, reads and writes alike, and refuses them with TOOL_DISABLED if called anyway. The handshake instructions name the tabs you turned off. Core tools belong to no tab and are always served: History and flow reading, QL, saved views, projects, scope, env, host overrides, session slots, wordlists, the GraphQL and gRPC schema tools, list_jobs / get_job / stop_job, links, and the operator channel.
A tool is served only when --tools, --read-only, MCP permissions and MCP features all allow it, so a feature switch never turns on a tool another gate withholds. Like the permissions, the switches are read when a gori mcp process starts. If that start cannot read the settings file, every tab is off and only the core tools are served.
Choosing Which Tools Are Exposed
A gori mcp you start by hand advertises every tool, so an agent can reach the workbench without a restart. An entry written by --install-* serves @recon unless you pass --tools, and --tools='*' installs every tool. The cost of the full catalogue is context. A client loads the full catalogue into the model's context before the first question and keeps it for the session. Every start logs how many tools it serves and how large tools/list is. For a client with a tight context budget, start from a profile:
| Start with | Tools | tools/list |
Tokens | For |
|---|---|---|---|---|
gori mcp |
202 | ~202 KB | ~52k | Everything (the default when run by hand) |
--read-only |
66 | ~57 KB | ~15k | Read tools and pure compute; no live requests |
--tools=@analysis |
5 | ~8 KB | ~2k | Analyze one bound capture; no project switching or TUI mailbox |
--tools=@recon |
39 | ~47 KB | ~12k | Read and map the capture, scan it passively, replay a request, record issues and notes (the --install-* default) |
--tools=@recon --read-only |
29 | ~34 KB | ~9k | @recon minus what --read-only disables |
--tools=@minimal |
18 | ~22 KB | ~6k | Read History, flows and the current TUI context; talk to the operator |
Tokens are bytes ÷ 4, a rough rule for JSON. The actual count depends on your client's tokenizer.
For headless capture analysis, use gori mcp --db capture.db --tools=@analysis.
This five-tool profile needs a project bound at startup. It has no project picker or operator
mailbox. @minimal also supports interactive TUI context and operator messages.
For bulk extraction, ask list_history for columns (for example
["rid=header:X-Request-Id", "body=jsonpath:$"]) instead of fetching every flow separately.
Add fields: [] for context and columns only, or fields: ["url", "status"] for selected
metadata. Identity, state, provenance, advisories, errors and requested columns always remain,
and has_more and cursors keep their usual meaning. Omit fields for the full row shape.
Which one to start from. The agent eval in eval/ measures the profiles against each other on capture-analysis tasks: read, filter, count and correlate captured flows. Across Sonnet and Haiku the profile did not measurably change whether a task was answered, but it changed the cost. The full catalogue took a median 3.5–4× the input tokens of @minimal for the same answer (1.7–5.5× by task; --read-only about 1.6×, @recon about 1.4×). The catalogue is re-sent on every turn, so the absolute gap grows with every call, and a smaller model makes more of them. For an agent that reads and maps a capture, start from --tools=@recon --read-only, or @minimal when it only reads History and flows. @recon alone adds a replay and issue and note writes. Keep the full catalogue for an agent that drives the workbench (fuzz, discover, authorize, sequence), which the eval does not measure yet.
| Profile | Tools |
|---|---|
@analysis |
ql_reference, ql_explain, list_history, get_flow, get_response_body_chunk |
@minimal |
project_info, list_projects, switch_project, create_project, ql_reference, ql_explain, list_history, get_flow, get_response_body_chunk, get_current_context, get_repeater_context, get_issue, list_sitemap, intercept_get, intercept_list, operator_messages, reply_to_operator, ask_operator |
@recon |
@minimal, plus list_scope, list_params, list_js_endpoints, scan_js_endpoints, compare_flows, list_env, decode, jwt_decode, jwt_verify, probe_scan (passive only), probe_issues, probe_promote, probe_dismiss, list_issues, list_notes, get_note, send_request, create_issue, update_issue, create_note, update_note |
A profile is a fixed list of names, so a later gori that adds a list_* tool does not grow @recon. Both keep switch_project and create_project, so they work on an unbound start, even on a machine with no project yet.
@recon serves probe_scan passive only. Its active, allow_unscoped, unsafe, aggressive and insecure arguments are left out of the schema, and a call that sets one is refused with TOOL_DISABLED. Name the tool in the spec (--tools='@recon,probe_scan') to serve the full tool.
--tools takes a comma-separated list of tool names, * globs and @profiles, applied left to right. A term prefixed with - subtracts:
gori mcp --tools=@recon # a profile
gori mcp --tools='@minimal,send_request' # a profile plus one tool
gori mcp --tools='@recon,-send_request' # a profile minus one
gori mcp --tools='-fuzz_*,-mine_*,-discover_*,-sequence_*' # everything but the async workbench
Because the tools are named in prefix families (list_*, intercept_*, fuzz_*, oast_*), a glob selects a group. A spec that starts with a subtraction begins from every tool, so it keeps working when a later gori adds one.
Tools that document a required follow-up (async job status/results/stop, flow paging) bring those companions into the catalogue automatically, transitively. If a later subtraction excludes a required companion while keeping its parent, startup refuses the conflicting filter. Add the companion again after the subtraction or remove the parent. Conditional live-intercept readers honor exclusions. If intercept_get is hidden but intercept_list is served, get_current_context points to its preview and metadata while noting that full detail is unavailable. If both are hidden, it says the held item cannot be read through this server, and neither reader is restored.
A narrow spec can also leave the server with no way to pick a project. If it starts unbound (outside a Git workspace, with --no-project, or because the configured database would not open) and the spec keeps neither switch_project nor create_project, nothing the agent calls can bind one. list_projects lists projects but binds none. gori warns at startup, and the NO_PROJECT errors say so too without naming tools that are not there. Keep switch_project in the spec, or pass --project/--db.
The opposite need, a server that must stay on one project, is --pin-project. It withholds every tool that rebinds the server or reads another project (list_projects, switch_project, create_project, delete_project, import_project, export_project, diff_projects), in addition to what --tools and --read-only narrow. --read-only alone leaves switch_project working. Pinning does not restrict the filesystem. A tool that reads a path you give it (import_flows, a wordlist file) can still read any file the server can. A pinned start that ends up with no project (--no-project, outside a workspace, or a database that will not open) aborts.
A pattern or profile that matches nothing aborts at startup with a suggestion (--tools: "list_hisotry" matches no tool — did you mean list_history?) instead of serving a smaller set. Tools left out are absent from tools/list and refused if called anyway, naming the flag that hid them. --tools composes with --read-only, and like every other flag it is written into the command when you pass it alongside --install-*. Without it the installed command gets --tools=@recon.
Seeing an Agent From the TUI
While an MCP server is bound to a project, gori shows it. In the project picker the project's row carries an mcp mark (mcp×2 for more than one), and once the project is open a clickable mcp:<client> chip appears on the top bar. Click it, or run app.agents from the command palette, to open a card listing every attached agent: its name, version, pid, when it connected, and whether it is read-only. The name comes from the client's clientInfo handshake, and a server started with --read-only shows as read-only there. A row disappears when its process exits.
Installing Into an Agent
gori can write the MCP configuration for common clients for you:
| Flag | Client | Config written |
|---|---|---|
--install-claude |
Claude Desktop | claude_desktop_config.json in the platform's app-config directory (see below) |
--install-claude-code |
Claude Code | ~/.claude.json (mcpServers.gori), or $CLAUDE_CONFIG_DIR |
--install-codex |
OpenAI Codex | ~/.codex/config.toml ([mcp_servers.gori]), or $CODEX_HOME |
--install-agy |
Antigravity (CLI, App, IDE) | ~/.gemini/config/mcp_config.json (mcpServers.gori) |
--install-grok |
Grok | ~/.grok/config.toml ([mcp_servers.gori]) |
--install-hermes |
Hermes | ~/.hermes/config.yaml (mcp_servers.gori), or $HERMES_HOME |
--install-pi |
Pi | ~/.pi/agent/mcp.json (mcpServers.gori), or $PI_CODING_AGENT_DIR |
Pi requires an MCP adapter such as pi-mcp-adapter. Install it with pi install npm:pi-mcp-adapter, then restart Pi. --install-pi writes the MCP server configuration.
Every client except Claude Desktop and Hermes keeps its config in the same place on macOS, Linux and Windows. Hermes reads $HERMES_HOME when it is set, and otherwise ~/.hermes (%LOCALAPPDATA%\hermes on Windows). Claude Desktop follows Electron's app-data directory instead: ~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows, and $XDG_CONFIG_HOME/Claude/ (defaulting to ~/.config/Claude/) on Linux. gori reads that variable, so a Nix or home-manager session that moves it is followed too.
The exception is a Flatpak Claude Desktop. It reads XDG_CONFIG_HOME from inside its own sandbox (~/.var/app/<app-id>/config/Claude/), which the host shell running gori cannot see. There gori writes ~/.config/Claude/claude_desktop_config.json and prints that path. Copy the file into the app's sandbox directory yourself. Every install command prints the file it wrote, so check that line against where your build reads.
gori mcp --install-claude-code
gori mcp --install-codex
gori mcp --install-grok
gori mcp --install-hermes
gori mcp --install-pi
gori mcp --install-claude-code --install-codex # several clients in one run
Codex and Grok use TOML with an [mcp_servers.gori] table, and Hermes uses YAML with an mcp_servers: entry. The other clients use JSON. Restart the client (or re-open the session) after installing so it reloads MCP servers. The TOML table also sets tool_timeout_sec = 600, and --install-agy sets timeoutSeconds: 600 (Antigravity defaults to 180 seconds per tool call, and Codex cancels after 60 seconds; Grok reads the same TOML key), so long synchronous tools such as minimize_repeater or an active probe_scan are not cut off early. A timeout already set there (and Antigravity's per-tool tools overrides such as eager) is kept on a re-install. Existing config files are updated in place. Other servers, tables and comments are preserved, the file's permissions are kept, and the replacement is atomic, so an interrupted install cannot truncate it. gori edits the TOML and YAML files as text, so the comments around your own settings survive the install. A JSON config, which holds no comments, is parsed and written back with its other keys kept. A config gori cannot splice safely is reported and left unchanged.
If a client starts MCP outside your repository directory, the server starts unbound and the agent can pick or create a project over tools. To pin a fixed engagement at install time instead, pass a selector, for example gori mcp --project my-engagement --install-codex.
Every flag you pass alongside --install-* is written into the installed command: selectors (--project, --db, --workspace, --no-project, --use-active-project), --read-only, --tools, --pin-project, --insecure-upstream, and --config. With no --tools, the command gets --tools=@recon and the install says so; pass --tools='*' for every tool. Paths are made absolute, because the client spawns the server from a working directory you did not choose.
Running From a Host App
An app that starts agent sessions itself, such as a control center, an editor plugin or a CI runner, can give each engagement one gori project and use it without anyone picking anything. This section is the contract such a host can rely on: the flags, files and JSON fields named here are kept stable, and new ones are added beside them rather than renamed.
The project
gori mcp --workspace=/path/to/engagement --pin-project --tools=@recon
--workspace=DIRbinds DIR by its canonical path. The first start creates the project, named after DIR's basename, and every later start serves the same one, whatever directory the agent runs in. Renaming the project keeps the binding. A directory that does not exist is refused: the server starts unbound with the reason, or exits 1 under--pin-project.--workspacecannot be combined with--db,--project,--use-active-projector--no-project.- To find the project's database for the
gori runcommands below, rungori run project list --query=DIR --format jsonand take the row whoseworkspaceis DIR's canonical path (the query is a substring match). It carriesdb_pathandid. Pass--db=<db_path>to every command. - The project lives in
$GORI_HOME/projects/like any other, so the operator opens it from the TUI's project picker, whose search also matches the bound path. The TUI, a capture and any number of MCP servers can have it open at once. Nothing is written into DIR. --pin-projectkeeps the agent on that project.--toolssets how much of the model's context the catalogue takes, and the startup log reports the count and size.--read-onlyremoves the action tools.
Capturing the agents' own traffic
One capture per project, started and stopped by the host:
gori run capture --db=DB -p 0 -l 127.0.0.1 --format=jsonl --ready-file=/tmp/run/gori-ready.json
-p 0picks a free port. Once the listener is up,--ready-fileholds{"host","port","listening","ca","pid","db","applied_generation"}, written atomically. Delete it before starting and wait for it to appear. STDOUT streams one JSON object per finished flow.- Stop it with SIGTERM (or SIGINT, or SIGHUP). It releases held requests, closes pending flows and removes the ready file and the project's capture status. It exits
130, or129for SIGHUP. After SIGKILL both files remain and the next capture overwrites them, so checkpidbefore trusting an old ready file. - So that a host that crashes or is SIGKILLed does not leave the capture running, pass
--parent-pid=$HOST_PID(checked every second), or keep a pipe to the capture's STDIN open and pass--exit-on-stdin-close(it stops as soon as that pipe closes). Either way it stops as on SIGTERM, removes both files, writes one STDERR line saying why and exits4. Without a flag a capture does neither, so the operator's interactive one is unaffected. A capture whose STDOUT reader goes away stops the same way on the next flow it would print and exits141. - Read STDOUT for as long as the capture runs. A reader that stops reading does not slow the proxy, but flows that arrive while the stream is backed up past its buffer are left out of it (History keeps every one), and a capture stopped with its STDOUT full takes about two seconds longer to exit.
- If the project is already being captured (the operator's TUI, say),
gori run captureexits 1 withgori: not capturing — … close that instance first.gori run shell --db=DB --printsucceeds only while a capture is live, so a host can check first and reuse the running one. - Scope, Sandbox and bypass edits made while it runs (by the CLI, MCP or the TUI) apply within two seconds. To know when, read the
generationthatscope sync(orscope --format json) prints, then wait until the capture'sapplied_generation, in the ready file and in the project's.capture.status, is at least that. Both files are rewritten atomically each time a reload installs a newer generation. A change made by a gori older than 0.10.1 is applied but does not move the generation.
The environment for each child
gori run shell --db=DB --print --format json --client=session-42
prints the variables to set and unset for a child process (set, unset), with the proxy (proxy, carrying the client tag as its login), the CA bundle (ca_bundle: the system roots plus gori's root, under $GORI_HOME/shell/), gori's root alone (ca_cert), and what the variables cannot reach (not_covered: Go before 1.27 on macOS, Go and loopback, Node without NODE_USE_ENV_PROXY, Java, certifi-pinned libraries). The text form is the same as export lines plus GORI_SHELL_ORIG_* records an interactive gori shell uses to put the terminal's own variables back. Those records copy the variables verbatim (an inherited HTTPS_PROXY with a password, say), so a host builds each child's environment from the JSON set and unset, which leave them out, not by applying the export lines. Set these on the commands an agent runs. If they are set on the agent process itself, its own model API calls go through gori too: put those hosts on the bypass list (below).
unset always lists NO_PROXY and no_proxy, so that local targets are captured too. Everything the child sends then goes through gori, its loopback traffic included: a local model gateway, a language server, the host's own local API. A host that must keep such traffic out of the capture sets its own NO_PROXY in the child after applying set/unset (for example NO_PROXY=127.0.0.1,localhost,::1), and remembers that Go never proxies loopback anyway.
Telling sessions apart
Every flow a client sends is tagged with the username of its proxy login: HTTPS_PROXY=http://session-42:x@127.0.0.1:PORT (what --client writes). The tag is client_tag in gori run history --format json, capture jsonl, MCP list_history and get_flow, and _goriClientTag in HAR. Filter with client:session-42. The password is never read, and the Proxy-Authorization header is removed before the request is forwarded or stored. A tag is 1 to 64 of A-Z a-z 0-9 . _ -.
Scope and the Sandbox
The scope is a JSON document, the same one gori run project scope --format json prints:
{"sandbox": true,
"rules": [{"kind": "include", "type": "host", "pattern": "*.shop.acme.test"},
{"kind": "include", "type": "regex", "pattern": "^https://api\\.acme\\.test:8443/"},
{"kind": "exclude", "type": "string", "pattern": "https://shop.acme.test/admin"}],
"bypass_hosts": ["api.anthropic.com", "*.openai.com"]}
gori run project scope sync --db=DB --from scope.json makes each section the document names exactly so, in one transaction, and a second run changes nothing. A section the document leaves out is left as it is: {"bypass_hosts": ["api.anthropic.com"]} changes the bypass list and nothing else, and keeps the rules as they are at that moment, an edit the operator just made included, so a host never needs to read, modify and write back the whole scope. "rules": [] is present and empty, and clears the rules. A document that names no section is refused. --dry-run shows the change first, and --format json reports {"changed","dry_run","added","removed","enabled","sandbox","bypass_hosts","generation","scope"} (scope, the listing after the write, is absent under --dry-run; generation is the scope generation after the write). A document with a rule scope add would refuse, a key this gori does not know, a field of the wrong JSON type ("kind": null, "type": 7, an id or generation that is not an integer), or a bypass entry an exclude names (below) is refused whole (exit 1) and changes nothing. With "sandbox": true the proxy forwards only what the scope allows:
- A blocked HTTP/1.1 request gets
403 Forbidden,X-Gori-Sandbox: blockedand a one-line body naming the URL, or, when it was refused for itsHostheader, naming that header (the Host header other.test (on a request to http://in-scope.test/)). ACONNECTto a host or port no rule could admit gets the same 403 before any tunnel opens. On HTTP/2 the stream is reset. - A host rule (
acme.test,*.acme.test) admits the host on every port. A string or regex include that names a port admits that port only. The scheme's default port written out (http://h:80/,^https://h:443/) means that default port. - Case: host names compare in lowercase for every rule type (a regex reads the URL with its scheme and host lowercased). A path keeps its case for a regex include, so
^https://h/app/does not admit/APP/; write(?i:…)if the origin folds case. A regex exclude, like a string rule of either kind, compares case-insensitively, so/APP/PRIVATEcannot dodge an exclude for/app/private. See the table in Sandbox. - An include that names its origin admits that origin only: a string that starts with
scheme://hostmatches as a prefix of the URL, and it and a regex anchored as^https?://host/(or^https?://host:PORT/) admit that host, and that port when they name one. A path string (/api/) and an unanchored regex (api\.acme\.test/) match wherever their text appears, on any host and in the query too, so write the origin into every include the Sandbox enforces. - A request is judged under the
Hostheader it carries as well as the host gori dials (as HTTP/2 is under:authority), so aHost: other.teston an in-scope address is refused. - No packet goes to a host before a request on it is in scope. A host that only a path rule with no origin in it (
/api/) might admit is never dialled before a request passes, and stays on HTTP/1.1. Write rules with their origin (https://host/path,^https://host/) to keep h2 there. A blind relay (a TLS-passthrough host, aCONNECTgori does not decrypt) is allowed only to a host a host rule admits with no url-level exclude on it. - Each request is also judged the way an origin might resolve it. An exclude that matches any of these spellings blocks it: dot segments (
/app/../admin,%2e%2e), empty segments (//),;parameters (..;), backslashes, every percent-escape decoded up to twice (..%2Fadmin,..%5Cadmin,%252e%252e), a#read as a path character, userinfo, an explicit default port, letter case, a trailing dot, IDN in punycode, and an IPv4 address in any spelling ([::ffff:10.0.0.5],167772165,0x0a000005,10.5). An include must admit the path as sent and as resolved (in its own spelling or folded), and as decoded when decoding exposes... A%2Finside an included path is admitted as before. See Sandbox. - With no include rule the sandbox blocks everything, and
scope syncwarns.
Bypass hosts
bypass_hosts names traffic a host's own tools must keep, typically an agent CLI's model API. A CONNECT to a bypass host is relayed as an opaque tunnel, before the Sandbox and instead of TLS interception: the client sees the origin's own certificate, and gori stores nothing about it. There is no flow, no header, no body and no count in the project. One log line per host says it was relayed: in gori.log under the TUI, and on STDERR under gori run capture. An entry is an exact host (api.anthropic.com matches that name only) or *.domain (subdomains only, not the domain), on port 443 unless it names another (gateway.example.test:8443), with no regex or path, so a target cannot slip onto the list through a loose pattern. A *. entry under a registry's second level (*.co.uk, *.com.au) or a shared hosting suffix whose subdomains are other people's sites (*.cloudfront.net, *.amazonaws.com, *.github.io, …) is refused: list the exact hosts there. A bypass tunnel is dialled by the CONNECT host's own name, never through a host override. An exclude wins over a bypass entry: scope sync refuses a list that would relay a host an exclude names (a host exclude, or a string or regex exclude pinned to that host), naming both, and a host an exclude names is never relayed blind even from a list set before this check existed. Only the forward proxy's CONNECT is bypassed. A plain-HTTP request to a bypass host is captured and gated like any other, headers and API key included, so point every model provider at its https:// endpoint. A project import drops the archive's bypass list and says so, so the list only ever comes from scope sync on this machine. gori run project scope lists the entries (bypass_hosts under --format json), so a host can show them to the person. The TUI does not show the list yet.
Evidence and retest
- The exact bytes of a flow:
gori run show ID --db=DB --format=raw(orhar,json). Bodies are stored up to 2 MiB a side. Flow ids are pruned by retention (100,000 flows by default) and byhistory clear. - A copy that survives:
gori run issues create -t TITLE --flow=ID --format json, thengori run evidence freeze --issue=N --ref=flow --ref-id=ID --format json, which stores the exchange with a SHA-256 per message. - A retest:
gori run repeater create --flow=ID,gori run retest add --issue=N --repeater=R --assert=status:2xx, thengori run retest run --issue=N --format json, which prints averdict(pass,fail, …) and exits 0 only on a pass.
Install, version, uninstall
- A first start on a fresh machine asks nothing and makes no network call.
gori mcpcreates$GORI_HOME(~/.gori) with emptyprojects/,wordlists/andprotos/directories. The CA is created by the first capture. STDOUT ofgori mcpcarries only JSON-RPC; logs go to STDERR. - Mixed versions: the first gori 0.10.0 to open a project migrates its database (schema V55), and an older gori refuses that database from then on. Every gori that opens the project must be 0.10.0 or later, including a
gori mcpan agent's config still points at an older install. gori --versionprintsgori X.Y.Z.gori mcp --help,gori run capture --help,gori run shell --helpandgori run project scope --helplist the flags the binary accepts, so a host can check for--workspace=DIR,--ready-file,--parent-pid,--clientandsyncbefore using them. An unknown flag exits 1 withunknown optionon STDERR.- Everything gori keeps is under
$GORI_HOME:settings.json, the CA inca/, captured traffic inprojects/, CA bundles inshell/, and logs. Deleting the binary leaves it, which is what an uninstall should do: the traffic and the CA the operator trusted are theirs.gori run project deleteremoves one project, andgori run project pruneremoves the empty ones whose bound directory is gone.
Tools
Read tools (available under --read-only, except these five: scan_js_endpoints, oast_payload, oast_poll, reply_to_operator, and ask_operator):
Where two tools name one object differently, both spellings are accepted: flow_id for id on get_flow / delete_flow, repeater_id for id on the repeater tools (and id for repeater_id on minimize_repeater), enabled for enable on intercept_toggle. Each limit states its default and maximum in the schema (default, minimum, maximum). A list reply is also held to about 40 KB of rows. A page can end before limit with cut_by: "bytes" and has_more: true, and its usual cursor (next_before_id, next_since, next_cursor, or next_offset, which an offset-paged list gives as the offset to pass next and sets to null at the end) picks up where it stopped. An ids set that does not fit returns the rest as remaining_ids, and a binary get_response_body_chunk page stops at 48 KB so its base64 fits. A list that is never paged names what did not fit by id (authorize_results bypasses_unshown_ids, the authorize_* skipped_unshown_ids / failed_unshown_ids, diff_projects issues_unshown_ids), and one with no cursor says truncated (probe_scan, list_sitemap's unrequested). oast_poll returns the callbacks that fit and keeps the rest for the next poll (has_more). A single document has its own limit. export_openapi inlines up to 40 KB by default and writes a larger one with output_path, and a compare_flows diff keeps its own 256 KB cap and says truncated.
A poll that would come back empty can wait instead. list_history with since, list_events, operator_messages, the *_status tools, get_job and ws_session_send take wait_ms (at most 30000). An empty page is held until a new row arrives, and a running job until it ends (for a ws_* session, until a reply past after, and on ws_session_send until the first server message). The call returns as soon as that happens, and when the time runs out it returns the empty page or the running status as usual. Flows are written by the gori that captures them, often another process, so the wait re-checks the project every 100 ms. The server runs one call at a time, so a wait holds the calls behind it. Cancelling the call ends the wait.
| Tool | Purpose |
|---|---|
list_history |
List flows newest-first, with optional QL and pagination. Every row carries source (proxy for traffic a client sent, repeater for a send_request (including your own, which records by default), discover, import, …), so a flow gori made is never read back as evidence about the target. Filter with src:. Each row (and get_flow) also carries url, the scheme, host, port and target joined as History shows them, ready for send_request{url}. Pass columns (the same [LABEL=][req|res:]kind:selector specs gori run ls --column takes) to carry an extracted value per row (a header, a JSON field, a regex capture) under a columns object, the values QL can filter on (see columns). Opt-in, since it costs a read per row. hide_static:true leaves out static assets (images, fonts, audio/video), the TUI's hide-static lens (-static:true), and list_sitemap and list_params take it too. Pass ids to fetch a given set in one call (the rows get_current_context reports as selection.ids), returned in the order asked for; limit and the two cursors do not apply, an id with no row comes back in missing_ids, and anything query excluded comes back in filtered_out_ids. count_only:true answers {count}, how many flows the same filters match, with no rows, instead of paging through them; ids, the cursors and columns are refused beside it. sort:"slowest" or "largest" returns the top limit matches by duration or total bytes (request + response, the row's size) (order: "slowest_first"), with no cursor; the cursors, ids and count_only are refused beside it. A query term gori cannot read (status:abc) is dropped, which broadens the answer, so the reply names it in ignored_terms (every query tool does) and strict:true refuses the query instead. count_only refuses it by default, since the count is the only answer; pass strict:false to count the broader query |
list_events |
Tail an append-only feed of job lifecycle and agent activity, by forward cursor. It never duplicates flow rows. Every event carries actor, the surface that acted (tui / cli / mcp), so an agent can tell its own writes from the operator's. An agent action also carries actor_label, the client's name and pid, to tell two agents apart. Config changes are recorded whoever makes them. The human reads the same feed on the Project → Activity pane |
operator_messages |
What the operator typed for you in the gori TUI ("Tell the agent…"), addressed to this session or to all attached agents, forward-cursored. gori delivers these live when it can (a peer note in Claude Code, a codex queue hand-off in Codex, a channel event) and attaches any still pending to your next tool result. Every agent has this fallback, so call it at the start of a turn. Marks what it returns as delivered so the operator's ring can say "picked up" |
reply_to_operator |
Answer the operator in gori: summary is one line for the notification ring and Miss Ring's bubble, detail the long form the ring opens on ↵, level its colour, in_reply_to the operator message it answers. The reply reaches the operator in gori as a notification, live while a gori TUI is open on the project, otherwise summarized in one note when one next opens |
ask_operator |
Put a decision to the operator as a choice card in gori: question is one line, choices two to four labels, detail optional context, default the choice the card starts on, expires_in_minutes how long it waits (30 by default). Returns at once with the question's id; the answer comes back later as an operator message with in_reply_to set to that id and outcome answered, dismissed or expired, by every route operator_messages covers. The result carries tui like reply_to_operator |
list_views |
The project's History views: named QL queries list_history{view} applies as a lens, ANDed over query rather than replacing it. Seven built-ins (All, History, History + Repeater (the default), WebSocket, gRPC, SSE, Errors), then the global library, then the project's own; active marks the one the TUI is showing. It does not apply to list_history, which filters only by the view you pass it |
get_flow |
Full request + response for one flow. Credential header values read [REDACTED] unless include_sensitive; a Set-Cookie keeps its name and attributes (sid=[REDACTED]; Path=/; HttpOnly). Each body is inlined up to 8 KB by default; a longer one is cut with a more field naming the get_response_body_chunk call that pages the rest (body_mode:"full" inlines up to 64 KB). Bodies come back sanitized, with a body_redaction object, where a redaction profile is on by default, and there the default stays full, because get_response_body_chunk pages the unredacted stored bytes; include_sensitive:true turns that off along with the header redaction. A socket's ws_messages are the first 500; ws_query (ws:needle, ws~regex, as the QL ws: term) narrows them before that cap, and then count is the matched total and ws_total the socket's |
get_response_body_chunk |
Page through a body get_flow, send_request or get_repeater_context reported cut, up to 64 KiB a page: a flow's or Repeater session's response, decoded by default (raw:true for the wire bytes), or its request with part:"request". A body the capture cap cut says source_truncated; those bytes were never stored, so re-send instead of paging. find (a regex, as QL body~) returns {offset, length, snippet} matches from offset on instead of a page, over the same bytes, so each offset pages straight to its match; has_more/next_offset continue the search |
list_sitemap / list_sitemap_tags |
Distinct endpoints (host, method, path, plus the joined url; on a query-folded row it has no query string, and the concrete targets are in query_targets), 50 per page by default, and the tags placed on them. list_sitemap's query takes the Sitemap's tag: too, as the TUI tree does. Each entry carries sample_flow_id, one of its flows (the newest with a response, the one the TUI opens) to pass to get_flow; a query-folded entry stands for several targets, so it carries query_target_flow_ids instead, one per query_targets entry, and bare_target_flow_id when the path itself was also captured with no query string. An entry with a flow an active tool (Repeater, Fuzzer, Miner, Sequencer, Authorize, Probe, Retest) recorded in History, or with a saved fuzz run's results, carries touched_by (tool → count, per path without its query), and untested:true keeps only the entries with neither. A sweep that was neither recorded (record_history) nor saved (save_results) leaves nothing to count, and since testing shrinks the untested list, re-call it from offset 0 rather than paging |
list_js_endpoints / scan_js_endpoints |
Endpoints captured JavaScript references and no request reached, with the flow, line and literal each was read from; the scan reads new JS/HTML responses and sends nothing. list_sitemap adds them as unrequested with include_unrequested:true |
list_params |
Per-endpoint parameter inventory: every input name by location, with counts, sample values (credentials redacted) and whether a value is reflected in the response. Each row carries its scheme, host and port, and origin (http://127.0.0.1:19021) narrows to one of a host's services |
export_openapi |
The captured API as an OpenAPI 3.0.3 document, inline (a JSON object, or YAML with format:"yaml"): templated paths, parameters, inferred request and response schemas, servers and security schemes. origin narrows it to one scheme, host and port, as host narrows to a host. No credential values, and no examples unless examples:true (redacted). Capped by max_endpoints and max_bytes (40 KB inline by default), with truncated saying so. output_path writes the document to a file instead of the reply (refused under --read-only; not inside gori's home; overwrite:true replaces only an existing OpenAPI document). In the full catalogue only, because it would put @recon over its size budget |
list_issues / get_issue |
Read triaged issues. list_issues{format:"markdown"|"sarif"} exports the queried page through the same report exporters as the CLI; the default stays JSON |
probe_scan |
Rescan captured flows and Repeater tabs. Passive (zero requests) unless active:true, which needs write access and is scope-gated. persist:true also writes the findings into the triage list probe_issues reads, merged the way the live scanner merges them (refused under --read-only) |
probe_issues |
The Probe tab's persisted findings, as triage state (open by default) |
list_probe_rules |
Every scan rule (passive, active, custom), which are enabled, and the project's scan mode |
list_scope |
Current scope include/exclude rules |
list_links |
Evidence pointers from an issue or note to a flow, Repeater session, or job |
list_evidence / get_evidence |
Frozen evidence (immutable copies of an exchange with provenance, linked issues and SHA-256s: one issue's with issue_id, the whole project archive including orphans without it), and one copy's bytes (heads redacted unless include_sensitive, bodies capped like get_flow) |
list_retest_steps / list_retest_runs / get_retest_run |
An Issue's retest: the ordered Repeater sends that reproduce the finding, each resolved against the project, so the reply says what it will send and which steps change state (a step whose Repeater session was deleted reports ref_deleted: true and is never run, even if a new session later takes its id); the bounded run history (newest first); and one run's result table, each row keeping the History flow id of its own send |
get_issue (retest field) |
An issue with a retest carries a retest object beside links and evidence (the step count and the last run's verdict). Omitted on an issue without one |
compare_flows |
Line diff of two flows' request or response, with each side's status/size/time and the A→B delta; context:N folds the unchanged runs into {kind:fold,hidden} markers |
diff_projects |
Retest diff of two projects at endpoint scale: what is new, gone, or answering differently since the last engagement. Endpoints are keyed by the Sitemap's folded template, and removed (never requested in the newer capture) is a separate verdict from gone (asked, got 404/410) |
intercept_list / intercept_get |
Inspect the live intercept queue and one held item in full |
list_projects |
Find a gori project on this host: one page of them, most-recently-active first. query keeps the projects whose display name, directory slug, short id, bound workspace path or a tag contains it (#TAG keeps the ones with a tag starting with TAG), and each row carries its tags and its flows and issues counts (null when gori could not read that database, which is not the same as empty); limit/offset page (default 50, max 500), and only the page returned is counted. The project this server is serving is named beside the page (current_project), even when the listing is narrowed, and total_projects sits beside total so an empty match is not mistaken for an empty host |
list_notes / get_note |
Read project notes |
list_wordlists / get_wordlist |
The global wordlist catalog: named lists under GORI_HOME/wordlists, listed with name, size and modified time only. get_wordlist adds the path and a line count read over at most 32 MiB (lines_complete:false means the list is longer); its values come back only with include_values:true (max_lines, default 20, at most 200), since a list can be a credential list. Available with no project bound |
list_rule_presets |
The response-modification presets: named starting points that install ordinary Match & Replace rules (unhide hidden fields, enable disabled controls, remove maxlength, strip client-side validation, drop CSP / security headers, disable SRI). Each row names the rules it would install |
list_extract_rules |
The project's extract rules, the read half of a session binding: each observes a response and binds one $BIND.NAME in memory for a Match & Replace rule to inject |
list_color_rules / list_custom_colors |
The Colormarker rules in precedence order, and the global custom colours a rule's color can name. Display only; a colour rule never modifies traffic |
preview_color_rule |
How many recent flows a colour condition would match, and how many it would paint once the rules resolving ahead of it are counted. Takes scope, because a global candidate resolves before every project rule |
grpc_schema |
What .proto schema this project renders captured gRPC through, and where each piece came from: a descriptor-set file or a reflection fetch. Its reflections are every target the project has saved plus any this server fetched but could not save. Sends nothing |
graphql_schema |
A GraphQL endpoint's schema as compact SDL: root operations with their arguments and return types, then the types reachable from them (builtins omitted), with a name filter and a max_bytes cap. Reads a flow whose response is an introspection result and sends nothing; send:true re-sends the flow's request rewritten into the introspection query (the session's headers kept), scope-gated like send_request and refused under --read-only |
list_rules |
List the Match & Replace rules applied to the project in apply order: global rules first, then the project's own (scope filters to one) |
list_env |
Project env tokens and built-in generators available to substitution, as {syntax, prefix, example, vars, generators} (env values redacted; include_sensitive reveals them, except TOTP_SECRET). The three scalars say how to write a reference: syntax is this install's grammar (namespaced → $ENV.KEY, $BIND.NAME, and $GEN.UUID; bare → the legacy $KEY with no generators), prefix is the sigil, and example is the first two applied. Each vars row is keyed by the bare name and also carries length and, when the value already begins with one, scheme; each generators row carries the complete token and output format, plus unavailable with the reason when it cannot mint now ($GEN.TOTP with no TOTP_SECRET) |
list_host_overrides |
The host to IP dial map in force for this project |
list_session_slots |
The project's session slots (named identities, each a header overlay plus the extract rules whose bound values belong to it) and which one is ACTIVE (header values redacted) |
list_oast_providers |
Configured OAST providers and which one is active |
list_oast_sessions |
The project's persisted OAST listening sessions (payload host, hits, last poll), the rows oast_resume re-arms |
decode |
Run an encode/decode/hash/compress chain over input (pure transform; no network or state). A bare format name such as base64 decodes here |
jwt_decode / jwt_verify / jwt_encode / jwt_attacks |
Decode (a JWS or the protected header of an encrypted JWE), verify a signature against a key you hold, re-sign with HMAC or a PEM key, or generate attack payloads for a JWT (pure compute; available even under --read-only) |
jwt_crack |
Offline HS256/HS384/HS512 secret search: token, secrets array and/or wordlist (file path or saved name). Inline candidates first. Returns {found, secret?, tried}; cancellation stops between candidates and frees the server for the next call, with no response for the cancelled request. Refuses unsigned/asymmetric/JWE tokens. Available under --read-only, outside @recon |
cookie_decode / cookie_verify / cookie_crack / cookie_forge |
The Cookie workbench as pure offline compute: parse a Flask / Rack / Django signed session cookie, check it against a candidate secret, brute-force the secret over a wordlist, and re-sign an edited payload. No network, so all four survive --read-only |
sequence_analyze |
Grade a pasted token list for randomness / predictability (pure) |
oast_presets / oast_payload / oast_poll |
List OAST providers, mint a fresh payload URL for a session (session_id), and poll a running listener for callbacks. A poll returns what fits the reply budget, each raw_request / raw_response capped at 64 KB (*_truncated), and has_more says more are already waiting; a resumed session stores every callback whole |
project_info |
Flow / issue counts, capture window, the project description and tags, database, workspace binding, and selection source |
get_current_context |
What the operator is viewing in the TUI and what they have selected. selection.ids is the rows they marked on History / Issues / Sitemap / Intercept, or the cursor row when nothing is marked, or the flow an open detail pins, with target_source naming which. Sitemap selects {host, path} pairs, not flow ids, and says so with kind. truncated is the only signal that the array was capped, not marked_count, which describes the mark set and is reported even when an open drill-in overrides it. marks_elsewhere names tabs holding marks this selection does not carry (a tab plus a count, and a kind only where those marks have one), and tui.live reports whether a gori TUI window is attached (evidence, not proof). Pass a History selection to list_history{ids}. The History lenses it was drawn through come along too (query, view, scope_lens, hide_static), so an agent can list what the operator is looking at |
get_repeater_context |
Repeater workbench state and saved sessions. Every session reports both ids (id, also as db_id, which every repeater tool takes, and tui_index, the 1-based number the TUI paints on its sub-tab chip (6:POST /api)), so an agent and the operator name the same tab, plus the summary (METHOD /path) that create_repeater returns and an unnamed tab's chip shows. filter takes the same sub-tab language the TUI's / does (tag: name: host: method: status:, - negates, bare words search), ANDed with query. include_content adds the request head and, per credential header, an env_headers shape (Authorization: Bearer $ENV.AUTH) that names the wiring without the secret; include_response_body inlines the stored last response body |
create_fuzzer |
Prepare a Fuzzer sub-tab without sending. Takes the fuzz_start inputs plus name, except save_results, record_history and allow_unscoped. Requires Editing project data, works with Send traffic off, and applies the same Run local commands off/ask gate to exec chains. Validates through the shared plan, reads payload files/project sources, and returns id, name, total and the run warnings. The open TUI picks up the tab; the operator reviews and runs it. Advanced → Options (JSON) retains processors, marking instructions and WebSocket frame shapes (payloads are base64). Request bytes are stored as authored, and outputs are masked. Project-derived payloads and merged presets are frozen; wordlist paths are absolute. The CLI twin is gori run fuzz create --project NAME --request request.txt --target https://example.com --payloads a,b --name review. No scope check occurs until the operator runs the tab. |
list_fuzz_runs / get_fuzz_run |
List and inspect permanent Fuzzer result sets. Metrics use a scalar-only projection, including result_index, so retained BLOBs are not loaded. include_content:true returns at most 25 rows from SQLite-capped prefixes: max_head_bytes (default 16 KiB, max 64 KiB) bounds heads and max_body_bytes (default 2 KiB, max 64 KiB) bounds decoded bodies/raw samples. Full source sizes plus head/source/decode truncation flags say what was omitted; include_sensitive:true opts into exact capped prefixes, never uncapped bytes. Run metadata labels pre-current snapshots as legacy:true, and a condition_met run names the result its stop_on tripped on as stop_index; pass it as result_index (null when not recorded; fuzz_status reports the same field live). clusters:true pages the run grouped by response shape and cluster:"<id>" pages one cluster's rows, as on fuzz_results |
ql_reference |
The query-language reference |
ql_explain |
Diagnose a query without running it, to check a filter before spending requests on it |
Request code: get_flow{format:"curl"|"python"|"fetch"|"go"|"httpie"|"csrf"} returns the existing CLI/TUI exporter’s output in document; the default json detail is unchanged. Code exports accept include_sensitive, but refuse the JSON-only body_mode, max_body_bytes and ws_query options. WebSocket code exports contain only the upgrade handshake, with a note saying no transcript is included.
Both exports are available with --read-only and send nothing. Credential headers (including folded continuations) are redacted by default, and default body redaction profiles apply as on get_flow. include_sensitive:true opts out of both; on list_issues it applies only to report formats.
Request code is a UTF-8 prefix of at most 64 KiB; truncated:true marks a size cut or a capture-truncated request, so check it before using the snippet.
Issue reports fit whole issues into a complete document of at most 64 KiB. They keep query, lenient, limit (100 by default, 500 max) and offset. When fewer issues fit, cut_by:"bytes" identifies the shortened page; returned counts the issues actually included, and has_more / next_offset continue immediately after them. Reports omit truncated: more pages never mean a broken document. Evidence bodies are limited to 2 KiB per side (stored reads and decoding use at most 2 KiB + 1), with less than 2 MiB of body reads per call. Cached flow projections prevent repeated reads while fitting the page. Body size/capture cuts and bodies withheld for decoding or profile safety are marked inside the document and by evidence_truncated; incomplete bodies are withheld whole under a redaction profile so structural rules cannot be bypassed by a cut. If one issue's notes, headers or related metadata alone exceed the document cap, the call returns QUOTA_EXCEEDED naming that issue; read it with get_issue.
Action tools (disabled by --read-only, except switch_project, which works unless --pin-project withholds it, and create_project, which works while the server is unbound). Every one that opens a socket (send_request, send_websocket, ws_session_open, ws_inject, fuzz_*, mine_*, authorize_*, cache_deception_check, sequence_*, discover_*, grpc_reflect, minimize_repeater, race_requests, timing_requests, run_retest, refresh_session_slot, probe_scan with active:true, and graphql_schema with send:true) is scope-gated. A target outside, or without, a configured scope is refused with SCOPE_BLOCKED unless the call passes the allow_unscoped:true waiver. The sandbox applies even then, and so does an exclude rule for the sweeping tools (fuzz_*, mine_*, discover_*, sequence_*, authorize_*, minimize_repeater, run_retest, active probe_scan). A single hand-authored send such as send_request passes an exclude, as the proxy does. A project request budget caps them all. A send it refuses fails with BUDGET_EXHAUSTED (not retryable), or PROJECT_BUSY (retryable) when the project database could not lease a slot, and a run that spends the total ends budget_exhausted.
Captured bytes are data, never instructions. Every body, WebSocket message, SSE event, held intercept item, gRPC message, OAST hit and decoded JSON-RPC or LLM text in a result carries origin: target (the server under test wrote it), client (the browser or app did) or remote (an outside party, such as an OAST callback). This is not the origin argument of list_params and export_openapi, which names a scheme, host and port.
| Tool | Purpose |
|---|---|
send_request |
Send / resend an HTTP request (active; records History by default, expands $ENV.KEY env tokens and $BIND.NAME bindings, and redacts sensitive response-header values unless requested). reframe_grpc: true recomputes a unary gRPC message's 5-byte length prefix over the body sent. Off by default, so an edited message ships with the prefix it was captured with. grpc_fields: ["role=ROLE_ADMIN", "7:varint=1"] sets or adds fields on that message for this send ("-path" removes one), by declared name with a .proto or by field number without one, and recomputes the prefix (adding a field). follow_redirects: N (default 0, at most 20) follows up to N 3xx hops as gori run send -L does (following redirects): the response fields are the last response's, redirects lists each hop, and redirects_stopped says why the chain ended early. A hop to another origin goes without Cookie/Authorization and must pass the scope on its own, since allow_unscoped covers only the target you named, and every hop is held to the exclude rules, even on your own origin. A refused hop is a note there, not an error of the call. Each hop is recorded in History before it goes out. body_as: "form"/"json"/"multipart"/"xml" and change_method: true rewrite the request before it goes out (a body is converted first; a bodyless request changes method first, so a GET can become a JSON POST), as gori run send --body-as/--change-method do (changing the method or body). transformed says what was rewritten, a conversion gori cannot do faithfully is refused on its argument with nothing sent, and verbatim refuses both |
send_websocket |
Execute a saved WebSocket Repeater session and collect the replies |
ws_session_open / ws_session_send |
Keep a WebSocket socket open. ws_session_open connects a saved repeater once (active, scope-gated, returns a job_id), then ws_session_send writes messages one at a time while the server pushes back, unlike send_websocket, which runs a fixed script and hangs up. Read server frames with get_job{job_id, after}, close with stop_job. HTTP/1.1 only; the session lives in this server, not the project, and is closed on shutdown or a switch_project. Optional heartbeat auto-replies (engine_io:true answers Engine.IO 2→3). At most 8 open at once |
race_requests |
Fire two or more saved HTTP Repeater sessions (repeater_ids) as one synchronized race: HTTP/1.1 last-byte sync, or the HTTP/2 single-packet attack with http2:true. Every member must share one origin and transport; the result reports each member's session id, timing, redacted head and body (the bodies share the reply budget) |
timing_requests |
Differential timing analysis of exactly two saved HTTP Repeater sessions (repeater_ids): send the A/B pair count times (synchronized single-packet/last-byte race, or interleaved:true) and return a verdict (a_slower / b_slower / no_difference / inconclusive) with the order-bias fraction, a binomial p-value and per-variant quartiles |
create_repeater / update_repeater / delete_repeater |
Manage one Repeater session. Every reply carries tui_index beside id; a delete names the tab it destroyed (was_tui_index) and renumbers the rest. create_repeater{curl} builds the session from a copied curl command |
create_repeaters |
Seed a tab from each of several captured flows, the second hop of an OpenAPI import (see below). Checks every flow exists before creating the first session |
delete_repeaters / update_repeaters |
Bulk close, and bulk re-label (tags and name affixes only; update_repeater is the one that writes request bytes). Both take ids, not a filter. Narrow with get_repeater_context{filter} first and pass the ids it returns. Delete needs confirm:true, and an unknown id refuses the whole call |
move_repeater |
Rearrange the sub-tab strip: to_index for an absolute tab number, direction for a one-step nudge. An open TUI picks the new order up on its own |
minimize_repeater |
Shrink a Repeater request to the smallest form that still reproduces the response |
create_issue / update_issue / delete_issue |
Record, update, and remove issues |
add_link / remove_link |
Attach or detach an issue's / note's evidence pointer |
freeze_evidence / link_evidence / unlink_evidence / delete_evidence |
Copy a flow's or a Repeater tab's current exchange into immutable evidence on an issue (the next send and retention cannot touch it; link:true by default files the live link in the same transaction), change its Issue memberships without changing the snapshot, or delete one copy. Freeze when a response proves a finding, and again after the retest. A duplicate returns already_frozen:true and the existing copy. A tab whose request was edited after its stored response arrived is refused. Send it again, or pass allow_drift:true to keep the mismatched pair |
add_retest_step / update_retest_step / move_retest_step / remove_retest_step |
Build the retest: a Repeater session, a role (setup / baseline / variant / control / cleanup) and at most one assertion (status:2xx, json:data.role=admin, json-absent:…, body:same / body:diff). The session is not copied. A step sends what the tab holds when the run happens |
run_retest |
Run it, through the project's scope and Sandbox gates, and answer pass / fail / inconclusive / blocked plus a row per step (isError on anything but pass). A batch containing a state-changing method is refused, with its request count, until confirm:true. After gori refuses a send the rest is skipped, cleanup included, unless allow_cleanup:true. Each send is recorded in History as src:retest |
clear_retest_steps / delete_retest_run |
Drop every step of an Issue's retest (the run history is kept), or delete one run summary and its result rows. The steps and the History flows each send recorded both stay. delete_retest_run drops only the report, for a run that should not be on the record |
create_note / update_note / delete_note |
Manage project notes |
save_wordlist / rename_wordlist / delete_wordlist |
Manage the global wordlist catalog. save_wordlist writes the values array one per line as given (a blank or # line stays a payload; a value with a line break is refused), atomically and owner-only, and refuses to replace an existing list unless overwrite:true. So does rename_wordlist. delete_wordlist needs confirm:true. A name is a filename, never a path. A saved name works as wordlist in fuzz_start, mine_start and discover_start. In the Edit project data group; available with no project bound |
create_rule / update_rule / set_rule_enabled / delete_rule |
Create, edit, toggle, and delete Match & Replace rules (rewrites on in-flight request/response head or body). Each takes scope: project (default) or global, which applies in every project. A short_circuit rule also takes the mocking arguments: dir/strip_prefix/fallthrough, fault/hang_ms, delay_ms, and from_flow_id to draft it from a captured response |
create_rule_from_preset |
Install a preset (see list_rule_presets) as ordinary Match & Replace rules, the same result as calling create_rule once per rule, so they stay visible, editable and disable-able afterwards. Returns the ids created |
create_extract_rule / update_extract_rule / set_extract_rule_enabled / delete_extract_rule |
Manage the extract rules that bind $BIND.NAME from a response. Renaming drops the old name's bound value. Disabling un-declares the name, so a rule injecting it is skipped (with a warning event) and sends neither a stale value nor the literal token |
create_color_rule / update_color_rule / set_color_rule_enabled / move_color_rule / delete_color_rule |
Manage Colormarker rules. move_color_rule changes which colour a row gets, because the first enabled match paints it. Each takes scope: project (default) or global |
create_custom_color / update_custom_color / delete_custom_color |
Define the global custom colours the picker offers on top of the six built-ins. Deleting one leaves a rule that still names it inert, and its rows fall back to a visible default |
grpc_reflect / grpc_forget |
Ask a target's grpc.reflection.v1 service (falling back to v1alpha) for its descriptors and cache them in the project, or drop a cached target. grpc_reflect is an outbound send and is scope-gated like any other. persisted: false means the write did not commit (another gori holds the writer). A reflected schema still applies in this server until it exits, grpc_schema lists it and grpc_forget can drop it. A forget that did not commit stops this server rendering through that target, but the saved row stays, so grpc_schema still lists it |
create_view / update_view / delete_view |
Create, edit, re-home and delete saved History views. Each takes scope: project (default) or global. The query is validated on the way in: one whose every term would be dropped is refused |
preview_rule |
Estimate how many stored flows a rule would change, before creating it |
import_flows |
Bulk-import a HAR / URL list / OpenAPI / Postman / Insomnia / Burp / WSDL / GraphQL introspection document or curl commands into History, from a file (path) or as text. Imports are not deduplicated. notes says so when the project already holds flows from a file of the same name. GraphQL requires kind:"graphql" and an endpoint URL; it creates unsent POST templates per query/mutation and reports omitted subscriptions in notes |
delete_flow / clear_history |
Remove one flow, or wipe captured History. Deleting a flow an issue or note links to drops the link with it, and delete_flow's reply names those owners in unlinked (as delete_repeater/delete_repeaters do for a session). clear_history drops every flow link without listing them |
set_sitemap_tag |
Pin a free-text memo onto a sitemap path |
create_project / switch_project / delete_project |
Create or reopen a project (optional tags, which replace a reopened project's tags; [] clears them), point this server at another one (or leave the current one with unbind:true), or delete one. The served project is deleted after leaving it. Deletion is two-step: a dry_run first, then a confirmation token |
export_project / import_project |
Write a project to a portable .gori archive, or import one as a new project, through the same engine as gori run project export / import. Both paths are on the MCP server's filesystem. Export takes the bound project unless project names another, refuses an existing file unless overwrite:true (which replaces only an earlier .gori archive) and any path inside gori's home, and says in its result that the archive is unredacted. Import answers CONFIRM_REQUIRED with the archive's inventory, the disclosure and whether its name is free until confirm:true, applies the same import safety (executable and file-backed rules disabled; project routing, global rule overrides, Probe mode and slot auto-refresh reset; 2 GiB cap), and does not switch to the new project |
add_scope_rule / update_scope_rule / delete_scope_rule / set_scope_enabled |
Edit the project's include / exclude rules and toggle the scope lens |
set_sandbox |
Hard containment: when on, the proxy forwards only what scope allows and blocks the rest |
set_env_var / delete_env_var |
Manage the project env tokens substitution reads. The key is stored bare. Reference it as $ENV.KEY, or as $KEY under the bare opt-out. list_env's syntax / example says which one this install speaks |
create_session_slot / update_session_slot / delete_session_slot |
Manage the session slots, the same list the Authorize tab's identities card edits, and the set authorize_start replays under. refresh (Repeater session ids, in order) give a slot refresh steps; refresh_before takes only off (arming automatic refresh is left to the operator) |
refresh_session_slot |
Run a slot's refresh steps now, so its extract rules rebind it. Returns ok, the failing step and status, and the binding names rebound, never a value. Steps are recorded in History (source refresh). Gated like send_request (allow_unscoped), and its steps verify upstream TLS as send_request does (--insecure-upstream). Values live in this server process only |
set_active_session_slot |
Choose the identity every outbound request goes out as: its header overlay is applied to the final wire bytes and $BIND.NAME resolves against its binding table. Held by this server process only, never persisted, so a new connection starts as-captured |
add_host_override / update_host_override / delete_host_override |
Manage the host to IP dial map (changes only the connect IP, never the request) |
probe_promote / probe_dismiss / probe_delete |
Triage a Probe finding into Issues, dismiss it, or remove it. probe_dismiss takes exactly one of id (toggles that finding dismissed ⇄ open), code or host (mutes every open finding sharing it). A dismiss that did not land answers PROJECT_BUSY and leaves the finding unchanged |
set_probe_mode |
Set the scan mode: off, passive, active, or aggressive (authorized targets only) |
create_probe_rule / update_probe_rule / delete_probe_rule / set_probe_rule_enabled |
Manage custom match rules and arm or disarm any scan rule |
create_oast_provider / update_oast_provider / delete_oast_provider / set_oast_provider_enabled |
Manage the OAST providers oast_start can listen on |
fuzz_start / fuzz_status / fuzz_results / fuzz_stop |
Drive the fuzzer. save_results:true permanently stores every row through a byte-bounded asynchronous writer and returns a database run_id. Storage backpressure marks the save failed without stopping outbound traffic. This is independent of the bounded/selective live-job cache and record_history. fuzz_start{fields: ["role"]} sweeps a schema-known gRPC field of a unary request. Each payload is encoded through the field's declaration, every other byte of the message is copied from the capture, and the length prefix follows. A gRPC sweep of byte positions reports grpc_stale_prefix when a payload changed a message's length; fuzz_start{reframe_grpc: true} recomputes the prefix instead of reporting it. fuzz_results keeps rows the matcher rejected when the run observed something about them (the request was re-sent or retried, the response came back truncated, the send errored, or a ¦chain step could not run so the payload went out untransformed), so read each row's matched, or pass matched_only: true. stop_on ends a run early, after the matchers hit N times (after_matches) or when a separate match / filter condition holds, with status condition_met. keep: "interesting" stores only the matched rows and the ones carrying a fault (an error, a re-send, a truncated capture) in a save_results archive. On a large run, read fuzz_results{clusters: true} first: one entry per distinct response shape (payload echoes, numbers, ids, timestamps and volatile headers normalized away), counted over every result of the job, rare shapes first (cluster_order: common|first for the others), each with its counts, status or error_class, metric ranges, sample_indices and a representative row. cluster: "<id>" returns that cluster's rows. The live cache keeps only interesting rows, so members_retained can be below count and a save_results run pages every member through get_fuzz_run{cluster}. A payload set {"payload_from": "host:api.example param-values"} reads the project's captured data (see Payloads from the Project): credential material stays out unless include_sensitive:true, extracted needs it, and the reply's payload_sources says what each source read (flows, values, the policy, what cut it short) and never a value. macro_steps (session ids or tab names), macro_every, macro_expect and macro_on_failure add a request-time macro for a rotating CSRF token or nonce: the reply's request_macro says what it does to the run (a per-request macro runs it one candidate at a time), and fuzz_status reports its runs, requests and failures, and whether it ended the run. extractors: ["RID=header:x-request-id", "jsonpath:data.id"] pulls named values out of each response (extractors, at most 8, response side only). Each row gains extracts ({label: value}, "" for a miss), extract stays extractor 0 as extracted, and a cookie or credential-header extractor reads [REDACTED] unless include_sensitive:true. get_fuzz_run reports the run's extractors and unmasks with its own include_sensitive |
delete_fuzz_run |
Delete a permanent fuzz run and its results; refuses a known live writer. force_stale:true removes a running/saving row left by a crashed process, and must never be used while another gori is saving |
mine_start / mine_status / mine_results / mine_stop |
Drive the param miner. names are tested first, ahead of the built-in list and any wordlist (for example list_params names seen on the host's other endpoints). payload_from (a list of <QL> param-names, with payload_from_include_sensitive, _locations, _max_flows, _max_values) reads names from the project's captured data instead, tested after names and before the built-in list; payload_sources in the reply says what each read. macro_steps, macro_every, macro_expect and macro_on_failure add the same request-time macro as on fuzz_start, before every request the mine sends, its baseline included |
sequence_start / sequence_status / sequence_results / sequence_stop |
Collect tokens by live replay and grade them (results return the report, never the tokens) |
authorize_start / authorize_status / authorize_results / authorize_stop |
Replay captured flows under several identities and compare each response against a baseline (broken access control). Results lead with access_control (BYPASS/enforced/review/error/nothing_sent) and a flat, never-paged bypasses list (past the reply budget, the rest by flow id in bypasses_unshown_ids; likewise skipped_unshown_ids / failed_unshown_ids) |
cache_deception_check |
Test one flow for web cache deception: replay it as its captured (authenticated) identity, re-request the same url anonymously, then make a cache-busted anonymous control request. Matching control content supports served only when the control has no cache-hit signal; if it is also a hit, the query may have been ignored and the verdict is review. Matching content with an anonymous cache hit and a control that was refused (401/403) or redirected is a likely deception (cached); a control that failed any other way (a 404 or 5xx from the buster) is review. Synchronous, up to three sends. Each trial includes its cache signal; the top-level cache is the anonymous response. Pair it with the Fuzzer's cache-delimiters payload set to find the crafted paths that trigger it |
discover_start / discover_status / discover_results / discover_stop |
Spider and brute-force endpoints, poll progress, and read findings. All four are action tools, so a read-only server has no Discover surface |
oast_start / oast_stop |
Register an OAST payload and poll for callbacks: on a public interactsh server by default, on a saved provider with provider_id, and as a resumable session with persist:true (read the hits with oast_poll). oast_stop on a resumed session stops polling but keeps it resumable. With the Sandbox on, an inline server (or a provider host the agent saves) must be one the Sandbox allows; a built-in preset and a provider the operator saved are not checked |
oast_resume / oast_release |
Re-arm a persisted session so payloads planted earlier keep resolving (its polls are saved into the project), or deregister one for a finished engagement; its callbacks stay |
list_jobs / get_job / stop_job |
Work across job kinds: list every fuzz, mine, discover, sequence, authorize, WebSocket-session and background-call (background:true) job this session started, or fetch and stop one by id. Stopping a job that already ended changes nothing and answers already_finished:true. A per-kind tool handed another kind's id (fuzz_results{job_id:"mn_2"}) names the tool that reads it |
intercept_forward / intercept_forward_edit / intercept_drop |
Release a held message byte-exact, release it with edited wire bytes, or drop it |
ws_inject |
Push one frame (text, binary, ping, pong, close) into a WebSocket the proxy is still relaying, either direction, on the app's own socket. Active and scope-gated against the flow's host; applied by the capturing TUI. See Live Intercept |
intercept_toggle / intercept_set_filter / intercept_set_direction |
Arm or disarm the catch, set its condition query, and choose which leg it holds |
Action tools are capped for safety: fuzz, mine, sequence, discover, and authorize jobs are limited in total requests, concurrency, and stored results. An authorize run's cap counts
flows × identities, and a selection over it is refused up front instead of being truncated. A rule created viacreate_ruleis picked up bygori runand newly opened TUIs, and an already-running TUI on the project reloads its rules on its next store refresh, without a restart.
From a Spec to Repeater Tabs
import_flows reads OpenAPI/Swagger (JSON or YAML) and joins servers[0].url with each operation path. Getting from a spec to a strip of tabs is three calls:
import_flows{kind: "oas", path: "openapi.yaml"}
list_history{query: "src:import"} → the flow ids
create_repeaters{flow_ids: [...], name_prefix: "oas: ", tags: "spec"}
create_repeaters checks every flow exists before it creates the first session, seeds each one through the same path a single create_repeater{flow_id} uses, and appends them in the order given. Rearrange afterwards with move_repeater, and prune with delete_repeaters.
Live Intercept
An agent can sit in the intercept loop next to you. The TUI session holding the capture lock mirrors held messages out to the agent and drains the commands it sends back, so intercept_list → intercept_get → intercept_forward_edit is the same loop you drive by hand.
The mutating half (intercept_forward, intercept_forward_edit, intercept_drop, intercept_toggle, intercept_set_filter, intercept_set_direction) is disabled by --read-only, and every one of them refuses when no live capture session is holding the lock.
ws_inject uses the same bridge, so it needs a capturing TUI too (only that process holds a live proxied socket). It writes one frame into an open HTTP/1.1 WebSocket flow, client → server (direction:"out", the default) or server → client ("in"), with payload as literal text or payload_base64 for exact bytes, and opcode one of text (the default), binary, ping, pong or close. The frame goes out verbatim, with no env token expansion and no Match & Replace. An HTTP/2 WebSocket is refused. It counts as a send, so it belongs to Send traffic, is scope-gated against the flow's host and is asked about per host. A text or binary frame waits up to 5 seconds for a fragmented message on that side to end and is REFUSED past that. The frame lands in the flow's ws_messages with origin: "gori". The proxy guide has the details. gori run intercept inject is the same path from a script.
Each agent action lands in the notification center tagged as coming from an agent and rendered differently from your own, so you can see what an agent did to traffic while you were on another tab.
A row intercept_list returns with operator_editing: true holds unsaved changes you are typing, so an agent can leave that message to you instead of forwarding, editing or dropping it and discarding your work.
A held message normally waits indefinitely for a human decision. Once an agent that can act on the queue (not --read-only, with Intercept control on) reads it or sends it a command in that session, gori arms a 30 second auto-forward for items nobody is watching, so a client that dies mid-hold cannot wedge the connection. A session with no agent attached never auto-forwards.
Messages from gori
The palette verb "Tell the agent…" (app.tell-agent) sends a one-line message from any gori tab to an attached agent's session. Pick one of the MCP clients attached to the project (the same list the mcp: chip and the "Attached agents" card show), or all of them, type the line, and gori delivers it. From the "Attached agents" card, t messages the highlighted agent directly. When you send it from the History list with rows marked, those flows are sent along as context so the agent can act on what you selected.
Delivery tries five layers, putting routes that report back before routes that cannot. The first that answers ends the chain, so no message is carried twice:
- Inbox socket: when the target is Claude Code,
gori mcpwrites the message to that session's inbox socket (/tmp/cc-socks/<pid>.sock, named by the pid of the Claude Code process that spawnedgori mcp). This is GA and needs no flag. The message arrives framed as a note from another session, prefixed[gori] The operator at the gori TUI says:. An idle session starts a turn on it, and a busy one reads it between tool calls. Claude Code'scrossSessionInboundsetting decides whether to accept it, hold it for later, or refuse it. gori writes the socket either way and cannot see which happened. A socket file that is there but refuses the connection is a leftover from a session that has already exited (/tmp/cc-socks/<pid>.sockoutlives the process that bound it, and pids are reused), so gori falls through to the next layer. - Codex queue: when the target is Codex,
gori mcphands the line to that session's own thread withcodex queue --thread <id> --message …, and the session runs a turn on it: immediately when it is idle, after the current turn when it is busy. Codex tells an MCP server nothing about itself, so gori reads the thread out of the writer lock the Codex process holds open (<CODEX_HOME>/thread-writer-locks/<thread>.lock). The lock names the thread and theCODEX_HOMEto queue into, so a session started with its ownCODEX_HOMEis still reached. GA, no flag. A thread that has not run a turn yet has no rollout andcodex queuerefuses it. That reason lands on the delivery row and the message stays readable through layers 4 and 5. - Channel: when
mcp.channelsis on in Settings and neither route above answered,gori mcpdeclares theclaude/channelcapability and pushes the message as a channel event. Claude Code shows it as← gori: …and starts a turn on it once the session is idle, so the model reads it as an instruction rather than a passive note. This needs Claude Code launched withclaude --dangerously-load-development-channels server:gori, a research-preview flag with a one-time confirm dialog on the client side, and the curated--channelsallowlist that flag ships with is maintained by Anthropic. It is off by default, and gori tries it last. A push to a session that never registered the channel is dropped silently and gori cannot tell. A push is not a confirmed carry, so the message stays pending for layers 4 and 5. In a live test, Opus 5's safeguards flagged channel-injected messages regardless of content and stopped the session on a model-switch dialog. The socket route does not trip them. Leave channels off unless you are testing them. - Tool result: for any client, a message the layers above did not carry is attached to the result of the next gori tool the agent calls, whichever tool it is. The result carries a second content block with the operator's line beside the tool's own answer. GA, no flag, and nothing for the model to remember. The other three layers each belong to one vendor (the inbox socket is Claude Code's,
codex queueis Codex's, the channel is a preview of Claude Code's). grok, Pi, Hermes, Antigravity and Claude Desktop have no such route, so for them this layer is what puts the message in front of the model. It cannot wake an idle agent (nothing here can), but the next answer gori gives that agent carries the line. Like the socket, it is a confirmed carry, so the message is retired from layer 5. A--read-onlyserver has no writer fiber to record the delivery, so it sends the line and leaves the row readable. - Poll: always available, as the backstop under every layer above. The message is a row in the project's event feed, and the MCP tool
operator_messagesreturns what is pending for the calling session. The handshakeinstructionstell the model to check it at the start of a turn, so an agent that follows them picks the message up on its next call even when no other route exists. It cannot interrupt. An agent idle at its prompt sees the message when its next turn starts.
Each delivery attempt writes an agent_delivery row, and you see the outcome without switching tabs. The TUI's notification ring shows → claude-code got it (socket), → codex-mcp-client got it (queued in codex), → grok-shell-gori got it (on its next tool result), left for antigravity to pick up (operator_messages) (and → antigravity picked it up once it reads the message), or the reason a delivery failed, and Companion (Miss Ring) reacts to the same notice if she's on. The Activity pane lists each of these under a new operator source, so the message and its delivery outcome stay on the project's record (see Activity).
The agent answers with reply_to_operator. The handshake instructions tell it to use this tool to answer you in gori, so you do not switch to its terminal. The one-line summary lands in the ring (and on Miss Ring), tagged with the client's name, and detail (a finding, a diff, a list of endpoints) opens from the ring with ↵. It is a row in the same feed, so it works for every agent, Claude or not (though not one started with --read-only), and it stays on the project's record under the agent source.
When the agent needs a decision from you, it calls ask_operator with a one-line question and two to four choices ("add api.example.com to scope?" with yes / no). The question does not take focus. It lands in the ring (Miss Ring holds it like a reply), marked ?, and an orange ask:N chip counts what is waiting. Open the card with ↵ on that ring row, a click on the chip, or Answer the agent… in the command palette. Press a choice's digit (or move with ↑/↓ and press ↵), x to dismiss it without choosing, or esc to leave it for later. Your answer goes back as an operator message with in_reply_to set to the question, over the same routes as anything you type, so the agent gets it on its next tool result if nothing faster reaches it. A question nobody answers expires (after 30 minutes unless the agent chose otherwise), and the agent is told that too. The card is offered only while the agent that asked is still attached. A question asked while gori was closed is waiting when you open it.
A script can reach you the same way with gori run notify. Its line shows in the ring and on Miss Ring without the ai tag, under the script source.
Limits:
- Nothing is replayed. A message is delivered to the agents attached when you send it. An agent that attaches afterward does not receive it.
operator_messagesanswers only with what is still pending for that session, and a delivery already made is not repeated. - It is a request, not consent. Whichever layer carries it, a peer-framed message asks the model to do something. It authorizes nothing, and the agent may decline it as it would any other instruction it disagrees with. The same holds for an
ask_operatoranswer: choosingyeson a card is a decision you hand the agent, not a grant. Scope, the sandbox and the MCP permission switches still decide what it can send. - A reply is a notification, not a mailbox. It shows in a gori TUI that is open on the project when it lands. There, Miss Ring keeps it up until your next key or click (Settings → Companion → Agent replies), but the ring is emptied when the TUI closes. Replies written while no TUI was open are not replayed one by one. The next TUI to open on the project puts one note in the ring (
claude-code sent 2 replies while you were away) whose detail lists them, and the full text stays in the Activity pane. The tool tells the agent the same, and its result carriestuiin the shapeget_current_contextuses, so an agent that seeswindows: 0knows to say it in its own output. - Channel delivery is a research preview. It depends on an unreleased Claude Code flag and Anthropic's curated allowlist, both of which can change under
mcp.channels. The inbox socket and the poll tool keep working if that flag stops working.
Playbooks as Prompts
The playbooks are served as MCP prompts, so a client lists them with prompts/list and fetches one with prompts/get. Claude Code shows each one as a slash command, such as /mcp__gori__test-access-control. A prompt costs no model context until you pick it, so the playbooks add nothing to what tools/list spends.
Each prompt is named after its playbook's page and takes one optional argument, focus: a host, path or flow id to start from. It is passed on verbatim. The text is the English playbook with its screenshots removed and its links made absolute, after a short preamble. The preamble tells the agent that the playbook was written for the TUI and gori run, and to carry each step out with a tool from tools/list. A step no listed tool can do goes to you through ask_operator when that tool is served, and is otherwise named and skipped.
Every server lists the same prompts. Under --read-only, a --tools filter, or MCP permissions and features you switched off, the preamble says so instead of hiding prompts. Run an AI co-pilot is not served, because it is about installing this server.
Protocol Revisions
gori speaks both eras of MCP from one process, and each request decides which one answers it.
2026-07-28: the stateless revision. A request carries its protocol version, the client's capabilities and (optionally) the client's name in_meta. There is no handshake. Results come back withresultType, the server's identity under_meta["io.modelcontextprotocol/serverInfo"], and (ontools/listandprompts/list) thettlMs/cacheScopehints a client caches by.server/discoveranswers the supported versions, the capabilities and the instructions in a single call, and may be the first thing you send.2025-11-25,2025-06-18,2025-03-26,2024-11-05: the handshake revisions.initializeopens a session as it always has, and is answered with the revision you asked for. Anything else (a version gori does not know, and a stateless one) is answered with the newest handshake revision, because a session opened byinitializecannot switch to per-request semantics.
A version gori does not speak is refused with -32022 and the list of versions it does, so a client retries instead of guessing. Tools and prompts behave the same in both eras. Only the envelope differs. Prompts are declared with listChanged: false in both, because the list is compiled into the binary and cannot change while it runs.
Client authors should note two things about the stateless revision. subscriptions/listen is answered with an empty filter and an immediate graceful close, because gori pushes nothing. Rely on the ttlMs you were given instead. The claude/channel research preview is declared only to the handshake era. A stateless server may write responses, notifications belonging to a request in flight, and notifications on an acknowledged subscription, and a channel push is none of those. Operator messages still reach every client, by the socket, the Codex queue, the next tool result, and operator_messages, none of which touches the protocol stream.
An unknown tool name comes back as a JSON-RPC -32602, not as a tool result with isError, as the spec requires, since the call never reached a tool. A tool that ran and failed answers isError: true with a structured error, and that is the one to hand back to your agent.
Tool Hints
Every tool in tools/list carries annotations.readOnlyHint, so a client can tell the tools that only read this project's capture from the ones that write to it or send traffic at a target. It is derived from the same declaration --read-only enforces, so the hint and the gate differ only where that declaration says so. The workbench pollers (*_status, *_results, list_jobs, get_job) and preview_rule are hidden by --read-only yet marked read-only, because they only report. switch_project, create_project, probe_scan (whose active:true sends and persist:true writes), export_openapi (whose output_path writes a file) and operator_messages (which records deliveries) are still served under --read-only but are not marked read-only. A read-only tool also carries openWorldHint: false, because it answers from the project store and never dials. A writer states the other hints only where the answer is the safe one: openWorldHint: false when it only touches the project's own store or gori's settings (create_note, delete_issue, update_view), destructiveHint: false when it only adds a row (create_note, create_issue, add_link, freeze_evidence), and idempotentHint: true on the on/off setters. A hint left out keeps the MCP default, which reads the tool as open-world and destructive: every tool that can send, the intercept_* tools, and add_scope_rule and add_host_override, which add a row but widen where gori may send.
One Call at a Time
Tools run one at a time, in the order they arrive. A fuzz or a slow send_request does not overlap with the next call, and responses come back in order. Two messages are handled immediately regardless: ping, so a client's liveness probe never stalls behind a long call, and notifications/cancelled, which suppresses the response to a request you stopped waiting for. Cancelling send_request or send_websocket closes its active socket so a silent origin cannot hold the worker until the timeout. Tools with cooperative cancellation stop at their next check. Other in-progress calls finish before the worker takes the next queued call.
race_requests, timing_requests and minimize_repeater also take background:true. The call is refused or gated exactly as without it, then returns a bg_* job_id at once, and the run goes on while the next calls are served. get_job returns the same result the synchronous call would have (wait_ms holds the read until the run ends), and stop_job cancels it at its next check. A stopped run's result also carries incomplete_reason:"stopped". A race already on the wire finishes.
Usage Log
gori mcp can keep a local record of how it is used: which tools an agent calls, which fail, and how large the answers are. It is off by default. Turn it on with Settings → AI → MCP server → Usage log, or by setting usage_log under mcp in settings.json (gori settings --edit), then restart the agent's server, which says on stderr that the log is on.
{ "mcp": { "usage_log": true } }
Each tool call appends one line to ~/.gori/mcp-usage.jsonl (under $GORI_HOME):
- the tool's name, and the names of the declared arguments that were passed
- the outcome (
okor the error code) and the declared argument an error blamed - the size of the reply, how long the call took, and whether the answer reached the client
An argument's value, a reply, a host, a URL and a project's name are never written. An argument name the tool does not declare is counted, not recorded, and a tool name that does not exist is reduced to its letters, digits and underscores. A session also records gori's version, the client's name and version, what decided its catalogue (the --tools spec, --read-only, the permission groups switched off, and the resulting tool count) and the size of the tools/list answer. The file is not sent anywhere. It is rotated to mcp-usage.jsonl.1 once it passes 4 MB, replacing the previous one.
gori mcp --usage prints the summary and starts no server:
gori mcp usage · last 7d · 14 sessions (9 made no calls) · 78 calls
clients claude-code 12 · codex 2
profile @recon 11 · * 3
catalogue 45.5kB per tools/list
TOOL CALLS ERR TOP ERROR REPLY p50 / max p50 ms ARGS
list_history 41 3 INVALID_ARGUMENT:query ×3 6.1kB / 39.8kB 12 query×38 limit×20 sort×4
get_flow 28 0 2.4kB / 31.0kB 4 id×28
never called: 31 of 39 advertised tools (--json lists them)
unknown tool names: search_history ×2
--since=24h, --since=7d (the default) or --since=all sets how far back it reads, and --json prints every tally, including the tools no session called. A call for a real tool the server was started without (--tools) is listed apart, as not served, but asked for.
Why an MCP Seam
gori has no built-in AI chat. Agents reach it through MCP, so you choose the model, your traffic goes nowhere you did not send it, and the same interface serves scripts and agents. gori run covers the non-interactive path, and MCP covers the interactive-agent path.
Next Steps
- AI Setup: a step-by-step walkthrough to connect an agent and drive its first request
- Scripting: the other automation path,
gori runfor pipelines and CI - CLI Reference: full
gori mcpflags - Query Language: the syntax agents use to filter