proxyman-traffic-debugging

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Proxyman Traffic Debugging And MCP Operations

Proxyman流量调试与MCP操作

Use this skill after Proxyman MCP is configured. It teaches the agent how to use Proxyman as a local MCP server for traffic debugging and full Proxyman operations.
If Proxyman MCP tools are not available, stop and use
proxyman-mcp-setup
. If Proxyman is not installed, use
proxyman-download-setup
.
Proxyman MCP is not a cloud API. MCP clients talk to the bundled
mcp-server
executable over stdio, and the bridge controls a running local Proxyman app.
Treat
tools/list
,
resources/list
, and
prompts/list
from the connected MCP server as the current source of truth when exact schemas or tool availability matter.
在配置完成Proxyman MCP后使用此技能。它会指导Agent如何将Proxyman作为本地MCP服务器进行流量调试及全功能操作。
如果Proxyman MCP工具不可用,请停止操作并使用
proxyman-mcp-setup
。如果未安装Proxyman,请使用
proxyman-download-setup
Proxyman MCP并非云API。MCP客户端通过stdio与内置的
mcp-server
可执行文件通信,桥接程序会控制本地运行的Proxyman应用。
当涉及精确的 schema 或工具可用性时,请以连接的MCP服务器返回的
tools/list
resources/list
prompts/list
作为当前的权威依据。

Mental Model

心智模型

  • MCP clients talk to the bundled
    mcp-server
    executable over stdio.
  • The
    mcp-server
    bridge reads a local handshake file, then forwards requests to the running Proxyman app at
    http://127.0.0.1:<ephemeral-port>/mcp
    .
  • The app's local HTTP server is localhost-only and authenticated with a bearer token from the handshake file.
  • Do not hardcode the HTTP port or token. They are regenerated by the app and discovered from the handshake.
  • Prefer the stdio MCP bridge over direct HTTP calls because the bridge adds schema validation, prompts, resources, annotations, structured content, and extra redaction safeguards.
  • On Windows, the bridge is typically
    mcp-server.exe
    beside
    Proxyman.exe
    . On Linux AppImage builds, Proxyman prepares a stable bridge at
    ${XDG_CONFIG_HOME:-$HOME/.config}/Proxyman/bin/mcp-server
    after the app launches.
  • Flow tools expose the app's active session/sidebar data source, including Atlantis, saved requests, pinned flows, imported sessions, and remote folders when selected, so results should match what the user sees in Proxyman.
  • set_system_proxy
    , Terminal injection,
    .app
    Electron injection, and bridge app-control tools are macOS-oriented. On another platform, rely on the live tool list and schemas before offering them.
  • The tool list below is an orientation map. Use the live MCP schemas before sending calls, especially after Proxyman updates.
  • MCP客户端通过stdio与内置的
    mcp-server
    可执行文件通信。
  • mcp-server
    桥接程序读取本地握手文件,然后将请求转发至运行在
    http://127.0.0.1:<临时端口>/mcp
    的Proxyman应用。
  • 应用的本地HTTP服务器仅允许本地访问,并通过握手文件中的Bearer Token进行身份验证。
  • 请勿硬编码HTTP端口或Token,它们由应用重新生成并从握手文件中获取。
  • 优先使用stdio MCP桥接程序而非直接HTTP调用,因为桥接程序会添加schema验证、提示信息、资源管理、注释、结构化内容以及额外的脱敏防护。
  • 在Windows系统中,桥接程序通常是与
    Proxyman.exe
    同目录的
    mcp-server.exe
    。在Linux AppImage版本中,Proxyman启动后会在
    ${XDG_CONFIG_HOME:-$HOME/.config}/Proxyman/bin/mcp-server
    路径下生成稳定的桥接程序。
  • 流量工具会展示应用的活跃会话/侧边栏数据源,包括Atlantis、已保存的请求、固定的流量、导入的会话以及选中的远程文件夹,因此返回结果应与用户在Proxyman中看到的内容一致。
  • set_system_proxy
    、终端注入、
    .app
    Electron注入和桥接应用控制工具均为macOS专属功能。在其他平台上,需先确认实时工具列表和schema后再提供相关操作。
  • 以下工具列表仅作为参考指南。发送调用前请使用实时MCP schema,尤其是Proxyman更新后。

First Calls In A Session

会话初始调用步骤

  1. List tools/resources/prompts when the MCP client exposes discovery calls.
  2. Use
    get_version
    to confirm the bridge can reach the app.
  3. Use
    get_proxy_status
    to check recording state, proxy port, and SSL Proxying.
  4. For setup questions, call
    answer_setup_question
    before inventing advice.
  5. For traffic work, call
    get_flows
    or
    filter_flows
    , then use returned
    flow_id
    values with detail/export/code tools.
  6. For mutations, inspect current state first with the relevant list/status tool, then make the smallest requested change.
The stdio server uses strict schemas. Always obey
tools/list
; unknown parameters and invalid enum values are rejected as protocol errors.
  1. 当MCP客户端支持发现调用时,先列出工具/资源/提示信息。
  2. 使用
    get_version
    确认桥接程序可连接到应用。
  3. 使用
    get_proxy_status
    检查录制状态、代理端口和SSL代理设置。
  4. 对于设置类问题,先调用
    answer_setup_question
    再提供建议。
  5. 处理流量相关工作时,先调用
    get_flows
    filter_flows
    ,然后使用返回的
    flow_id
    值调用详情/导出/代码生成工具。
  6. 执行变更操作前,先使用相关的列表/状态工具检查当前状态,再进行最小范围的请求变更。
stdio服务器使用严格的schema。请严格遵循
tools/list
的要求;未知参数和无效枚举值会被视为协议错误而拒绝。

Privacy And Consent

隐私与授权

  • Redaction is controlled in Proxyman Settings > MCP. When enabled, Proxyman redacts sensitive headers, cookies, query secrets, JWTs, bearer tokens, and common secret/password fields.
  • Flow summaries/details, WebSocket payload previews, Compose drafts/results, exported cURL, and generated code honor the app's privacy setting.
  • export_flows
    writes original captured data to HAR or ProxymanLogv2 on disk. The file contents are not redacted by the MCP preview setting.
  • Ask before disabling redaction, exporting files, installing/uninstalling certificates, enabling system proxy, quitting Proxyman, clearing sessions, deleting rules, launching injected terminals, launching Electron apps, running guided automations, or sending upstream-proxy credentials.
  • export_flows
    requires an explicit user-approved save path. If the path is a directory, Proxyman auto-generates a filename.
  • If the user asks for raw secrets, confirm that they understand redaction may need to be disabled in Proxyman Settings > MCP.
  • 脱敏设置在Proxyman设置>MCP中进行控制。启用后,Proxyman会自动脱敏敏感请求头、Cookie、查询参数中的密钥、JWT、Bearer Token以及常见的密钥/密码字段。
  • 流量摘要/详情、WebSocket负载预览、Compose草稿/结果、导出的cURL命令以及生成的代码均会遵循应用的隐私设置。
  • export_flows
    会将原始捕获数据写入磁盘的HAR或ProxymanLogv2文件中。文件内容不会受MCP预览设置的脱敏影响。
  • 在执行以下操作前需征得用户同意:关闭脱敏、导出文件、安装/卸载证书、启用系统代理、退出Proxyman、清除会话、删除规则、启动注入终端、启动Electron应用、运行引导式自动化流程或发送上游代理凭证。
  • export_flows
    需要用户明确批准的保存路径。如果路径是目录,Proxyman会自动生成文件名。
  • 如果用户要求获取原始敏感信息,请确认他们了解需要在Proxyman设置>MCP中关闭脱敏功能。

Core Tool Groups

核心工具组

Use this section to choose the right workflow quickly. Do not copy these names blindly; confirm current schemas and enum values from the connected MCP server.
Read-only inspection:
  • get_version
    ,
    get_proxy_status
    ,
    get_flows
    ,
    filter_flows
    ,
    get_flow_detail
  • list_websocket_sessions
    ,
    get_websocket_messages
  • list_rules
    ,
    list_reverse_proxies
    ,
    list_network_conditions
    ,
    list_dns_spoofing
  • get_ssl_proxying_list
    ,
    get_system_proxy_status
  • get_certificate_status
    ,
    get_external_proxy
    ,
    list_tool_status
Capture setup and guidance:
  • answer_setup_question
    for user-specific setup advice with diagnosis, steps, verification, citations, and next actions.
  • search_docs
    ,
    list_setup_workflows
    ,
    list_popular_workflows
  • open_proxyman_screen
    for app guide screens.
  • run_guided_setup
    for safe built-in automations: Chrome current profile, Chrome new profile, Firefox, Android emulator override/revert.
Session and proxy control:
  • toggle_recording
    ,
    clear_session
  • get_system_proxy_status
    ,
    set_system_proxy
  • enable_ssl_proxying
    ,
    disable_ssl_proxying
    ,
    toggle_ssl_proxying_domain
  • SSL Proxying domain parameters accept exact hosts and wildcard patterns such as
    *.example.com
    . Use the exact same pattern when disabling or toggling a wildcard rule, then verify the result with
    get_ssl_proxying_list
    .
  • install_certificate
    ,
    uninstall_certificate
  • get_external_proxy
    ,
    set_external_proxy
  • toggle_no_caching
    changes the No Caching feature directly;
    toggle_tool
    can also set its global state.
Rule management:
  • create_breakpoint
    ,
    create_map_local
    ,
    create_map_local_from_flow
    ,
    create_map_remote
    ,
    create_blacklist
  • create_scripting_rule
    ,
    create_allow_list
    ,
    create_network_condition
    ,
    create_dns_spoofing
    ,
    create_reverse_proxy
  • list_rules
    ,
    delete_rule
    ,
    toggle_rule
  • Use
    list_reverse_proxies
    ,
    list_network_conditions
    , and
    list_dns_spoofing
    for those feature-specific IDs and details.
    list_rules
    does not return Reverse Proxy entries.
  • update_breakpoint
    ,
    update_map_local
    ,
    update_map_remote
    ,
    update_blacklist
    ,
    update_scripting_rule
    ,
    update_allow_list
    ,
    update_network_condition
    ,
    update_dns_spoofing
    ,
    update_reverse_proxy
  • toggle_tool
    toggles whole features such as
    breakpoint
    ,
    map_local
    ,
    map_remote
    ,
    blacklist
    ,
    scripting
    ,
    dns_spoofing
    ,
    network_throttling
    ,
    whitelist
    ,
    reverse_proxy
    ,
    no_caching
    , and
    external_proxy
    .
  • Successful MCP rule CRUD, rule toggles, and feature toggles refresh open Proxyman tool lists and rule editors automatically. Deleting a rule that is currently being edited closes that editor.
  • Update commands preserve the rule ID. Continue using the original ID for later toggle, update, or delete calls.
  • Rule
    method
    fields accept
    QUERY
    alongside the established HTTP methods. Use uppercase
    "QUERY"
    for an exact RFC 10008 rule; use
    "ANY"
    only when the rule should also affect other methods.
  • Set
    include_paths
    explicitly when matching scope matters. Defaults mirror each GUI and differ across rule types.
  • Creating Scripting, Allow List, Network Condition, DNS Spoofing, or Reverse Proxy entries auto-enables that feature. Other rule creation may leave the global feature disabled; verify with
    list_tool_status
    .
Flow operations:
  • export_flow_curl
  • export_flows
    with
    format: "har"
    or
    "proxymanlogv2"
  • generate_code
    with targets
    curl
    ,
    python
    ,
    swift_urlsession
    ,
    swift_alamofire
    ,
    swift_moya
    ,
    go
    ,
    node_fetch
    ,
    node_http
    ,
    axios
    ,
    javascript_jquery
    ,
    kotlin_okhttp
    ,
    java_httpclient
    ,
    dart
    ,
    php_guzzle
    ,
    rust_reqwest
    ,
    objective_c
    ,
    httpie
    ,
    har
    , and
    postman
    .
Compose and WebSocket:
  • create_compose_http
    ,
    create_compose_http_from_flow
    ,
    get_compose_http
    ,
    update_compose_http
    ,
    send_compose_http
    ,
    delete_compose_http
  • list_websocket_sessions
    ,
    get_websocket_messages
    ,
    close_websocket_session
Runtime/app injection:
  • inject_terminal
    ,
    get_terminal_manual_command
  • inject_electron
App control:
  • open_proxyman
    can launch regular or Setapp Proxyman if installed. Wait briefly, then retry
    get_version
    .
  • quit_proxyman
    quits the local app and should be treated as destructive.
使用本节内容快速选择合适的工作流。请勿盲目复制这些名称;请从连接的MCP服务器确认当前的schema和枚举值。
只读检查类:
  • get_version
    get_proxy_status
    get_flows
    filter_flows
    get_flow_detail
  • list_websocket_sessions
    get_websocket_messages
  • list_rules
    list_reverse_proxies
    list_network_conditions
    list_dns_spoofing
  • get_ssl_proxying_list
    get_system_proxy_status
  • get_certificate_status
    get_external_proxy
    list_tool_status
捕获设置与引导类:
  • answer_setup_question
    :为用户提供包含诊断、步骤、验证、参考和后续操作的个性化设置建议。
  • search_docs
    list_setup_workflows
    list_popular_workflows
  • open_proxyman_screen
    :打开应用引导界面。
  • run_guided_setup
    :执行安全的内置自动化流程:Chrome当前配置文件、Chrome新配置文件、Firefox、Android模拟器覆盖/恢复。
会话与代理控制类:
  • toggle_recording
    clear_session
  • get_system_proxy_status
    set_system_proxy
  • enable_ssl_proxying
    disable_ssl_proxying
    toggle_ssl_proxying_domain
  • SSL代理域名参数支持精确主机和通配符模式,例如
    *.example.com
    。禁用或切换通配符规则时请使用完全相同的模式,然后通过
    get_ssl_proxying_list
    验证结果。
  • install_certificate
    uninstall_certificate
  • get_external_proxy
    set_external_proxy
  • toggle_no_caching
    可直接更改无缓存功能;
    toggle_tool
    也可设置其全局状态。
规则管理类:
  • create_breakpoint
    create_map_local
    create_map_local_from_flow
    create_map_remote
    create_blacklist
  • create_scripting_rule
    create_allow_list
    create_network_condition
    create_dns_spoofing
    create_reverse_proxy
  • list_rules
    delete_rule
    toggle_rule
  • 对于反向代理、网络条件和DNS欺骗功能,请使用
    list_reverse_proxies
    list_network_conditions
    list_dns_spoofing
    获取特定功能的ID和详情。
    list_rules
    不会返回反向代理条目。
  • update_breakpoint
    update_map_local
    update_map_remote
    update_blacklist
    update_scripting_rule
    update_allow_list
    update_network_condition
    update_dns_spoofing
    update_reverse_proxy
  • toggle_tool
    可切换整个功能的状态,例如
    breakpoint
    map_local
    map_remote
    blacklist
    scripting
    dns_spoofing
    network_throttling
    whitelist
    reverse_proxy
    no_caching
    external_proxy
  • 成功的MCP规则增删改查、规则切换和功能切换会自动刷新Proxyman的工具列表和规则编辑器。删除当前正在编辑的规则会关闭对应的编辑器。
  • 更新命令会保留规则ID。后续的切换、更新或删除调用请继续使用原始ID。
  • 规则的
    method
    字段除了支持标准HTTP方法外,还支持
    QUERY
    。对于符合RFC 10008的精确规则,请使用大写的
    "QUERY"
    ;仅当规则需要影响其他方法时才使用
    "ANY"
  • 当匹配范围很重要时,请显式设置
    include_paths
    。默认值与各GUI界面一致,且不同规则类型的默认值不同。
  • 创建脚本规则、允许列表、网络条件、DNS欺骗或反向代理条目会自动启用对应的功能。其他规则创建操作可能不会启用全局功能;请通过
    list_tool_status
    进行验证。
流量操作类:
  • export_flow_curl
  • export_flows
    ,支持
    format: "har"
    "proxymanlogv2"
    格式
  • generate_code
    ,支持的目标语言/工具包括
    curl
    python
    swift_urlsession
    swift_alamofire
    swift_moya
    go
    node_fetch
    node_http
    axios
    javascript_jquery
    kotlin_okhttp
    java_httpclient
    dart
    php_guzzle
    rust_reqwest
    objective_c
    httpie
    har
    postman
Compose与WebSocket类:
  • create_compose_http
    create_compose_http_from_flow
    get_compose_http
    update_compose_http
    send_compose_http
    delete_compose_http
  • list_websocket_sessions
    get_websocket_messages
    close_websocket_session
运行时/应用注入类:
  • inject_terminal
    get_terminal_manual_command
  • inject_electron
应用控制类:
  • open_proxyman
    可启动常规版本或Setapp版本的Proxyman(如果已安装)。请稍作等待后重试
    get_version
  • quit_proxyman
    会退出本地应用,此操作具有破坏性,请谨慎处理。

Common Workflows

常见工作流

When a workflow mutates Proxyman state, explain what will change before calling the tool.
当工作流需要修改Proxyman状态时,请在调用工具前说明将要进行的变更。

Inspect Traffic

检查流量

  1. get_proxy_status
  2. get_flows
    with
    limit
    ,
    host_filter
    ,
    method_filter
    , or
    status_filter
    , or use
    filter_flows
    for body/header/status matching.
  3. get_flow_detail
    for a chosen
    flow_id
    .
  4. Use
    export_flow_curl
    or
    generate_code
    only after confirming the flow is the one the user wants.
  5. Treat flow results as recent snapshots: list/filter results cap at 500 and body previews are truncated. Request an approved file export only when the user needs complete archival data.
  1. get_proxy_status
  2. 使用
    get_flows
    并配合
    limit
    host_filter
    method_filter
    status_filter
    参数,或使用
    filter_flows
    进行请求体/请求头/状态码匹配。
  3. 对选中的
    flow_id
    调用
    get_flow_detail
  4. 仅在确认流量符合用户需求后,再使用
    export_flow_curl
    generate_code
  5. 流量结果为最新快照:列表/过滤结果最多返回500条,请求体预览会被截断。仅当用户需要完整归档数据时,再请求批准进行文件导出。

Verify A Feature From Traffic

通过流量验证功能

  1. Ask for the feature, expected endpoint behavior, and approximate time window if the user has not provided it.
  2. get_proxy_status
    to confirm recording and proxy state.
  3. Use
    get_flows
    or
    filter_flows
    to find relevant requests.
  4. Group results by endpoint, method, status, timing, and request sequence.
  5. Inspect representative
    flow_id
    values with
    get_flow_detail
    .
  6. Report a verdict: passed, suspicious, failed, or inconclusive.
Recommended report shape:
text
Feature Traffic Report

Verdict: ...
Traffic window: ...
Endpoint summary: ...
Evidence: ...
Possible issues: ...
Next action: ...
  1. 如果用户未提供相关信息,请询问功能名称、预期端点行为和大致时间范围。
  2. get_proxy_status
    确认录制状态和代理状态。
  3. 使用
    get_flows
    filter_flows
    查找相关请求。
  4. 按端点、方法、状态码、时间和请求序列对结果进行分组。
  5. 使用
    get_flow_detail
    检查具有代表性的
    flow_id
  6. 给出结论:通过、可疑、失败或不确定。
推荐的报告格式:
text
功能流量报告

结论: ...
流量时间范围: ...
端点摘要: ...
证据: ...
可能存在的问题: ...
后续操作: ...

Help A User Capture Missing Traffic

帮助用户解决捕获缺失的问题

  1. answer_setup_question
    with the user's exact symptom and any platform/app hints.
  2. Check
    get_proxy_status
    ,
    get_certificate_status
    , and
    get_ssl_proxying_list
    .
  3. If localhost is involved, prefer Reverse Proxy guidance or
    create_reverse_proxy
    .
  4. If iOS plus VPN is involved, prefer Atlantis guidance.
  5. If a browser, Android emulator, or terminal automation is offered, ask before
    run_guided_setup
    or
    inject_terminal
    .
  1. 使用用户提供的具体症状和平台/应用提示调用
    answer_setup_question
  2. 检查
    get_proxy_status
    get_certificate_status
    get_ssl_proxying_list
  3. 如果涉及本地主机,优先提供反向代理指导或调用
    create_reverse_proxy
  4. 如果涉及iOS加VPN,优先提供Atlantis相关指导。
  5. 如果涉及浏览器、Android模拟器或终端自动化,在调用
    run_guided_setup
    inject_terminal
    前请征得用户同意。

Create A Debugging Rule From Captured Traffic

从捕获的流量创建调试规则

  1. get_flows
    or
    filter_flows
    to locate the target request.
  2. get_flow_detail
    to confirm URL, method, body, and matched tools.
  3. Use
    create_map_local_from_flow
    when the user wants to reuse the captured response exactly.
  4. Use
    create_map_local
    only when the user provides or wants a literal custom response.
  5. Use the appropriate inventory tool to verify the new rule and use
    list_tool_status
    to confirm its feature is enabled.
  1. 使用
    get_flows
    filter_flows
    定位目标请求。
  2. 使用
    get_flow_detail
    确认URL、方法、请求体和匹配的工具。
  3. 如果用户希望完全复用捕获的响应,请使用
    create_map_local_from_flow
  4. 仅当用户提供或需要自定义字面响应时,才使用
    create_map_local
  5. 使用对应的库存工具验证新规则,并通过
    list_tool_status
    确认其功能已启用。

Manage Existing Rules

管理现有规则

  1. Use
    list_rules
    for matching rules,
    list_reverse_proxies
    for Reverse Proxy,
    list_network_conditions
    for Network Condition, and
    list_dns_spoofing
    for DNS Spoofing.
  2. Use the returned
    id
    ; do not infer IDs from names.
  3. For
    delete_rule
    and
    toggle_rule
    , pass the exact
    rule_type
    . Common values are
    breakpoint
    ,
    maplocal
    ,
    mapremote
    ,
    blacklist
    ,
    scripting
    ,
    whitelist
    ,
    reverse_proxy
    ,
    network_condition
    , and
    dns_spoofing
    .
  4. For updates, omit fields that should stay unchanged. For GraphQL operation filters, an empty string or
    null
    clears the filter where supported.
  5. Exception: when changing a Map Local literal response, pass
    response_body
    ,
    status_code
    , and
    content_type
    together because the response file is rebuilt with defaults for omitted response fields.
  6. Only one Network Condition can be active at a time.
  1. 使用
    list_rules
    查找匹配规则,使用
    list_reverse_proxies
    查找反向代理规则,使用
    list_network_conditions
    查找网络条件规则,使用
    list_dns_spoofing
    查找DNS欺骗规则。
  2. 使用返回的
    id
    ;请勿从名称推断ID。
  3. 执行
    delete_rule
    toggle_rule
    时,请传入精确的
    rule_type
    。常见值包括
    breakpoint
    maplocal
    mapremote
    blacklist
    scripting
    whitelist
    reverse_proxy
    network_condition
    dns_spoofing
  4. 更新规则时,请省略无需修改的字段。对于GraphQL操作过滤器,空字符串或
    null
    会清除过滤器(如果支持)。
  5. 例外情况:修改Map Local的字面响应时,请同时传入
    response_body
    status_code
    content_type
    ,因为省略响应字段时会使用默认值重建响应文件。
  6. 同一时间只能激活一个网络条件规则。

Configure An External Proxy

配置外部代理

  1. Use
    get_external_proxy
    and identify the
    http
    ,
    https
    ,
    socks
    , or
    pac
    setting to change.
  2. Ask before sending credentials.
  3. Use
    set_external_proxy
    with a complete setting for that kind. Omitted host, port, enabled, or authentication values are not patch-preserved reliably.
  4. Call
    get_external_proxy
    again to verify the global feature and protocol setting.
  1. 使用
    get_external_proxy
    确定需要修改的
    http
    https
    socks
    pac
    设置。
  2. 发送凭证前请征得用户同意。
  3. 使用
    set_external_proxy
    并传入对应类型的完整设置。省略的主机、端口、启用状态或认证值无法可靠地保留原有设置。
  4. 再次调用
    get_external_proxy
    验证全局功能和协议设置。

Write A Scripting Rule

编写脚本规则

  1. Read
    docs://scripting/snippet-code
    before generating non-trivial
    script_content
    , or use the
    write_scripting_rule
    prompt when the client exposes MCP prompts. Do not rely on generic proxy scripting syntax.
  2. Use the canonical positional signatures exactly:
    async function onRequest(context, url, request)
    and
    async function onResponse(context, url, request, response)
    .
  3. Generate only the handlers needed for the user's case.
    onRequest
    must end with
    return request;
    ;
    onResponse
    must end with
    return response;
    .
  4. Request and response headers are mutable key-value objects. Use
    response.statusCode
    for an HTTP status code and consult the resource for body types and less common fields.
  5. Never generate one-argument handlers such as
    onRequest(request)
    or
    onResponse(response)
    . Proxyman passes
    context
    first, so those handlers target the wrong object.
  6. The app validates JavaScript syntax, handler arity/order, and final return values before creating or updating a Scripting rule. Fix the actionable tool error and retry rather than weakening the script.
  1. 在生成复杂的
    script_content
    前,请先查看
    docs://scripting/snippet-code
    ,或当客户端支持MCP提示时使用
    write_scripting_rule
    提示。请勿依赖通用代理脚本语法。
  2. 严格使用标准的位置签名:
    async function onRequest(context, url, request)
    async function onResponse(context, url, request, response)
  3. 仅生成用户需求所需的处理函数。
    onRequest
    必须以
    return request;
    结尾;
    onResponse
    必须以
    return response;
    结尾。
  4. 请求和响应头是可变的键值对象。使用
    response.statusCode
    设置HTTP状态码,并参考资源文档了解请求体类型和不常见字段。
  5. 切勿生成单参数处理函数,例如
    onRequest(request)
    onResponse(response)
    。Proxyman会先传入
    context
    ,因此这些处理函数会错误地指向对象。
  6. 应用会在创建或更新脚本规则前验证JavaScript语法、处理函数的参数数量/顺序以及最终返回值。请根据工具返回的可操作错误进行修复并重试,而非简化脚本。

Compose And Replay An HTTP Request

编写并重放HTTP请求

  1. Use
    create_compose_http
    for a blank draft or
    create_compose_http_from_flow
    to seed from a captured flow.
  2. Use
    update_compose_http
    with
    method
    ,
    url
    ,
    headers: [{ "key": "...", "value": "..." }]
    , and UTF-8
    body_text
    .
    method: "QUERY"
    is supported and can be sent with
    body_text
    .
  3. Use
    send_compose_http
    to send the draft and receive the resulting captured flow summary/detail.
  4. send_compose_http
    is HTTP-only; WebSocket URLs are rejected.
  5. Compose IDs are in-memory and ephemeral. Delete unused drafts with
    delete_compose_http
    .
  1. 使用
    create_compose_http
    创建空白草稿,或使用
    create_compose_http_from_flow
    从捕获的流量生成草稿。
  2. 使用
    update_compose_http
    并传入
    method
    url
    headers: [{ "key": "...", "value": "..." }]
    和UTF-8编码的
    body_text
    。支持
    method: "QUERY"
    ,且可与
    body_text
    一起发送。
  3. 使用
    send_compose_http
    发送草稿并接收捕获到的流量摘要/详情。
  4. send_compose_http
    仅支持HTTP;WebSocket URL会被拒绝。
  5. Compose ID仅存在于内存中且临时有效。请使用
    delete_compose_http
    删除未使用的草稿。

Inspect WebSockets

检查WebSocket

  1. list_websocket_sessions
  2. get_websocket_messages
    with
    flow_id
    ,
    direction: "all" | "client" | "server"
    ,
    include_ping_pong
    , and
    include_payload
    .
  3. Payload previews are truncated to 4,096 characters and honor redaction.
  4. close_websocket_session
    only supports active Compose-created WebSocket sessions.
  1. list_websocket_sessions
  2. 使用
    get_websocket_messages
    并传入
    flow_id
    direction: "all" | "client" | "server"
    include_ping_pong
    include_payload
    参数。
  3. 负载预览会被截断至4096字符,并遵循脱敏设置。
  4. close_websocket_session
    仅支持通过Compose创建的活跃WebSocket会话。

Built-In Resources And Prompts

内置资源与提示

Use built-in resources and prompts for Proxyman-specific setup and scripting guidance before reaching for generic web advice.
Resources:
  • docs://setup/ios-device
  • docs://setup/ios-simulator
  • docs://setup/android-device
  • docs://setup/android-emulator
  • docs://setup/tvos-watchos
  • docs://setup/automatic-setup
  • docs://setup/manual-setup
  • docs://setup/firefox
  • docs://setup/atlantis
  • docs://troubleshooting/vpn
  • docs://troubleshooting/localhost
  • docs://troubleshooting/third-party-libraries
  • docs://scripting/snippet-code
  • insights://popular-workflows
  • Resource template:
    docs://search/{query}
Prompts:
  • recommend_capture_path
  • troubleshoot_missing_traffic
  • explain_vpn_or_atlantis_choice
  • write_scripting_rule
These resources/prompts are curated to match the app's own automation paths.
在寻求通用网络建议前,请先使用Proxyman专属的内置资源和提示获取设置与脚本指导。
资源:
  • docs://setup/ios-device
  • docs://setup/ios-simulator
  • docs://setup/android-device
  • docs://setup/android-emulator
  • docs://setup/tvos-watchos
  • docs://setup/automatic-setup
  • docs://setup/manual-setup
  • docs://setup/firefox
  • docs://setup/atlantis
  • docs://troubleshooting/vpn
  • docs://troubleshooting/localhost
  • docs://troubleshooting/third-party-libraries
  • docs://scripting/snippet-code
  • insights://popular-workflows
  • 资源模板:
    docs://search/{query}
提示:
  • recommend_capture_path
  • troubleshoot_missing_traffic
  • explain_vpn_or_atlantis_choice
  • write_scripting_rule
这些资源/提示均经过精心整理,与应用自身的自动化流程保持一致。

Troubleshooting

故障排查

  • "Handshake file not found": Proxyman is not running, MCP is disabled, or the app has not finished startup. Launch Proxyman and enable Settings > MCP.
  • "Invalid handshake file" or HTTP 401: restart Proxyman so the bridge gets the current token.
  • "Cannot connect to Proxyman": confirm the app is open and the MCP status shows "Running on port ...".
  • Linux AppImage bridge missing: launch Proxyman once, enable Settings > MCP, restart the app, then use the copied bridge from
    ${XDG_CONFIG_HOME:-$HOME/.config}/Proxyman/bin/mcp-server
    .
  • No flows appear: check recording, target proxy settings, certificate trust, SSL Proxying, and whether the active Proxyman sidebar/session source is the expected one.
  • HTTPS bodies are opaque: check
    get_certificate_status
    and
    get_ssl_proxying_list
    , then enable SSL Proxying for the host.
  • Localhost is missing: use Reverse Proxy; many localhost calls bypass the system proxy path.
  • VPN blocks capture: for iOS apps, recommend Atlantis before fighting the device proxy path.
  • Browser or terminal automation fails: macOS Automation permission may be missing. Ask the user to allow Proxyman in System Settings > Privacy & Security > Automation.
  • Android emulator automation also needs an available root certificate path and local IPv4 address. Check certificate status before retrying it.
  • Do not offer macOS-only system proxy, Terminal, Electron
    .app
    , or app-control operations on another platform unless the live MCP server exposes an applicable schema.
  • Certificate install in automatic mode can trigger a macOS sudo dialog; manual mode opens Keychain Access for user trust steps.
  • Flow IDs can disappear after
    clear_session
    , source changes, app restart, or import/session changes. List flows again before retrying.
  • "Handshake file not found":Proxyman未运行、MCP已禁用或应用未完成启动。请启动Proxyman并启用设置>MCP。
  • "Invalid handshake file"或HTTP 401:重启Proxyman,使桥接程序获取当前Token。
  • "Cannot connect to Proxyman":确认应用已打开,且MCP状态显示"Running on port ..."。
  • Linux AppImage桥接程序缺失:启动一次Proxyman,启用设置>MCP,重启应用,然后使用
    ${XDG_CONFIG_HOME:-$HOME/.config}/Proxyman/bin/mcp-server
    路径下的桥接程序。
  • 无流量显示:检查录制状态、目标代理设置、证书信任状态、SSL代理设置以及Proxyman活跃侧边栏/会话源是否符合预期。
  • HTTPS请求体不可见:检查
    get_certificate_status
    get_ssl_proxying_list
    ,然后为对应主机启用SSL代理。
  • 本地主机流量缺失:使用反向代理;许多本地主机调用会绕过系统代理路径。
  • VPN阻止捕获:对于iOS应用,优先推荐Atlantis,而非尝试修改设备代理路径。
  • 浏览器或终端自动化失败:可能缺少macOS自动化权限。请让用户在系统设置>隐私与安全性>自动化中允许Proxyman。
  • Android模拟器自动化还需要可用的根证书路径和本地IPv4地址。重试前请检查证书状态。
  • 在其他平台上,请勿提供macOS专属的系统代理、终端、Electron
    .app
    或应用控制操作,除非实时MCP服务器暴露了适用的schema。
  • 自动模式安装证书会触发macOS sudo对话框;手动模式会打开钥匙串访问供用户完成信任步骤。
  • 在执行
    clear_session
    、切换数据源、重启应用或导入/更改会话后,Flow ID可能会消失。重试前请重新列出流量。