Connect an AI tool
Start with one workspace for your project. Connect your AI tool to check its read access before you add a Meta ad account.
Read the Meta Ads guide for workflows and comparisons.
Set up Codex or Claude Code
Give this request to Codex or Claude Code. Complete the Clerk sign-in and review access in your browser.
Set up MarketingRoutine from https://marketingroutine.ai/agents in this AI client. Open the official sign-in and wait for me to choose Grant access. Request only launch:read and meta:read. After approval, use list_workspaces to show the workspaces I can access before connecting Meta. If the grant covers one workspace, use get_workspace_info instead. Keep existing connections intact.For agents following this page, use the commands for your current client. Keep existing connections intact. Start OAuth and wait while the user signs in and chooses Grant access. Once connected, reload the client if needed and follow the workspace check below.
Codex
Verified · Browser OAuth and first workspace read
Add this entry to ~/.codex/config.toml, then run the login command.
[mcp_servers.marketingroutine]
url = "https://mcp.marketingroutine.ai/launch/mcp"codex mcp login marketingroutine --scopes launch:read,meta:readClaude Code
Verified · Browser OAuth and first workspace read
Run these commands from your project folder. Keep the JSON as an argument so Claude Code can show the configuration before running the command.
claude mcp add-json --scope local marketingroutine '{"type":"http","url":"https://mcp.marketingroutine.ai/launch/mcp","oauth":{"scopes":"launch:read meta:read"}}'claude mcp login marketingroutineCheck your access
In the browser, confirm the intended organization or workspace and review launch:read and meta:read. Then choose Grant access.
Return to your AI tool and paste this request. Use list_workspaces with organization access before connecting Meta. If you approved one workspace, use get_workspace_info.
Use list_workspaces to show the MarketingRoutine workspaces I can access. If my grant covers one workspace, use get_workspace_info. Read only.Once a Meta ad account is connected and assigned to your workspace, try the verified Codex or Claude Code example. Read Meta Ads spend for seven completed days.
Grok Bot Command · Preview
A prepared Command connection completed signup, created one workspace without Meta, and returned it from list_workspaces. This path is a preview and may need your help with signup or consent.
Use an inbox the Bot can access for email verification and a fresh MarketingRoutine account. If Clerk or Grok Bot asks for you to take over, finish that step in the browser or approval card.
Copy the request, enter your workspace name, and send it to your Bot.
Set up a new MarketingRoutine workspace named [Workspace name] using the Grok Bot Command preview at https://marketingroutine.ai/agents#grok-command. I authorize signing up with an inbox you control and granting launch:read and meta:read for all current and future workspaces in the new organization, with renewal. Before opening /sign-up, start a fresh private or incognito window in your browser. Open signup there and verify that the Clerk registration form appears. Stop if you cannot open the form in a fresh private session. Do not sign out of an existing account or clear its browser data. After signup, stay in the tab where you created the workspace in that private window. Check the signed-in account and new organization. Open the fresh authorization URL printed by the running bridge in that exact tab, even if the bridge opens another tab. Confirm the new organization and the two read permissions before granting access. Leave existing connections alone. Stop if anything differs or I need to verify or approve in person. Use list_workspaces as your first MCP tool and confirm it returned the new workspace.- Start a fresh private or incognito window in the Bot’s browser before opening MarketingRoutine signup. Verify that the Clerk registration form appears. If you see an existing account or cannot open the form in a fresh private session, stop. Do not sign out of an existing account or clear its browser data.
- In that private window, use the Vault for login details, verify email, and create one workspace before adding Meta or payment details. Keep this tab open and verify the signed-in account and the new organization on Home.
- On the Bot’s computer, run the setup below once. It registers a public OAuth client with no secret and prints the Command and Arguments to use. Keep its new private auth directory for this connection. If registration fails or is rate-limited, stop and report the status.
- Run the printed command with its arguments on the Bot’s computer and keep the bridge running. Take the fresh authorization URL printed by the bridge and open it in the same tab where you created the workspace in the private window, even if the bridge opens another tab. On the consent screen, check the new organization before approving
launch:readandmeta:read. The consent covers all current and future workspaces in that organization and renews the same read permissions. Stop if the organization, access, or required approval differs from the request. - After the browser confirms OAuth, stop the setup process and add a new Command connector with the same Command and Arguments. Keep existing connections intact. Call
list_workspacesfirst from the new connector. The result should contain exactly the workspace the Bot created.
Command configuration
node --input-type=module <<'MR_GROK_SETUP'
import { mkdtemp, writeFile } from 'node:fs/promises'
import { homedir } from 'node:os'
import { join } from 'node:path'
const metadata = {
"client_name": "MarketingRoutine for Grok Bot",
"application_type": "native",
"token_endpoint_auth_method": "none",
"redirect_uris": [
"http://127.0.0.1:33418/oauth/callback"
],
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
],
"scope": "launch:read meta:read"
}
const response = await fetch("https://mcp.marketingroutine.ai/launch/oauth/register", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(metadata),
redirect: 'error',
signal: AbortSignal.timeout(15000),
})
if (response.status !== 201) {
throw new Error('OAuth registration returned HTTP ' + response.status)
}
const client = await response.json()
if (!client || typeof client.client_id !== 'string' ||
!/^mcp_launch_client_[A-Za-z0-9_-]{1,192}$/.test(client.client_id) ||
'client_secret' in client ||
client.application_type !== metadata.application_type ||
client.token_endpoint_auth_method !== metadata.token_endpoint_auth_method ||
client.scope !== metadata.scope ||
JSON.stringify(client.redirect_uris) !== JSON.stringify(metadata.redirect_uris) ||
JSON.stringify(client.grant_types) !== JSON.stringify(metadata.grant_types) ||
JSON.stringify(client.response_types) !== JSON.stringify(metadata.response_types)) {
throw new Error('Unexpected OAuth client registration')
}
process.umask(0o077)
const directory = await mkdtemp(join(homedir(), '.marketingroutine-grok-'))
const clientFile = join(directory, 'client.json')
await writeFile(clientFile, JSON.stringify({ client_id: client.client_id }), { flag: 'wx', mode: 0o600 })
console.log(JSON.stringify({
command: 'env',
args: [
'MCP_REMOTE_CONFIG_DIR=' + directory,
...["npx","-y","mcp-remote@0.17.1","https://mcp.marketingroutine.ai/launch/mcp","33418","--host","127.0.0.1","--transport","http-only","--auth-timeout","240"],
'--static-oauth-client-info', '@' + clientFile,
'--static-oauth-client-metadata', JSON.stringify({ scope: metadata.scope }),
],
}, null, 2))
MR_GROK_SETUPGrok Bot Remote HTTPS · Preview
Manual Remote HTTPS requires a public OAuth client ID issued by MarketingRoutine for Grok Bot. Leave the client secret blank and complete the approval card when it appears. Request a client ID.
In Grok Bot, open Connect apps → Add a custom connector and select Remote HTTPS. Name it MarketingRoutine, paste the server URL, enter the issued ID, then choose Add plugin.
https://mcp.marketingroutine.ai/launch/mcpThe manual setup reached the approval card in the latest check. Completing OAuth and making a first read on that connection are still unverified. Automatic Remote HTTPS setup is unavailable. The observed automatic registration sent a mix of callback types that MarketingRoutine cannot accept.
Other clients
Hermes Agent · Preview
OpenClaw · Preview
MarketingRoutine setup and first workspace read are still unverified in these clients.