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 集成