Problem

When an incident or maintenance window matters, Salesforce platform teams need to know which of their environments are affected and how the event has changed over time. Those answers are also useful in monitoring scripts, operational reports, and the tools teams use to investigate service issues.

Approach

I built sfdctrust around the Salesforce My Trust Center API, with one Python SDK powering three ways to work with the data.

  • Python SDK. Synchronous and asynchronous clients list tenants, retrieve status snapshots, search incidents and maintenance events, and return event timelines and tenant history. Both clients share typed response models and pagination behavior.
  • Command-line interface. Five read-only commands make the same operations available from a terminal, with human-readable output for quick checks and JSON for scripts.
  • Model Context Protocol (MCP). Version 1.2.0 adds an optional local server that lets compatible AI assistants look up status, search events, and retrieve details through five read-only tools. Results are limited to tenants authorized by the Salesforce personal access token. Each result includes an observation time so the assistant can say when it checked.

What it demonstrates

  • API design and credential lifecycle. I translated the Salesforce API contract into reusable Python interfaces and designed explicit token refresh with a SQLite-backed recovery workflow for interrupted or uncertain refreshes.
  • AI-assisted development and integration. I used OpenAI Codex to help implement the MCP adapter and test it offline with synthetic data. I defined the read-only tool scope and verified the integration hands-on in Codex Desktop and the Codex CLI.
  • Release engineering. I used cross-platform GitHub Actions checks, installed-package tests, and compatibility checks against earlier releases to validate the SDK, CLI, and optional MCP server before publishing to PyPI.

Public context

sfdctrust is an independent, MIT-licensed project. The public repository and documentation cover current features, setup, and supported workflows.