%% Salesforce Hosted MCP with a custom tool set: proposed design
%% Proposed design: to be validated for each implementation
flowchart TB
subgraph z0["AI client environment"]
host["MCP host
AI client or agent"]
end
subgraph z1["Your Salesforce org (Salesforce-hosted)"]
eca["External Client App
per-user OAuth"]
reads["SObject Reads server
standard, read and query"]
custom["Custom hosted MCP server
proposed tools, as metadata"]
data["Sales and Service data
CRUD, FLS, sharing"]
logic["Flows, Named Queries, Apex
what custom tools call"]
audit["Audit and monitoring
user named on each call"]
end
seller["Sales or service user
pilot group first"]
approver["Approver
confirms writes"]
seller -->|"questions and requests"| host
approver -.->|"confirm write"| host
host -.->|"OAuth with PKCE"| eca
host -->|"read tool calls"| reads
host -->|"allowlisted tool calls"| custom
reads -->|"query as the user"| data
custom -->|"invoke Flow or query"| logic
data -.->|"user-attributed activity"| audit
classDef salesforce stroke:#125BD8,fill:#e8f0fd
class reads,custom,data,logic salesforce
classDef ai stroke:#5747AF,fill:#f6f4fd
class host ai
classDef security stroke:#1f2937,fill:#f3f4f6
class eca,audit security
classDef people stroke:#125BD8,fill:#ffffff
class seller,approver people