AI agents
New in 1.1
MCP tools
On this page
ReqRes has 33 MCP tools: 18 read tools and 15 change tools.
Filters shared by several tools
list_sessions, wait_for_session, wait_for_sessions and list_destinations take the same filters. Every filter is optional.
| Filter | Matches |
|---|---|
host | Part of the host name, in any case |
method | The HTTP method, such as GET |
status | A status code such as 404, or a class such as 5xx |
scheme | http or https |
url_contains | Part of the full URL, in any case |
app | Part of the app or process name, in any case. claude matches both the Claude app and the claude command-line tool. Requests ReqRes could not attribute to an app are left out. |
pid | The exact process id. Use it to tell apart several copies of one tool. |
country | A 2-letter ISO country code such as US, or local (private network), mac (this Mac) or unknown |
outcome | How the request ended: completed, failed (no response), aborted (cut off by the app, the server or a breakpoint) or timed_out (closed by ReqRes's idle limit) |
grpc | The call's own status on gRPC-Web, Connect and native gRPC rows: error (anything but OK), ok, a status name such as NOT_FOUND, or a number. Other rows match none. |
proto | What the row spoke: h1, h2, ws or relay. http2, websocket and tcp work too. |
The country comes from an offline lookup of the server's address, at country level. See See where requests go.
What a row says
list_sessions returns one short row per request. Tokens in the row say what the request spoke and how far it got:
- Protocol. Each request row carries
proto=h1,proto=h2orproto=ws. HTTP/2 rows appear only with Capture HTTP/2 (beta) on. See Capture HTTP/2 and gRPC. - RPC status. A gRPC-Web, Connect or native gRPC call carries
grpc=with its status. A gRPC-Web error arrives as HTTP 200, sogrpc=NOT_FOUNDnext to 200 is the failure. - Relayed connections. A connection ReqRes did not decrypt is one
kind=relayrow: the endpoint, the bytes each way and how long it was open. It has no method, status, headers or body. HTTPS is relayed until the ReqRes CA is installed and trusted. - Failed requests. A request that did not complete is still a row, marked
outcome=failed,abortedortimed_out, with the phase it broke in:dns,connect,tlsUpstream(the server's certificate),tlsClient(the app refused ReqRes's certificate),requestorresponse.cancelled_by_appmarks a request the app gave up on. See See why a request failed. - Live rows. A request still open is listed as
IN_FLIGHT waiting(no response yet) orIN_FLIGHT streaming(bytes so far). When it finishes, the finished row replaces it under the same uid.ENDED_WITHOUT_FINAL_ROWmarks one whose end was never recorded, for example because capture stopped. - WebSockets. A WebSocket connection is its
101 Switching Protocolsrow.list_messagesreads its messages.
What the Delivery line says
While capture is on, capture_status has a Delivery: line, and diagnose_setup a Delivery to ReqRes check. They say whether what capture records reaches the copy of ReqRes the agent is talking to. Requests already in the list stay there, whatever the line says.
| The line starts with | Meaning |
|---|---|
| "Delivery: requests reach ReqRes" | New requests reach ReqRes. For 5 minutes after ReqRes reconnects to a capture that kept running, the line also says how many requests were captured while ReqRes was not receiving them, and how many earlier ones, if any, were not kept. |
| "Delivery: reconnecting to the running capture" | Capture kept running while ReqRes was not receiving it, for example while ReqRes was closed after a crash or a Force Quit. The extension reconnects by itself, usually within a few seconds, and delivers the most recent of what it captured meanwhile. Ask again in a moment. |
| "Delivery: the extension has not connected to ReqRes yet" | The first moments of a start, or the seconds before ReqRes restarts a capture that cannot reconnect. Ask again in a moment. |
| "Delivery: NOT reaching ReqRes" | No new request reaches ReqRes until capture starts again from ReqRes. The line says why. |
| "Delivery: another copy of ReqRes holds this capture's connection" | Another copy of ReqRes is running and holds the capture, so the copy the agent is talking to receives nothing new. |
If the extension cannot reconnect within a few seconds, for example because capture was started from System Settings or by an earlier ReqRes build, ReqRes restarts capture once by itself. It does not restart a capture it started itself that never connected, and it does not restart after you or an agent asked for a start or a stop.
When the line says "NOT reaching ReqRes", ask the user to click Restart Capture in the traffic list or the menu bar menu, or call stop_capture and then start_capture. Each asks for approval first, unless the user allowed agent changes.
While the line reads reconnecting, not connected yet or "NOT reaching ReqRes", breakpoints hold nothing: a request that matches one goes through, because nobody could answer it. A request held before ReqRes went away is listed again once ReqRes reconnects, with what is left of its 60 seconds.
Read tools (18)
Read tools never ask for approval. ReqRes redacts credential-shaped values in everything they return, except for hosts you send unmasked. See Control what agents see.
| Tool | What it does | Arguments and limits |
|---|---|---|
capture_status | Reports whether capture is running, starting or stopping, whether setup is finished, the proxy address, whether the ReqRes CA is installed and trusted, how many requests this run holds, whether new requests reach ReqRes while capture runs (see What the Delivery line says), and the ReqRes version. Then lists each protocol with its status: supported, beta, relayed or not_captured. Call it first. | None |
list_sessions | Lists captured requests, newest first, one short row each. | Filters. limit: default 30, max 100. cursor for the next page. |
get_session | Returns one request in full: HTTP version, headers, trailers, timings, whether it reused a connection, and body previews. A request that did not complete has an Outcome line with the cause. | uid. view, from and limit: see get_session views. Each body preview stops at 10,240 bytes and ends with a truncation marker. |
query_session_body | Describes the structure of a JSON body, or returns one value from it, without returning the whole body. Says when ReqRes kept only part of the body. Refuses a request still in flight with in_flight. | uid. side: request or response (default). mode: structure (default) or path. path, such as data.items[0].id. |
wait_for_session | Waits for the next matching request, then returns it. Requests captured before the call are ignored. So are failed, aborted and timed-out requests, unless include_failed is true or outcome names one. With until set to headers or first_message, it can return a request still in flight. | Filters. until: complete (default), headers (the response status and headers arrived) or first_message (the first complete event of an SSE or NDJSON stream arrived). timeout_seconds: default 30, max 300. include_failed: default false. |
wait_for_sessions | Waits for several matching requests and returns them in order. After the first match, stops early when no new match arrives for settle_seconds. Skips failed requests like wait_for_session. | Filters. max_count: default 20, max 50. timeout_seconds: default 30, max 300. settle_seconds: default 2. include_failed: default false. |
diff_sessions | Compares 2 requests and returns only the differences: status, method, query parameters, headers, and JSON bodies by key path. | uid_a, uid_b |
list_messages | Lists the messages of one WebSocket connection, oldest first: direction, opcode, milliseconds after the upgrade, size and payload. Says first whether the connection is open, how it closed, and how many messages ReqRes did not keep. | uid of the 101 row. direction: sent or received. opcode: text, binary, ping, pong or close. contains: part of the payload, in any case, matched after redaction. cursor. limit: default 50, max 200. |
wait_for_message | Waits for the next matching WebSocket message, then returns it. Messages captured before the call are ignored. | uid for one connection, or host (part of the host name, in any case) for any connection to a matching host. direction, opcode, contains. timeout_seconds: default 30, max 300. |
list_destinations | Groups captured requests by destination country, plus mac, local and unknown. Shows requests, bytes, how many hosts and apps, and the top 3 hosts for each. Requests that failed before connecting are left out and counted. | Filters. With country, lists up to 20 hosts and 10 apps for that destination. |
list_hosts | Lists host filters with their ids. | None |
list_rules | Lists rules with their ids, host filter, mode, pattern and response: the status the response gets, → server's status for a rule that keeps the server's, or a map_local rule's file. A credential-named value in a path comes back as REDACTED, unless it is a pattern such as *. | host_id, optional |
test_pattern | Checks a rule pattern against a URL without creating anything, and shows the pattern ReqRes compiles. Refuses a path that holds a redaction mask. | path, url. match_type: wildcard (default) or regex. |
diagnose_setup | Runs the setup checks in order and names the first thing to fix. The checks include the proxy port, whether captured requests reach ReqRes, apps that refused ReqRes's certificate, HTTP/2 capture, which kinds of client are captured, and the protocols this version captures. | None |
capture_environment | Prints the shell lines that send a command-line tool through ReqRes, at the configured proxy port. Each proxy variable is set in both spellings, such as HTTP_PROXY and http_proxy, because curl and git take the proxy for plain http:// only from http_proxy. NO_PROXY and no_proxy skip localhost, 127.0.0.1 and ::1. The lines carry no comments, so hand them over exactly as printed. | None |
list_saved_sessions | Lists saved sessions, newest first, with their ids and notes. | limit: default 30, max 100. |
get_saved_session | Returns one saved session: headers, timings and body previews, capped like get_session. A saved stream comes back as its whole body, redacted event by event, with no events or assembled view. | id from list_saved_sessions |
list_paused_requests | Lists held requests with the seconds each has left, and says whether any breakpoint is on. Each request's body: line says what its headers declare, such as body: empty (Content-Length: 0) or a size from its Content-Length. The body itself is never shown, to the agent or to you. | None |
diagnose_setup runs the same checks as Capture ▸ Diagnose Setup…. See Run Diagnose Setup. capture_environment warns first when capture is stopped, and names the certificate step when the ReqRes CA is not installed. See Capture command-line tools and agents.
list_messages and wait_for_message read what ReqRes kept: the first 200 and the last 2,000 messages of a connection, and the first 64 KB of each message. An agent reads up to 4,096 bytes of each payload. See Read WebSocket messages.
get_session views
The view argument chooses what get_session returns.
view | Returns |
|---|---|
detail (default) | Headers, trailers, timings and body previews. A request still in flight shows no body until it finishes. ReqRes keeps up to 16 MB of body per request, request and response together. A body kept in part says how many bytes are missing. |
events | The numbered events of an SSE or NDJSON response, a page at a time. limit: default 50, max 200. |
assembled | An Anthropic Messages, OpenAI Chat Completions or OpenAI Responses stream put back together: text, tool calls with their arguments, stop reason, token usage, model and any error event. |
rpc | A gRPC-Web, Connect or native gRPC call: the service and method, each message decoded without the .proto file, and the call's status with where it came from. limit: default 20, max 100. |
fromstarts a page: an event number forevents, or a message position forrpc, requests first. TakenextFromfrom the previous page.eventsandassembledshow only complete events. An incomplete event at the end is withheld as "N bytes pending".eventsandassembledread the current capture run only.
Change tools (15)
Each change tool asks you first, unless you allowed agent changes. exclude_host and replay_request ask every time. answer_paused_request never asks per call: the Let agents answer held requests switch controls it. See Approve agent changes.
| Tool | What it does | Arguments and limits | Kind of change |
|---|---|---|---|
add_host | Adds a host filter. | host: a bare host name, with no scheme, port or path. scheme: https (default) or http. port, optional. The free version allows 2 host filters. | Changes what ReqRes watches |
remove_host | Removes a host filter and the rules under it. | id from list_hosts | Deletes data |
create_rule | Creates a rule. | Required: host_id, mode (override, extend or map_local), path. Optional: match_type (wildcard default, or regex), method (omit for any method, the default, or GET, POST, PUT, PATCH or DELETE), scheme (https default, or http; recorded, but matching ignores it), request_headers, response_status (200 to 599; its default depends on the mode, see Status and headers of a rule), response_headers, response_body, local_file, enabled (default true). The free version allows 1 rule. | Rewrites live traffic |
update_rule | Changes only the fields you give, except that a map_local rule made extend or override takes that mode's status unless you send one. Set enabled to false to turn a rule off without deleting it. | id, plus any create_rule field except host_id. Leave path out to keep the rule's own. method: any or an empty string for any method. A headers object replaces the existing headers, and {} removes them. | Rewrites live traffic |
delete_rule | Deletes a rule. | id from list_rules | Deletes data |
mock_from_session | Turns a captured response into a rule that answers the app without contacting the server, with an optional new status, body or headers. The rule matches the captured method, and the captured path and query unless you give path. A text response is replayed as UTF-8, and the copied Content-Type says so. Adds a host filter for the host when there is none, which counts toward the 2 free host filters. | uid. response_status: 200 to 599, needed when the captured status is outside that range, such as a WebSocket's 101. response_body, response_headers (merged over the captured headers). mode: override (default) or map_local, which answers 200; extend is not accepted. path, match_type. | Rewrites live traffic |
exclude_host | Adds a host to Settings ▸ Capture ▸ Excluded from interception. ReqRes passes connections opened from then on through untouched and records none of them, so new requests to the host no longer appear in the traffic list, for you or the agent. Rows already captured stay. See Pass a host through untouched. A host already on the list changes nothing and asks no one. | host: a bare host name, or *.example.com for its subdomains but not example.com itself. No scheme, port or path. | Rewrites live traffic |
start_capture | Starts capture. Setup must be finished. Replies "starting" until the tunnel connects. | None | Changes what ReqRes watches |
stop_capture | Stops capture. Captured requests stay in the list. | None | Changes what ReqRes watches |
clear_sessions | Removes all captured requests from the current run. | None | Deletes data |
export_sessions | Writes requests to a HAR 1.2 file, with values redacted, and returns its path. Requests still in flight are left out, and the result says how many. | uids: up to 100. filename: a bare name of up to 80 characters; ReqRes adds .har. A file stops at about 20 MB, and later requests are left out. | Writes captured traffic to a file |
replay_request | Sends a captured request again and returns the new response, redacted. The result says which route it took. | uid. method: GET, HEAD or OPTIONS only. url: same scheme, host and port; change the path and query. headers, remove_headers: up to 32 header changes. Times out after 12 s. | Sends a real request to another server |
save_session | Keeps a captured request after the run ends, and returns its saved id. Refuses a request still in flight. | uid. note: up to 280 characters, shown next to it in ReqRes. | Writes captured traffic to a file |
delete_saved_session | Deletes a saved session. It cannot be recovered. | id from list_saved_sessions | Deletes data |
answer_paused_request | Resumes or aborts a held request. The reply names the request with its URL redacted. | id. action: resume or abort. set_headers, remove_headers: never Content-Length or Transfer-Encoding. body: up to 256 KB, sent in place of the original, none of which reaches the server; refused for a TRACE. Without body, the original body goes on unchanged, except for a TRACE that arrives with a body of its own, which ReqRes answers 502 over HTTP/1.1, as its body: line says. Abort that one instead. abort_status: 400 to 599, default 409. | Rewrites live traffic |
Limits that apply to several change tools:
- Rules need capture. A rule created while capture is stopped does nothing until capture starts. The tool result says so.
- Patterns cover the path and the query.
/searchdoes not match/search?q=x; write/search*. A regex starts with/, never with^. See Write a URL pattern that matches. - Mocks answer without the server. An override with a
response_body, or amap_localfile ReqRes can read, answers the app and never contacts the server. An override without a body sends the app's request to the server, and replaces the status and headers of the real answer. Amap_localfile that is missing or unreadable also sends the request on, and the server's response comes back unchanged. - Some captures cannot be mocked.
mock_from_sessionrefuses a request still in flight. Without aresponse_body, it also refuses a response with no body, a body ReqRes kept only in part, a body under an encoding ReqRes did not decode, and, inoverridemode, a binary body, which needsmap_local. Without aresponse_status, anoverridemock also refuses a captured status outside 200 to 599, such as a WebSocket's 101. - Exports go to one folder.
export_sessionswrites toMCP Exportsin ReqRes's Application Support folder. The agent names the file, not the folder. See Review and undo agent changes. - Replay repeats only safe methods. A request captured as
POST,PUT,PATCHorDELETEis refused, even when the agent asks forGET. - Replay sends real credentials. The request goes out with the captured headers.
- Replay follows capture. With capture on, the replay goes through ReqRes. Your rules apply and it appears in the traffic list only when the host is not excluded and, for HTTPS, the ReqRes CA is installed and trusted. Otherwise ReqRes relays it untouched: the real server answers and no rule applies. An HTTPS replay without a trusted CA leaves one
kind=relayrow, and a replay to an excluded host leaves none. With capture off, it goes straight to the server. - A busy port stops capture. If another program holds the proxy port,
start_capturedoes not start capture, and ReqRes offers another port in its window. See Change the proxy port. - Held requests need a switch.
answer_paused_requestworks only while Settings ▸ Breakpoints ▸ Let agents answer held requests is on. It is off by default. See Hold a request with a breakpoint. - Rule paths come back masked.
list_rulesand the rule a change tool returns show a credential-named value in the path asREDACTED. The stored rule keeps the real value and matches on it. A path sent back toupdate_ruleexactly as shown keeps the stored one, and a path holding the mask any other way is refused. See Control what agents see.
Status and headers of a rule
- An
extendrule keeps the server's status. It sends the request to the server and changes only what it names in the response. Aresponse_statusfrom 200 to 599 answers in place of the server's, a 404 or a 500 included. Left out, or0, the server's status stays. - An
overrideanswers with its own status. It is 200 whenresponse_statusis left out.0is refused. - A
map_localrule uses no status. Its file answers 200. When the file is missing, the server's response comes back unchanged. - Only an
overridegets a Content-Type by default. When itsresponse_headersname none, a newoverrideis givenContent-Type: application/json; charset=utf-8, because its response carries only the rule's headers. Anextendormap_localrule gets no response headers unless you give them, so the server's Content-Type, or the file's, stands. - A change of mode keeps the status and the response headers.
update_rulekeeps both unless you send new ones. Anoverridemadeextendkeeps its status, such as 200, in place of the server's, so sendresponse_status0with the change to keep the server's. Anextendrule that keeps the server's status needs aresponse_statusto become anoverride. Amap_localrule has no status of its own, so one madeextendoroverridewithout aresponse_statustakes the status a new rule in that mode starts with: 200 for anoverride, the server's for anextendrule. A rule made anoverridekeeps its stored response headers as well, so it answers with no Content-Type unless they name one. Sendresponse_headerswith the change. The approval panel says what the rule keeps. - A rule never sets a request's
Content-LengthorTransfer-Encoding.request_headersare set over the app's own headers, except these 2, which describe the app's body and stay as the app sent them. - A rule from before ReqRes 1.1 can still answer 200. Rules saved before ReqRes 1.1 can carry status 200 and the JSON Content-Type in every mode. At its first launch, ReqRes 1.1 reset each
extendrule that sets a request header and still had that untouched response: status 200, that Content-Type alone and no body. Such a rule now keeps the server's status and headers. ReqRes 1.1 also removed that Content-Type from eachmap_localrule whose only response header it was. Other rules keep what they saved, so an olderextendrule can still answer 200 in place of the server's status.list_rulesshows each rule's status.
Errors
When ReqRes refuses a call, the agent receives the HTTP status, an error code and a message.
| Code | Status | Meaning |
|---|---|---|
consent_denied | 403 | You clicked Deny, or agents may not answer held requests. If the MCP server is turned off while a change waits, the agent gets a connection error instead, and the activity log shows the change as denied. |
consent_timeout | 408 | Nobody answered the approval panel within 45 s. Nothing changed. |
limit_reached | 403 | The free limit of 2 host filters or 1 rule is reached. |
not_found | 404 | No request, rule, host filter, saved session or held request has that id. A held request's id stops working when its countdown ends. A kind=relay row has no body, stream or RPC to read. |
in_flight | 409 | The request has not finished, so query_session_body and the rpc view cannot read it yet. |
not_a_stream | 400 | The events or assembled view was asked for a response that is not SSE or NDJSON. |
not_an_rpc | 400 | The rpc view was asked for a request that is not a gRPC, gRPC-Web or Connect call. |
not_a_websocket | 400 | list_messages was given a uid that is not a WebSocket's 101 row. |
bad_request | 400 | An argument is missing or not valid. The message says what to send. |
unavailable | 503 | Capture cannot start or stop yet, because setup is not finished or capture is still changing state. ReqRes also returns it when this build lacks the feature. start_capture also gets it when another copy of ReqRes, or another program, holds 127.0.0.1:50001, where the extension delivers what it captures. The message says which. |
internal_error | 500 | ReqRes could not make the change. |
For errors before a call reaches ReqRes, such as "Cannot reach ReqRes", see Fix agent errors, missing agent traffic and the App column.