Charles Local MCP

io.github.Eason0in由 GitHub 帳號 Eason0in 發布v0.1.3更新於 Oct 24, 2026

Guarded local Charles Proxy automation and bounded XML session evidence

發布方自己的服務:LMCP

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

讓助手在 macOS 上透過受控的設定檔驅動本機 Charles Proxy,完成設定、狀態、清理以及有界的 XML 工作階段取證。

可以做什麼
透過 MCP stdio 暴露本機 Charles Proxy 自動化服務,提供 doctor 檢查、設定檔驗證、設定與清理的計畫與執行、狀態查詢以及工作階段取證等工具。設定與清理使用一次性權杖,15 分鐘後過期,且狀態變更時會被拒絕。session_evidence 工具只讀取指定證據根目錄內的一個本機 XML 匯出檔,並僅回傳有界的去識別化摘要,例如不透明路由參照、方法列舉、計數與大小。
適用情境
當你希望助手在 macOS 上為特定主機與回送目標設定 Charles Proxy,或在不暴露原始主機、路徑、標頭、Cookie 或內文的情況下摘要本機 Charles XML 工作階段時使用。它適合本機除錯與整合工作流程,而非遠端或多使用者情境。
執行需求
僅在 macOS 上以 stdio 程序本機執行。變更類命令需要 Charles 4.6.8,還需要 TOML 設定檔與一個 XML 證據資料夾。可透過 crates.io 搭配 Rust 工具鏈安裝,或使用對應 GitHub 發行版中的通用 .mcpb 套件。狀態預設儲存在每位使用者的應用程式支援目錄,可用 CHARLES_LOCAL_MCP_HOME 或 --state-dir 隔離。
安裝前請注意
下載的執行檔與套件未經 Apple 簽章或公證,macOS 可能顯示警告;安裝前請核對 SHA256SUMS。設定與清理的執行命令會變更本機 Charles 設定,並需要權杖。取證工具會讀取本機 XML 檔案,拒絕 DTD、DOCTYPE 與實體參照,並拒絕符號連結或證據根目錄之外的路徑。設定檔對 MCP 工具為唯讀。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Charles Local MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

charles-local-mcp

Local-only, profile-driven Charles Proxy automation for macOS. The same application service is exposed through a JSON CLI and an MCP stdio server.

Version 0.1.3 supports Charles 4.6.8 on macOS. The public package contains only generic example.com fixtures and no organization-specific hosts or paths.

Profile

toml
schemaVersion = 1
[profiles.demo]sourceHost = "app.example.com"sourcePath = "/api*" # optional Charles path patterndestinationUrl = "http://127.0.0.1:8080"sslHosts = ["app.example.com"]verificationUrl = "https://app.example.com/health"

Omit destinationUrl for a proxy-only profile that disables Map Remote while retaining the exact SSL hosts and optional verification URL. When present, destinationUrl is restricted to loopback addresses.

Map Remote destinations must resolve to a loopback host. verificationUrl is optional, must use HTTPS without embedded credentials, and must match sourceHost.

Commands

console
charles-local-mcp doctor --jsoncharles-local-mcp --profiles-file profiles.toml profiles validate --jsoncharles-local-mcp --profiles-file profiles.toml --evidence-root /absolute/path/exports session evidence --profile demo --xml-file session.xml --jsoncharles-local-mcp --profiles-file profiles.toml setup plan --profile demo --platform android --jsoncharles-local-mcp --profiles-file profiles.toml setup apply --token TOKEN --jsoncharles-local-mcp setup resume --token TOKEN --jsoncharles-local-mcp status --jsoncharles-local-mcp cleanup plan --jsoncharles-local-mcp cleanup apply --token TOKEN --jsoncharles-local-mcp serve

State defaults to ~/Library/Application Support/charles-local-mcp. Tests and integrators can isolate it with CHARLES_LOCAL_MCP_HOME or --state-dir. CLI stdout is JSON only; MCP stdout is protocol only. Diagnostics use stderr.

Mutation commands require macOS and Charles 4.6.8. Setup and cleanup plans expire after 15 minutes, are single-use, and are rejected if state changed. Only one active session is allowed in a state directory.

Local XML session evidence

session evidence reads only a selected local .xml file inside the configured --evidence-root and the selected immutable profile. If the option is omitted, the root defaults to <state-dir>/evidence; it is resolved only when evidence analysis is requested, so existing setup and inspection commands do not require that directory. Relative traversal and absolute paths outside the root are rejected without returning local paths. The evidence root, parent directories, and selected file must not be symbolic links.

The operation uses the selected profile's exact sourceHost only as an internal filter. The bundle returns the profile name with hostScope: "exact", a fixed HTTP method enum, per-bundle opaque route references such as route-001, query parameter counts, numeric status/duration, and request/response sizes when those attributes exist. Repeated raw paths receive the same opaque route reference within one bundle. Other hosts are excluded and reported only as a count.

The operation never returns raw hosts, paths, query names, query values, headers, cookies, credentials, or bodies. Unknown request methods become the fixed value OTHER. It does not upload or persist the source session and does not write an evidence ledger. Files are limited to 10 MiB and 1,000 transactions; output is limited to 100 requests and 50 failures. DTD, DOCTYPE, and entity references are rejected. Some Charles exports include a DOCTYPE declaration; make a trusted local copy and remove the complete declaration before analysis. See docs/session-evidence.md for the contract, safety boundary, limits, and stable error codes.

The real-device procedure is intentionally manual: see docs/manual-smoke.md.

Install

Build from crates.io when a local Rust toolchain is available:

console
cargo install charles-local-mcp --locked

For a one-click MCP client installation on macOS, use the universal .mcpb asset from the matching GitHub Release. The native binary and bundle are not signed or notarized by Apple, so macOS may show a security warning when opening a downloaded asset. Verify SHA256SUMS from that release before installing. The bundle asks for a TOML profiles file and starts charles-local-mcp serve; profiles remain read-only to MCP tools. It also asks for the XML evidence folder that is the only directory the session_evidence tool may read.

Release maintainers should follow docs/releasing.md.

來源:README.md,提交 37b39c6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Local-Mcp 整合