connect_channel
Get the OAuth redirect URL to connect a specific advertising channel to the Metadata platform.
Writes campaigns
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 advertising channel to the Metadata platform.
USAGE INSTRUCTIONS FOR LLM:
Use this tool to obtain the authorization URL that users need to visit to connect their advertising channel accounts.
This tool returns a redirect URL that initiates the OAuth flow for the selected channel.
WHEN TO USE THIS TOOL:
- User asks to "connect [channel name]"
- User wants to "add [channel] integration"
- User needs to "link [channel] account"
- User wants to "authorize [channel] access"
- User asks "how do I connect my Facebook/LinkedIn/Twitter/Reddit/Google account?"
- User needs to "set up [channel] connection"
- After disconnecting a channel and wanting to reconnect
- User asks "give me the link to connect [channel]"
SUPPORTED CHANNELS:
- linkedin: Connect LinkedIn advertising account
- meta: Connect Facebook/Instagram advertising accounts (Meta Business Suite)
- google: Connect Google Ads account
- reddit: Connect Reddit advertising account
- x: Connect X (Twitter) advertising account
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 channel'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 channel'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 new channel: "I want to connect my LinkedIn account"
→ Call connect_channel with channel="linkedin"
→ Show URL to user: "Please open this URL to connect your LinkedIn account: [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 - Reconnect after disconnect: "Get me the link to reconnect Facebook"
→ Call connect_channel with channel="meta"
→ Show URL to user with instructions
→ WAIT for user confirmation
Scenario 3 - Setup new integration: "How do I add Google Ads?"
→ Call connect_channel with channel="google"
→ Explain OAuth process and provide URL
→ Ask user to confirm when complete
→ WAIT for user confirmation
Scenario 4 - Add Twitter/X: "Connect my X account"
→ Call connect_channel with channel="x"
→ Provide the URL to user
→ WAIT for user confirmation
RESPONSE FORMAT:
Returns an object containing the redirect URL for OAuth authorization.
Example: {"redirectUrl": "https://oauth.channel.com/authorize?client_id=..."}
EXAMPLE: "Connect LinkedIn" → connect_channel(channel="linkedin")Arguments
| Argument | Type | Notes | |
|---|---|---|---|
channel |
string | required | The channel to connect. Must be one of: linkedin, meta (for Facebook/Instagram), google, reddit, x (for Twitter) one of: linkedin, meta, google, reddit, x, facebook, instagram, twitter |
acknowledge_data_access |
boolean | Set true to confirm the person you are acting for asked to connect this channel. 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_channel","arguments":{"channel":"linkedin"}}}'
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 campaigns tools: