LinkedIn Ads in Grok
Adwarp is an open-source MCP server that connects xAI's Grok Bot to LinkedIn Ads. Run your own Adwarp endpoint, ask your bot to add it, then have it size audiences, draft campaigns and pull reports.
> Add a custom MCP server called adwarp at https://your-app.vercel.app/api/mcp> Draft 3 LinkedIn ads for the RevOps audience at 40 USD a day.
adwarp.create_campaign "RevOps leaders", 40 USD/day: DRAFT
adwarp.create_text_ad 3 variants: DRAFT
Nothing is live. Review them in Campaign Manager.
01Set up
Set up in 3 steps
Sign in to LinkedIn once
Create a LinkedIn developer app with the Advertising API, then sign in from your terminal. App approval usually takes a day or 2.
npx -y adwarp auth loginDeploy your own endpoint
Grok Bot runs on a cloud computer, so it can't reach your laptop. Deploy Adwarp's endpoint in 1 click, and paste in the values npx -y adwarp auth export prints plus a token from openssl rand -hex 32.
Add it to your bot
Send your bot this message. When it asks for a key, give it the header Authorization with the value Bearer, a space and your MCP_AUTH_TOKEN.
Add a custom MCP server called adwarp at https://your-app.vercel.app/api/mcp
Setting it up by hand?
The Deploy button asks for these. By hand, create a Vercel project from the Adwarp repo with its Root Directory set to apps/web and add them. If Vercel Authentication covers production, turn it off there, or Grok can't reach the endpoint.
ADWARP_LINKEDIN_CLIENT_ID=...
ADWARP_LINKEDIN_CLIENT_SECRET=...
ADWARP_LINKEDIN_REFRESH_TOKEN=...
MCP_AUTH_TOKEN=<a long random string>02Try these prompts
5 prompts to try first
> How many RevOps leaders at US software companies can we reach on LinkedIn?
adwarp.search_targeting titles "revenue operations": 4 matches
adwarp.estimate_audience titles + VP + Director + US + software: 1,860 members
03Results
Why running LinkedIn ads from Grok gets better results
Checks happen daily
Performance is 1 message to a bot you already use, so problems get fixed the same day.
Nothing spends on its own
Every campaign and ad starts as a draft, so the bot can build while you decide what goes live.
Your secret stays in Vercel
Grok holds 1 token for your own endpoint. Your LinkedIn client secret stays in your Vercel project.
Is there a LinkedIn Ads connector for Grok?
Not from LinkedIn or xAI. Adwarp is an open-source MCP server that gives Grok Bot access to LinkedIn Ads through your own developer app.
Does it work in connectors on grok.com?
Not yet. Custom connectors on grok.com sign in with OAuth, which Adwarp's endpoint doesn't support yet. Grok Bot sends a header, so it works today.
Why do I need my own endpoint?
Grok Bot runs on a cloud computer, so it can't reach a server on your laptop. Your own endpoint takes 1 bearer token and keeps your LinkedIn client secret out of Grok.
Can Grok spend money on its own?
No. Every campaign, ad group and ad starts as a draft, and it goes live only when you explicitly ask or switch it on in Campaign Manager.
Does it work for Google Ads?
Not yet. Adwarp's Google tools run on your machine, which Grok Bot can't reach.
Where are my LinkedIn credentials stored?
In your Vercel project's environment variables. Grok Bot keeps only the bearer token for your endpoint.
Which tools work in Grok?
Every LinkedIn tool your endpoint serves: audience sizing, campaigns and ads, reporting and Ad Library search.
List uploads, CRM audiences and the change journal read files on your machine, so they run in Claude, Codex, Cursor or the CLI.
| Feature | In Grok |
|---|---|
| Campaigns, audience sizing, reporting | Yes |
| Ad Library through the official API | Yes |
| CSV list uploads | No |
| Salesforce and HubSpot audiences | No |
| Change journal and lift | No |
What does the bot need?
A name, your endpoint's URL and 1 header with your token.
| Field | Value |
|---|---|
| Name | adwarp |
| URL | https://your-app.vercel.app/api/mcp |
| Header name | Authorization |
| Header value | Bearer, a space, then your MCP_AUTH_TOKEN |