How to integrate Linkedin Ads MCP with Codex

Connect Codex to Linkedin Ads MCP. List active campaigns with daily spend, compare ad performance by campaign objective, and more using natural language, with authentication handled for you.

Linkedin Ads logoLinkedin Ads
Oauth2

Linkedin Ads is LinkedIn's marketing platform for creating, managing, and measuring paid campaigns across LinkedIn. It helps teams reach professional audiences with precise targeting, campaign analytics, and sponsored content tools.

28 Tools

Introduction

Codex is one of the most popular coding harnesses out there. And MCP makes the experience even better. With Linkedin Ads MCP integration, you can draft, triage, summarise emails, and much more, all without leaving the terminal or the app, whichever you prefer.

Also integrate Linkedin Ads with

Why use Composio?

Apart from a managed and hosted MCP server, you will get:

  • CodeAct: A dedicated workbench that allows GPT to write its code to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Large tool responses: Handle them to minimise context rot.
  • Dynamic just-in-time access to 20,000 tools across 1000+ other Apps for cross-app workflows. It loads the tools you need, so GPTs aren't overwhelmed by tools you don't need.

How to install Linkedin Ads MCP in Codex

Run the setup command

Run this command in your terminal to add the Composio MCP server to Codex.

Terminal

It will initiate the authentication in a browser window, authorize Codex to access your Composio account.

Composio authentication page

(Optional) Authenticate with OAuth

To authenticate manually, run the login command to open a browser window and authorize Codex to access your Composio account.

bash
codex mcp login composio

Verify the connection

Run codex mcp list to confirm Composio appears as a registered MCP server.

bash
codex mcp list

Codex App

Codex App follows the same approach as VS Code.

  1. Click ⚙️ on the bottom left → MCP Servers → + Add servers → Streamable HTTP:
  2. Fill the header and Key fields with { "x-consumer-api-key" = "ck_*******" }.
  3. The Key is the Composio API key, that you can find on dashboard.composio.dev
  4. Click on Authenticate and authorize Codex to your Composio account and you're all set.
Codex App MCP setup
  1. Restart and verify if it's there in .codex/config.toml
bash
[mcp_servers.composio]
url = "https://connect.composio.dev/mcp"
http_headers = { "x-consumer-api-key" = "ck_*******" }

What is the Linkedin Ads MCP server, and what's possible with it?

The Linkedin Ads MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Linkedin Ads account. It provides structured and secure access so your agent can perform Linkedin Ads operations on your behalf.

Conclusion

You've successfully integrated Linkedin Ads with Codex using Composio's MCP server. Now you can interact with Linkedin Ads directly from your terminal, VS Code, or the Codex App using natural language commands.

Key benefits of this setup:

  • Seamless integration across CLI, VS Code, and standalone app
  • Natural language commands for Linkedin Ads operations
  • Managed authentication through Composio
  • Access to 20,000+ tools across 1000+ apps for cross-app workflows
  • CodeAct workbench for complex tool chaining

Next steps:

  • Try asking Codex to perform various Linkedin Ads operations
  • Explore cross-app workflows by connecting more toolkits
  • Build automation scripts that leverage Codex's AI capabilities
TOOLS

Supported Tools

Every Linkedin Ads action and event your agent gets out of the box.

Create Ad Account

Tool to create a new LinkedIn ad account for campaign management.

Create Lead Form

Tool to create a new LinkedIn lead generation form for ads.

Get Ad Account

Tool to retrieve a specific LinkedIn Ad Account by ID.

Get Ad Analytics

Tool to retrieve LinkedIn ad analytics and reporting metrics for campaigns, creatives, and accounts.

Get Audience Counts

Get estimated audience size for given targeting criteria on LinkedIn Ads.

Get Campaign Group

Tool to retrieve a specific LinkedIn Ads campaign group by ID.

Get lead form by ID

Tool to retrieve a specific LinkedIn lead form by its ID.

Get organization follower count

Tool to retrieve follower count for a LinkedIn organization.

Get organization access control list

Tool to retrieve organization access control list showing who has admin or poster rights for organizations.

Get organization page statistics

Tool to retrieve page view and click statistics for a LinkedIn organization page.

Get organization follower statistics

Tool to retrieve follower growth statistics for a LinkedIn organization.

Get organization share statistics

Tool to retrieve share and engagement statistics for an organization's content on LinkedIn.

Get Ad Supply Forecasts

Retrieve supply forecasts for LinkedIn ad inventory based on targeting criteria, budget, and bid settings.

Get Targeting Entities

Tool to retrieve targeting entities for LinkedIn Ads campaigns.

Get Targeting Facets

Tool to retrieve available ad targeting facets including industries, locations, seniorities, job functions, skills, and more.

List Conversion Rules

Tool to list all conversion rules for a LinkedIn ad account.

List DMP Segments

Tool to list DMP (Data Management Platform) segments for LinkedIn ad accounts.

List Lead Forms

Tool to list LinkedIn lead forms for an organization or by specific IDs.

List Organizations

Tool to search and list LinkedIn organizations by IDs, vanity name, or parent organization.

List LinkedIn posts

Tool to list LinkedIn posts by author or retrieve multiple posts by IDs.

Lookup organizations

Tool to batch lookup organization details by IDs without requiring admin access.

Register Upload

Tool to register an upload for media assets (images, videos) on LinkedIn.

Search Ad Accounts

Tool to search for LinkedIn ad accounts with filtering by status, type, and test mode.

Search Campaigns

Tool to search and list campaigns in a LinkedIn Ads account with filtering options.

Search LinkedIn Ads Creatives

Tool to search and list LinkedIn Ads creatives with filtering options.

Search Events

Tool to search and list LinkedIn events by organizer with filtering options.

Update lead form

Tool to update an existing LinkedIn lead form.

Update organization access control

Tool to update organization access control for a user on LinkedIn.

FRAMEWORKS

How to build Linkedin Ads MCP Agent with another framework

FAQ

Frequently asked questions

With a standalone Linkedin Ads MCP server, the agents and LLMs can only access a fixed set of Linkedin Ads tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Linkedin Ads and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Codex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Linkedin Ads tools.

Yes, absolutely. You can configure which Linkedin Ads scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Linkedin Ads data and credentials are handled as safely as possible.

Start with Linkedin Ads.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Linkedin Ads tool your agent needs.Free to start.

Start building