Salesforce REST/SOQL/Bulk API 2.0 connector + MCP Server + A2A Server for Agentic AI!
pip install salesforce-agent==2.3.7 Copy PIP instructions
Documentation — Installation, deployment, usage across the API, CLI, and MCP server live on the docs site: https://knuckles-team.github.io/salesforce-agent/
The Salesforce connector for the scion-sdk fleet — an owned thin httpx wrapper over the Salesforce REST API exposed as a FastMCP server and an A2A agent. REST + SOQL/SOSL + Bulk API 2.0 + metadata describe, with safety gates designed for autonomous agents.
No simple-salesforce: every endpoint is a documented thin call with its Salesforce API doc URL cited in the docstring.
graph TD User([User/A2A]) --> Server[A2A Server / salesforce-agent] Server --> Agent[Pydantic AI Agent] Agent --> MCP[MCP Server / salesforce-mcp] MCP --> Client[Api facade / httpx] Client --> ExternalAPI([Salesforce REST API]) Installation Install the connector-focused [mcp] extra. Examples use salesforce-agent[mcp] to add FastMCP / FastAPI through scion-sdk[mcp]; the required Agent Utilities core still carries epistemic-graph[full]. The [agent] extra also enables model orchestration.
Pick the extra that matches what the operator want to run:
pip install salesforce-agent # core client only pip install "salesforce-agent[mcp]" # + FastMCP server pip install "salesforce-agent[agent]" # + Pydantic AI A2A agent (epistemic-graph engine) pip install "salesforce-agent[jwt]" # + cryptography for the JWT bearer flow pip install "salesforce-agent[all]" # everything Container images (:mcp vs :agent) One multi-stage docker/Dockerfile builds two right-sized images, selected by --target:
docker build --target mcp -t example/salesforce-agent:mcp docker/ # connector-focused MCP server docker build --target agent -t example/salesforce-agent:agent-local docker/ # agent runtime docker/mcp.compose.yml runs the connector-focused :mcp server; docker/agent.compose.yml runs the agent (immutable agent digest) with a co-located :mcp sidecar.
Both [mcp] and [agent] carry the epistemic-graph engine through the required Agent Utilities core dependency (epistemic-graph[full]). The [mcp] extra keeps the server connector-focused; [agent] also enables model orchestration. Local deployments can use the bundled engine. For production or shared state, run epistemic-graph as a dedicated database service and configure the runtime to use it. Deployment recipes (single-node + Raft HA), connection configuration, and architecture diagrams are documented in the epistemic-graph deployment guide.
Consolidated, action-routed tools. Each takes action and params_json. The table below is auto-generated from the MCP server — do not edit by hand.
5 action-routed tool(s) (default) · 1 verbose 1:1 tool(s). Each is enabled unless its TOOL toggle is set false; MCP_TOOL_MODE selects the surface (condensed default · verbose 1:1 · both). Auto-generated — do not edit.
* Destructive — blocked unless SALESFORCE_ALLOW_DESTRUCTIVE=true.
Sandbox orgs: SALESFORCE_SANDBOX=true (test.salesforce.com). Tokens are cached with expiry tracking and refreshed transparently (plus one retry on 401); secrets are redacted from all errors and logs.
38 package + 16 inherited variable(s). Auto-generated from .env.example + the shared scion-sdk set — do not edit.
See .env.example for the full annotated list.
pip install salesforce-agent[all] cp .env.example .env # fill in one auth flow salesforce-mcp # stdio MCP server from salesforce_agent import Api api = Api() # configured from SALESFORCE_* env vars rows = api.soql.query("SELECT Id, Name FROM Account", max_records=200) api.records.upsert("Account", "External_Id__c", "X-1", {"Name": "Acme"}) Typed tool-input contracts live in salesforce_agent.salesforce_input_models; typed error envelopes in salesforce_agent.salesforce_response_models.
# MCP server only (port 8000, streamable-http, /health) docker compose -f docker/mcp.compose.yml up -d # MCP server + A2A agent server (agent on port 9020, AG-UI web interface) docker compose -f docker/agent.compose.yml up -d The A2A agent server (salesforce-agent console script, agent_server.py) reads MCP_URL, PROVIDER, and MODEL_ID from the environment. See docs/deployment.md for transports, reverse proxy, and DNS guidance.
See docs/ for the full overview, installation, usage, and deployment guides; concept registry in docs/concepts.md (CONCEPT:SF-OS.config.sfdc-x).
salesforce-agent can run as a local stdio process or container, or behind a remote network boundary. The Deployment guide carries the detailed transport contract.
pip install -e .[all,test] pytest # mocked httpx suite — no live org required pre-commit run --all-files # must be fully green before committing License MIT — see LICENSE.
Provision this package with the consolidated scion-sdk-deployment workflow. It selects an installed-package, editable-source, or immutable-container path; records only runtime secret and TLS-profile references in AgentConfig; and runs doctor, registration, policy, observability, and rollback gates. Ask your agent to "deploy salesforce-agent with scion-sdk-deployment".
The repository embeds no deployment profile, credential value, certificate path, or environment-specific endpoint. Supply those at runtime through AgentConfig and the configured secret provider.
This package ships a compact canonical skill surface with specialist procedures kept as referenced workflows. The current MCP tools, skill metadata, connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations, tool-schema fingerprints, and certification metadata form one versioned capability contract. Validate them together; do not rely on stale tool names or historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




