@branch42-labs/netraptor-mcp 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @branch42-labs/netraptor-mcp
2
2
 
3
- Netraptor's local, read-only MCP server lets coding agents query API traffic captured by the Netraptor Chrome extension. Captured requests are stored in your browser; the local bridge shares tool results with your chosen MCP clients.
3
+ Netraptor's local MCP server lets coding agents query API traffic captured by the Netraptor Chrome extension. The traffic tools are read-only; one opt-in tool can re-run a recorded request (see Live calls). Captured requests are stored in your browser; the local bridge shares tool results with your chosen MCP clients.
4
4
 
5
5
  **Supported setup:** Chrome stable on desktop (normal windows), one browser profile per bridge, and MCP clients running on the same computer. Several clients can share that bridge. Edge, Brave, incognito, remote/container clients and running several browsers at once are not part of the initial support. See the [support contract](https://github.com/branch42-labs/netraptor-extension/blob/master/docs/support-contract.md).
6
6
 
@@ -131,9 +131,28 @@ These are two sources with different contents:
131
131
  4. `get_endpoint` returns schema and examples. Prefer its stable `key`.
132
132
  5. `get_request` reads headers and bodies for an example's request ID. Pass the confirmed `sessionId` and `browserInstanceId`; a request from another session or browser is rejected.
133
133
  6. `watch_requests` follows newly captured requests: start with `{ "tabId": 123, "browserInstanceId": "<from list_sessions>", "afterId": 0 }`, then use each response's `nextCursor` as the next `afterId`. Drain `hasMore` pages before adding `waitMs: 5000` to wait for new calls. Empty batches are normal. Results contain request IDs and compact metadata; use `get_request` for bodies.
134
+ 7. `call_endpoint` re-runs a recorded request in the confirmed tab and returns the fresh response, e.g. `{ "tabId": 123, "browserInstanceId": "<from list_sessions>", "requestId": 42 }`. Optional `url` and `variables` change the path, query or GraphQL variables. See Live calls.
134
135
 
135
136
  This live feed uses bounded long polling. It does not push unsolicited notifications into an agent conversation. Recording must be enabled for the site, and an agent must call the tools to read traffic.
136
137
 
138
+ ## Live calls
139
+
140
+ `call_endpoint` re-runs a request Netraptor already recorded, inside your logged-in tab, and returns the fresh response. Use it to check a change against the running app. It sends a real request as you, so your MCP client may ask before it runs.
141
+
142
+ Limits:
143
+
144
+ - It is off by default. Turn on **Let agents call recorded endpoints** in Netraptor's **Settings → Local MCP server**. An agent cannot turn it on.
145
+ - Only GET, HEAD and GraphQL queries sent by POST. Other methods, mutations, subscriptions, batches and persisted queries without query text are refused.
146
+ - Only recorded endpoints. A `url` must keep the recorded origin and match the endpoint's path template. Path and query parameters may change. Query values shown as `[redacted]` can be passed back unchanged.
147
+ - Headers come from the recorded request and are replayed inside the browser. The agent cannot set headers or a body and never sees credentials.
148
+ - A GraphQL POST query keeps its recorded URL; only `variables` can change.
149
+ - Redirects are not followed. A call that answers with a redirect fails.
150
+ - The tab must still be on the origin where the request was recorded and be recording. The call times out after 8 seconds.
151
+ - The call goes through the page's own fetch, so it also appears in the session and in `watch_requests`.
152
+ - The response is redacted like `get_request`.
153
+
154
+ It needs a Netraptor extension version with live calls. An older extension answers that it does not support live calls; update it.
155
+
137
156
  ## Connection troubleshooting
138
157
 
139
158
  - **Pairing failed:** run the current browser's pairing command again (with the same `NETRAPTOR_HOME` the client uses), then use **Reconnect** in Netraptor Settings. Regenerating a code also requires pairing again.
@@ -152,7 +171,7 @@ This live feed uses bounded long polling. It does not push unsolicited notificat
152
171
  - Agent processes authenticate separately to the shared bridge using an agent-specific HMAC role. A web page cannot use this channel.
153
172
  - Only one authenticated extension connection is active; a newer connection replaces it.
154
173
  - Pairing again, or regenerating the code in Netraptor, replaces the stored secret. The bridge re-reads it at connection upgrade, tool forwarding, handshake completion and browser response delivery. When a successful read observes a changed or removed secret, it closes the old browser and agent connections and fails their pending calls before accepting the handshake or releasing the response. An idle connection stays open until its next boundary. If reading `mcp.json` fails, the loaded secret stays in force. Agents reconnect with the new secret on their next call and must list and reconfirm sessions before reading, because the connected browser may be a different one.
155
- - All exposed tools are read-only. Credential-like headers, URL query and fragment parameters (including OAuth `code`), URL userinfo, `Location`/`Referer`-style URL headers (relative references such as `//cdn.example/cb` keep their target), form fields and JSON fields at any depth (including GraphQL variables) are redacted by name. A truncated or unparseable JSON body is withheld (`requestBodyOmitted`/`responseBodyOmitted`). Values under unrecognized names, plain text and binary bodies are returned as captured.
174
+ - The traffic-reading tools are read-only. `call_endpoint` is off unless you enable it (see Live calls). Credential-like headers, URL query and fragment parameters (including OAuth `code`), URL userinfo, `Location`/`Referer`-style URL headers (relative references such as `//cdn.example/cb` keep their target), form fields and JSON fields at any depth (including GraphQL variables) are redacted by name. A truncated or unparseable JSON body is withheld (`requestBodyOmitted`/`responseBodyOmitted`). Values under unrecognized names, plain text and binary bodies are returned as captured.
156
175
 
157
176
  To pair again, generate a new code in Netraptor Settings and run:
158
177
 
@@ -21,11 +21,12 @@ const target = {
21
21
  };
22
22
  const hasTarget = ({ tabId, sessionId }) => tabId !== undefined || sessionId !== undefined;
23
23
  const targetMessage = { message: "Provide the confirmed tabId or sessionId." };
24
- const CONTENT_TOOLS = new Set(["watch_requests", "list_endpoints", "get_endpoint", "search", "get_request"]);
24
+ const CONTENT_TOOLS = new Set(["watch_requests", "list_endpoints", "get_endpoint", "search", "get_request", "call_endpoint"]);
25
25
  const UPDATE_EXTENSION = "This Netraptor Chrome extension cannot prove its traffic comes from the browser the user confirmed. Update the extension, then call list_sessions and ask the user to confirm the session or tab again.";
26
+ const NO_LIVE_CALLS = "This Netraptor Chrome extension does not support live calls. Update the extension, then try again.";
26
27
  export function createMcpServer(bridge) {
27
28
  const server = new McpServer({ name: "netraptor", version }, {
28
- instructions: "Netraptor provides read-only access to saved API traffic. FIRST call list_sessions. Before reading session traffic, ask the user to confirm the browser tab (Tab ID from tabIds), Session #ID, name, origin and captureState exactly as shown in Netraptor. If the user already explicitly supplied that tab or session ID, treat it as confirmation. If two or more live sessions are available, ask which one to use; NEVER choose by newest timestamp or request count. Every traffic read must pass browserInstanceId from the confirmed list_sessions entry. For a live recording pass the confirmed tabId: it keeps following that tab when Stop/Start gives it a new Session #ID. Pass sessionId for saved sessions that no tab is recording. Tab IDs can be reused after a browser restart, and saved IDs are local to each browser profile. A changed browserInstanceId rejects earlier confirmations, including saved sessions after a restart; call list_sessions and ask the user to reconfirm. isLive/captureState report checked browser recording state; historical status=running alone does NOT mean live. Unknown/unverified requires checking, reload_required means reload the affected page, and an empty watch batch only means no new saved requests during the wait, not that history is disabled. list_sessions and all session responses include lastRequestAt/lastRequestId to verify activity. The DevTools-only feed is separate and unavailable through MCP. After confirmation use scoped search, get_endpoint and get_request. Follow traffic with watch_requests and nextCursor; drain hasMore then wait up to 5000ms. Reconfirm before switching tabs or sessions. Credential-like headers, URL parameters, userinfo, redirect URLs, form fields and JSON fields at any depth are redacted by name; structured bodies that cannot be parsed are omitted. Other body data may remain sensitive.",
29
+ instructions: "Netraptor provides read-only access to saved API traffic, plus an opt-in live call. FIRST call list_sessions. Before reading session traffic, ask the user to confirm the browser tab (Tab ID from tabIds), Session #ID, name, origin and captureState exactly as shown in Netraptor. If the user already explicitly supplied that tab or session ID, treat it as confirmation. If two or more live sessions are available, ask which one to use; NEVER choose by newest timestamp or request count. Every traffic read must pass browserInstanceId from the confirmed list_sessions entry. For a live recording pass the confirmed tabId: it keeps following that tab when Stop/Start gives it a new Session #ID. Pass sessionId for saved sessions that no tab is recording. Tab IDs can be reused after a browser restart, and saved IDs are local to each browser profile. A changed browserInstanceId rejects earlier confirmations, including saved sessions after a restart; call list_sessions and ask the user to reconfirm. isLive/captureState report checked browser recording state; historical status=running alone does NOT mean live. Unknown/unverified requires checking, reload_required means reload the affected page, and an empty watch batch only means no new saved requests during the wait, not that history is disabled. list_sessions and all session responses include lastRequestAt/lastRequestId to verify activity. The DevTools-only feed is separate and unavailable through MCP. After confirmation use scoped search, get_endpoint and get_request. Follow traffic with watch_requests and nextCursor; drain hasMore then wait up to 5000ms. Reconfirm before switching tabs or sessions. Credential-like headers, URL parameters, userinfo, redirect URLs, form fields and JSON fields at any depth are redacted by name; structured bodies that cannot be parsed are omitted. Other body data may remain sensitive. call_endpoint sends a real request in the confirmed tab as the logged-in user. It only re-runs recorded GET, HEAD or GraphQL query endpoints, and only when the user enabled it in Netraptor settings. Use it when the user wants a fresh response, not to explore.",
29
30
  });
30
31
  const annotations = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
31
32
  const proxy = async (method, params) => {
@@ -54,9 +55,10 @@ export function createMcpServer(bridge) {
54
55
  }
55
56
  catch (error) {
56
57
  const message = error instanceof Error ? error.message : String(error);
57
- const detail = method === "watch_requests" && message.includes("Unknown MCP method")
58
- ? UPDATE_EXTENSION
59
- : message;
58
+ const unknownMethod = message.includes("Unknown MCP method");
59
+ const detail = method === "watch_requests" && unknownMethod ? UPDATE_EXTENSION
60
+ : method === "call_endpoint" && unknownMethod ? NO_LIVE_CALLS
61
+ : message;
60
62
  return { ...text(detail), isError: true };
61
63
  }
62
64
  };
@@ -125,6 +127,23 @@ export function createMcpServer(bridge) {
125
127
  .describe("Maximum characters for each request or response body (default 20000, max 200000)."),
126
128
  }),
127
129
  }, (params) => proxy("get_request", params));
130
+ server.registerTool("call_endpoint", {
131
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
132
+ description: "Re-run a recorded GET/HEAD or GraphQL query in the user's logged-in tab and return the fresh response. This sends a real request as the user, only for a recorded endpoint: pass a requestId from get_endpoint examples or watch_requests. url may change path or query parameters of the same endpoint on the same origin; variables replaces GraphQL variables. Headers and credentials are replayed inside the browser and are never shown; you cannot set headers or a body. Writes (other methods, GraphQL mutations, subscriptions, batches) are refused. It is off until the user enables \"Let agents call recorded endpoints\" in Netraptor's Local MCP server settings; if refused, do not try to work around it, ask the user. Confirm the tab with the user first, like other tools. The tab must still be recording on the origin where the request was recorded. The call also appears in the session and in watch_requests. The response is redacted like get_request.",
133
+ inputSchema: z.object({
134
+ tabId: z.number().int().positive()
135
+ .describe("Browser Tab ID of the recording confirmed with the user (tabIds in list_sessions). The call runs in this tab."),
136
+ browserInstanceId,
137
+ requestId: z.number().int().positive()
138
+ .describe("Recorded request ID to replay in that tab's current recording; find one with get_endpoint examples or watch_requests."),
139
+ url: z.string().min(1).max(32768).optional()
140
+ .describe("Optional replacement URL. Must keep the recorded origin and match the recorded endpoint's path template; path and query parameters may change. [redacted] query values can be passed back unchanged. Not allowed for GraphQL POST queries; use variables."),
141
+ variables: z.unknown().optional()
142
+ .describe("Optional replacement GraphQL variables (JSON) for a recorded query."),
143
+ maxBodyChars: z.number().int().min(100).max(200_000).default(20_000)
144
+ .describe("Maximum characters for the response body (default 20000, max 200000)."),
145
+ }),
146
+ }, (params) => proxy("call_endpoint", params));
128
147
  return server;
129
148
  }
130
149
  //# sourceMappingURL=mcp-server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAwB,CAAC;AAE7F,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO;QACL,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;aACzE,CAAC;KACH,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxC,QAAQ,CAAC,8TAA8T,CAAC,CAAC;AAE5U,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,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F,CAAC;KACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@branch42-labs/netraptor-mcp",
3
- "version": "0.6.0",
4
- "description": "Local read-only MCP bridge for Netraptor",
3
+ "version": "0.7.0",
4
+ "description": "Local MCP bridge for Netraptor",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "bin": {