Skip to main content

MCP server for Salesforce debug log analysis — connect, capture, scan, and search Apex logs from any AI-powered editor.

Project description

sf-log-analyzer

MCP server for Salesforce debug log analysis. Connect to any Salesforce org, set up log capture, scan logs for errors, and search log content — all from your AI-powered editor (Cursor, VS Code, etc.).

Quick Start

Add to your .cursor/mcp.json or .vscode/mcp.json:

{
  "mcpServers": {
    "sf-log-analyzer": {
      "command": "uv",
      "args": ["run", "--with", "sf-log-analyzer", "sf-log-analyzer"]
    }
  }
}

Requires uv installed. Works on macOS, Linux, and Windows. No other setup needed.

Windows note: If you hit "Access is denied" errors, replace the args with: ["run", "--with", "sf-log-analyzer", "python", "-c", "from sf_log_analyzer.server import main; main()"]

Tools (16 total)

Connection

  • sf_list_orgs — List Salesforce CLI-authorized orgs
  • sf_connect_org — Connect via CLI alias
  • sf_connect — Connect via raw session ID (for subscriber/ISV orgs)
  • sf_disconnect — Disconnect and clear cache

Log Capture Setup

  • sf_list_users — List active users
  • sf_list_debug_levels — List existing debug levels
  • sf_create_debug_level — Create a new debug level
  • sf_setup_logging — One-step: create debug level + trace flag
  • sf_list_trace_flags — List active trace flags
  • sf_create_trace_flag — Create a trace flag
  • sf_delete_trace_flag — Delete a trace flag

Debug Log Analysis

  • sf_list_logs — List debug logs (with filters)
  • sf_get_log — Fetch full log body
  • sf_scan_log — Scan a log for errors, exceptions, governor limits
  • sf_scan_all_logs — Batch scan with summary
  • sf_search_log — Full-text search within a log

Requirements

  • Python 3.10+
  • Salesforce CLI (sf) for CLI-based connections (optional)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sf_log_analyzer-0.1.3.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sf_log_analyzer-0.1.3-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file sf_log_analyzer-0.1.3.tar.gz.

File metadata

  • Download URL: sf_log_analyzer-0.1.3.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sf_log_analyzer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 01182d4ea66deb10bca4e4f33f7fc3927d92ecd14ce74a90925f1601cb53ac6c
MD5 ec6eb00fb4bbd64014bd4aa19e8c4fc9
BLAKE2b-256 277cae1ada452b0d3caa436f6488639352410b8bd52e4664cb152e05ed5ab912

See more details on using hashes here.

File details

Details for the file sf_log_analyzer-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sf_log_analyzer-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sf_log_analyzer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a8a6dfb8b655cdfc8aa4f8af38b7ecdaee842d6e62f9ba450eb7cd38d683f18
MD5 09662660c1a4809ad2f492a23d6b42c7
BLAKE2b-256 9fd31fae92cee17887cf9e6595320178df2c79c574351e2b41a73a58225a584d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page