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": ["tool", "run", "--python", ">=3.10", "sf-log-analyzer"]
    }
  }
}

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

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.5.tar.gz (12.8 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.5-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sf_log_analyzer-0.1.5.tar.gz
  • Upload date:
  • Size: 12.8 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.5.tar.gz
Algorithm Hash digest
SHA256 c8804ad99bf87a65b0e79835327d2b38a020f423e77361857921f865289d7ccd
MD5 2019be5bd4368c44e6398516cef7d792
BLAKE2b-256 baf99b6baab036ab83588af0b691b98e64441674c70ca3f38bec9d910d87d425

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sf_log_analyzer-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f79531ff80e52b45b7d075b3e78192e906a8187572abc7f77a1466d331e31b49
MD5 cd570b222d0801bb9d689d0c499040ae
BLAKE2b-256 f28186b422a54ec98ef640f88a0ae3244161b3d977e4eed78d1e089ad3a54510

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