Connect HubSpot or Salesforce
Connecting your CRM lets TrustMCP recognise existing customers automatically. When someone requests access to private evidence, the network checks whether their email domain is already an account/company in your CRM, and uses that to:
- Auto-release - grant a scoped key on the spot when the requester is a customer, and
- Recommend - feed the approval agent's suggestion (
approve/review/caution) on every pending request.
The check runs on every channel - web, REST, and MCP - and matches on the requester's
email domain (e.g. jordan@globex.com → globex.com). Credentials are yours and
scoped to this one trust center; they're stored server-side and never shown again once
saved.
Where this lives in the dashboard
Open your trust center, then use the top navigation:
- Settings group → Connections tab. The CRM auto-release (HubSpot /
Salesforce) row shows whether it's
onoroff. Click Settings on that row. - On the Settings page you'll use three cards, in order:
- CRM connection - where you pick the provider and paste credentials (this page).
- Auto-release policies - the "Auto-release if the requester is a customer in our CRM" checkbox.
- Approval agent (optional) - let the agent auto-grant confident requests.
- Click Save settings at the bottom. The Connections row flips to
on.
The CRM connection card only shows the fields relevant to your current choices, so the steps below match exactly what you'll see.
Connect HubSpot
You need a private-app token with company read access.
1. Create a private app in HubSpot
- In HubSpot, go to Settings (gear icon) → Integrations → Private Apps → Create a private app.
- Give it a name (e.g.
TrustMCP relationship check). - On the Scopes tab, add
crm.objects.companies.read. That's the only scope required - the check is read-only. - Create app, confirm, and copy the access token (it looks like
pat-na1-…).
2. Paste it into TrustMCP
On Settings → CRM connection:
- Provider → HubSpot.
- Connection method → API token.
- API token → paste the
pat-na1-…token. - Save settings.
TrustMCP looks up companies by their domain property (exact match). Make sure your
HubSpot companies have the domain field populated for the customers you want recognised.
Connect Salesforce
You need your instance URL and a valid OAuth access token that can query Accounts.
1. Get an access token
Any OAuth access token for a user/integration with read access to Accounts works. A common setup is a Connected App using the OAuth client-credentials or JWT-bearer flow:
- In Salesforce Setup → App Manager → New Connected App.
- Enable OAuth Settings, add the
apiscope, and choose a flow that issues an access token without interactive login (client-credentials or JWT bearer). - Note your instance URL - e.g.
https://yourorg.my.salesforce.com- and obtain a current access token (starts with00D…).
Salesforce access tokens are short-lived. If you paste a raw token, re-paste it when it expires - or use the MCP server method below to delegate token handling to a connector that refreshes automatically.
2. Paste it into TrustMCP
On Settings → CRM connection:
- Provider → Salesforce.
- Connection method → API token.
- Salesforce instance URL →
https://yourorg.my.salesforce.com. - API token → paste the access token.
- Save settings.
The check runs SELECT Id, Name FROM Account WHERE Website LIKE '%domain%', so make sure
your Accounts have the Website field set for the customers you want recognised.
Connect via an MCP server (advanced)
Instead of pasting a static API token, you can point TrustMCP at your own CRM MCP server - useful when you already run one or want token refresh handled for you. On Settings → CRM connection:
- Provider → HubSpot or Salesforce (this just labels the result).
- Connection method → MCP server.
- MCP server URL → a Streamable-HTTP MCP endpoint (e.g.
https://your-crm.example.com/mcp). TrustMCP queries it for a company/account by domain. - MCP authentication - pick one:
- OAuth (client credentials) - fill Token URL, Client ID, and Client secret. TrustMCP exchanges these for an access token via the client-credentials grant on each check.
- Bearer token - paste a static token sent as
Authorization: Bearer ….
- Save settings.
Secrets (bearer token, client secret) are write-only: leave them blank on a later save to keep the existing value.
Turn on auto-release
Connecting the CRM only enables the lookup. To actually grant keys automatically, still on Settings:
- In Auto-release policies, check "Auto-release if the requester is a customer in our CRM (HubSpot / Salesforce)".
- Save settings.
Now when a requester whose domain matches an account/company asks for access,
POST /v1/keys/request returns {"status":"granted","key":…} immediately - across web,
API, and MCP. Auto-granted keys are still scoped, expiring, and revocable, and each
grant is logged with reason crm:hubspot or crm:salesforce.
Other auto-release policies (preconfigured domains, contract upload) live in the same card - see Auto-release policies.
The approval agent
Even without auto-release, every pending request gets a deterministic recommendation -
approve, review, or caution - shown with its reasons on the Requests page. A CRM
match is a strong positive (existing customer in hubspot); no match contributes a
caution. The recommendation also folds in contract proof, NDA acceptance, and the domain
allowlist.
Two ways to act on it:
- Apply recommendation - a one-click button on each pending request that approves
(for
approve) or denies (forcaution). - Auto-pilot - enable "Let the approval agent auto-grant confident requests" in
the Approval agent card. Any request whose recommendation is a confident
approve(e.g. existing CRM customer + NDA accepted) is granted on arrival, across every channel. Auto-grants are logged with reasonagent:recommendation, and you can revoke at any time.
The agent never denies automatically - it only grants high-confidence requests; anything short of that stays pending for a human.
How matching & precedence work
- Matching is by the requester's email domain. HubSpot matches the company
domainproperty exactly; Salesforce matches the Account Website with aLIKE '%domain%'. - Per-vendor credentials win. What you set here takes precedence over any network-wide CRM configuration; the network-global config (if the operator set one) is only a fallback. See CRM verification for the self-hosting/network-global path.
- Advisory by default. Verification informs the recommendation; a key is only minted when a human approves or an auto-release/auto-pilot policy you enabled matches.
Troubleshooting
- A known customer shows "not in CRM" - confirm the matching field is populated:
HubSpot company
domain, Salesforce Account Website. The lookup uses the bare host (nohttps://, no path). - Salesforce stops matching after a while - the access token likely expired. Re-paste a fresh token, or switch to the MCP server method with OAuth client-credentials.
- No badge / "CRM: n/a" - no provider is configured for this trust center yet, or the token call failed (e.g. a wrong scope returns an HTTP error and is treated as "no match").