connect_crm
Get the OAuth redirect URL to connect a specific CRM system to the Metadata platform.
Writes account
Creates or changes something in the account. Put it behind whatever review your agent uses.
What it does
Get the OAuth redirect URL to connect a specific CRM system to the Metadata platform.
USAGE INSTRUCTIONS FOR LLM:
Use this tool to obtain the authorization URL that users need to visit to connect their CRM accounts.
This tool returns a redirect URL that initiates the OAuth flow for the selected CRM system.
WHEN TO USE THIS TOOL:
- User asks to "connect [CRM name]"
- User wants to "add [CRM] integration"
- User needs to "link [CRM] account"
- User wants to "authorize [CRM] access"
- User asks "how do I connect my Salesforce/HubSpot CRM?"
- User needs to "set up [CRM] connection"
- After disconnecting a CRM and wanting to reconnect
- User asks "give me the link to connect [CRM]"
SUPPORTED CRM SYSTEMS:
- salesforce: Connect Salesforce CRM
- hubspot: Connect HubSpot CRM
IMPORTANT WORKFLOW - MUST FOLLOW THESE STEPS:
1. Call this tool to get the OAuth redirect URL
2. Display the URL to the user clearly and instruct them to open it in their browser
3. Explain that they need to complete the authorization process on the CRM's website
4. IMPORTANT: Ask the user to return to the chat and confirm when they have completed the connection
5. WAIT for the user's confirmation before proceeding with any other tasks
6. Once the user confirms the connection is complete, acknowledge it and continue
REQUIRED USER INTERACTION:
- The user MUST visit the returned URL in their browser to complete OAuth authorization
- The URL will redirect to the CRM's authorization page
- After authorization, the user will be redirected back to Metadata platform
- The connection will be active once the OAuth flow is completed successfully
- YOU MUST WAIT for user confirmation before proceeding
COMMON SCENARIOS:
Scenario 1 - Connect Salesforce: "I want to connect my Salesforce CRM"
→ Call connect_crm with crm="salesforce"
→ Show URL to user: "Please open this URL to connect your Salesforce CRM: [URL]"
→ "After completing the authorization, please return here and let me know it's done so we can proceed."
→ WAIT for user confirmation
Scenario 2 - Connect HubSpot: "Connect HubSpot CRM"
→ Call connect_crm with crm="hubspot"
→ Show URL to user with instructions
→ WAIT for user confirmation
Scenario 3 - Reconnect workflow: "I want to reconnect my Salesforce with different credentials"
→ First disconnect existing connection if needed
→ Call connect_crm with crm="salesforce"
→ Provide the URL to user
→ WAIT for user confirmation
RESPONSE FORMAT:
Returns an object containing the redirect URL for OAuth authorization.
Example: {"redirectUrl": "https://login.salesforce.com/services/oauth2/authorize?..."}
EXAMPLE: "Connect Salesforce" → connect_crm(crm="salesforce")Arguments
| Argument | Type | Notes | |
|---|---|---|---|
crm |
string | required | The CRM system to connect. Must be one of: salesforce, hubspot one of: salesforce, hubspot |
acknowledge_data_access |
boolean | Set true to confirm the person you are acting for asked to connect this CRM. The response is an OAuth authorization URL that starts a credential grant into their Metadata account. Without this the call is refused. |
Request
curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
-H "Authorization: $METADATA_PAT" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"connect_crm","arguments":{"crm":"salesforce"}}}'
Response
No recorded response. This tool writes to the account, so it is never executed to build these docs.
The request above is still the exact shape to send. Nothing on this page is invented.
Related
Other account tools: