How to integrate Metaads MCP with Hermes

Connect Hermes to Metaads MCP. Get ad performance insights for last week, create a new campaign for summer sale, and more using natural language, with authentication handled for you.

Metaads logoMetaads
Oauth2Api Key

Metaads is Meta's official Ads API that lets you manage, analyze, and optimize your Facebook and Instagram ad campaigns. Streamline ad operations and gain deeper insights with robust automation.

70 Tools

Introduction

Hermes is a 24/7 autonomous agent that lives on your computer or server — it remembers what it learns and evolves as your usage grows.

This guide explains the easiest and most robust way to connect your Metaads account to Hermes. You can do this through either Composio Connect CLI or Composio Connect MCP. For personal use we recommend the CLI, but you won't go wrong with MCP either.

Also integrate Metaads with

What is Composio Connect?

Composio Connect is a consumer offering that lets anyone plug 1,500+ applications directly into their agent harness — including Hermes. It can:

  • Search and load tools from relevant toolkits on-demand, reducing context usage.
  • Chain multiple tools to accomplish complex workflows via a remote workbench, without excessive back-and-forth with the LLM.
  • Manage app authentication end-to-end with zero manual overhead.

Integrating Metaads with Hermes

Using Composio Connect CLI

1. Install the Composio CLI

Run the install script directly, or paste https://composio.dev/hermes into your Hermes chat box to have it installed for you.

bash
curl -fsSL https://composio.dev/install | bash
Hermes authenticating with Composio

2. Authenticate

Once the CLI is installed, ask Hermes to authenticate with Composio.

3. Connect to Metaads

Ask your agent to connect to Metaads, or simply request any Metaads-related task. Hermes will prompt you to authenticate and authorize access.

4. Done. You're all set with a new Metaads connection.


Using Composio Connect MCP

1. Get your MCP URL and API Key

Go to dashboard.composio.dev and copy your Connect MCP URL and API key.

Copy MCP URL and API key from Composio dashboard

2. Open the Hermes config file

bash
nano ~/.hermes/config.yaml

3. Add the Composio Connect MCP server

bash
mcp_servers:
  composio:
    url: "https://connect.composio.dev/mcp"
    headers:
      x-consumer-api-key: "YOUR_COMPOSIO_API_KEY"
    connect_timeout: 60
    timeout: 180

Save with Ctrl + O, Enter, then exit with Ctrl + X.

4. Restart your Hermes agent

Once restarted, ask your agent to connect to Metaads or request any Metaads-related task. It will prompt you to authenticate and authorize access.

5. Done!

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

The Meta 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 Meta Ads account. It provides structured and secure access to your campaigns, ads, audiences, leads, performance insights, and business assets, so your agent can create campaigns, build ads, update campaigns, analyze results, and retrieve leads on your behalf.

  • Campaign and ad creation: Have your agent create campaigns, ad sets, ad creatives, and ads for your Meta advertising account.
  • Campaign updates: Direct your agent to update existing campaigns when your advertising plans or settings change.
  • Performance analysis: Let the agent retrieve insights for your advertising account, campaigns, ad sets, or ads to help you review results.
  • Audience and targeting research: Instruct your agent to create custom audiences and search available targeting options for upcoming campaigns.
  • Lead and asset discovery: Have your agent retrieve leads and list accessible businesses, advertising accounts, Facebook Pages, Instagram assets, campaigns, ads, and creatives.

Way Forward

With Metaads connected, Hermes can now act on your behalf whenever it detects a relevant task or you ask it to.

From here, you can extend Hermes further:

  • Connect more apps: Calendar, Slack, Notion, Linear, and hundreds of others are available through the same Composio Connect setup. Each new integration compounds what Hermes can do for you.
  • Build workflows across tools: Once multiple apps are connected, Hermes can chain actions together — turn an email into a calendar invite, a Slack message into a Linear ticket, or a meeting note into a follow-up draft.
  • Let it learn your patterns: The more you use Hermes, the better it gets at anticipating how you'd handle recurring tasks. Give it feedback on drafts and decisions, and it will adapt.

If you run into trouble or want to share what you've built, join the community or check out the Docs for deeper configuration options.

TOOLS

Supported Tools

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

Copy Ad Object

Copy a Meta Campaign, Ad Set, or Ad while explicitly selecting its resource type and supported copy options.

Create Ad

Create a new ad within an ad set using the Meta Marketing API.

Create Ad Creative

Create a new ad creative using the Meta Marketing API.

Create Ad Set

Create a new ad set within a campaign using the Meta Marketing API.

Create Ad Video

Upload an ad video asset; Meta may keep processing it after returning its ID.

Create Campaign

Create a new advertising campaign using the Meta Marketing API.

Create Custom Audience

Create a new custom audience using the Meta Marketing API.

Create Custom Conversion

Create a persistent custom-conversion definition in a Meta ad account and return its ID.

Create Lead Form

Create a persistent lead-generation form owned by a Facebook Page and return its ID.

Delete Campaign

Delete an advertising campaign using the Meta Marketing API.

Generate Ad Previews

Render previews for a provider-native creative specification in a Meta ad account and return the generated HTML bodies.

Get Ad Accounts

Tool to retrieve all ad account IDs accessible to the authenticated user from Meta Ads.

Get Ad Creative

Get Ad Creative

Get Insights

Get insights data for a Meta Ads object (ad account, campaign, ad set, or ad) using the Meta Marketing API.

Get Meta Object

Tool to retrieve data for any Meta Marketing API object by its ID.

Get Page Accounts

Retrieve pages managed by the authenticated user, including page access tokens when requested.

Get Pixel Event Stats

Read recent Pixel event-count and processing statistics, optionally restricted to server events and one event name, to verify aggregate ingestion.

Get User

Tool to retrieve information about the authenticated user from Meta (Facebook) Graph API.

List Activities

List activity history for a Meta ad account or ad set.

List Ad Account Pixels

List the Pixels and consolidated datasets associated with an ad account so a usable data-source ID can be selected for Conversions API events.

List Ad Creatives

Tool to list all ad creatives under an ad account.

List Ad Images

List one page of image assets in a Meta ad account, optionally restricted to exact image hashes.

List Ad Network Analytics

Tool to retrieve ad network analytics for a Meta Business using the Meta Marketing API.

List Ad Network Analytics Results

Tool to retrieve ad network analytics results for Facebook Audience Network.

List Ads

Tool to list all ads under an ad account using the Meta Marketing API.

List Ad Videos

List one page of video assets in a Meta ad account, optionally filtered by title, dimensions, duration, or aspect ratio.

List Agencies

Tool to retrieve agencies associated with a Meta Business or Ad Account.

List Assigned Pages

Tool to retrieve Facebook Pages assigned to a business user via Meta Marketing API.

List Assigned Users

Tool to list users assigned to a Facebook Page or Ad Account within a specific business context.

List Business Ad Accounts

Tool to retrieve all ad accounts owned by a specific Business Manager.

List Businesses

Tool to discover every Business Manager the authenticated Meta principal can access, via `GET /me/businesses`.

List Business Invoices

Tool to retrieve business invoices from Meta Marketing API.

List Campaigns

List one page of campaigns belonging to a Meta ad account.

List Client Ad Accounts

Tool to list all client ad accounts accessible to a business from Meta Ads.

List Client Apps

Tool to retrieve client apps associated with a Meta Business using the Marketing API.

List Client Instagram Assets

Tool to retrieve Instagram assets that are shared with a business as a client using the Meta Marketing API.

List Client Offsite Signal Container Business Objects

Tool to retrieve client offsite signal container business objects for a business from Meta Marketing API.

List Client Pages

Tool to retrieve client pages associated with a Meta business.

List Clients

Tool to retrieve client businesses associated with a Meta Business Manager.

List Collaborative Ads Collaboration Requests

Tool to retrieve collaborative ads collaboration requests for a Meta Business using the Marketing API.

List Collaborative Ads Suggested Partners

Tool to retrieve collaborative ads suggested partners for a business from Meta Marketing API.

List Comments

Return one page from the comments edge of a Page-owned post, photo, video, comment, or reply.

List Custom Audiences

List one page of custom audiences in a Meta ad account, with field projection and optional business, primary-audience, or Pixel constraints.

List Custom Conversions

List one page of custom-conversion definitions in a Meta ad account, with field projection and opaque cursor pagination.

List Initiated Audience Sharing Requests

Tool to retrieve initiated audience sharing requests for a business using the Meta Marketing API.

List Leads

List one page of leads belonging to a Meta Ad or Leadgen Form.

List Managed Partner Ads Funding Source Details

Tool to retrieve managed partner ads funding source details for a Meta Business.

List Owned Apps

Tool to retrieve apps owned by a business from Meta Marketing API.

List Owned Businesses

Tool to retrieve businesses owned by a parent Business Manager from Meta Marketing API.

List Owned Instagram Assets

Tool to list Instagram accounts/assets owned by a Meta Business.

List Owned Offsite Signal Container Business Objects

Tool to retrieve owned offsite signal container business objects for a business from Meta Marketing API.

List Owned Pages

Tool to retrieve Pages owned by a Business Manager from Meta Marketing API.

List Pending Client Ad Accounts

Tool to retrieve pending client ad account access requests for a Business Manager from Meta Ads.

List Pending Client Apps

Tool to retrieve pending client apps for a Meta Business.

List Pending Client Pages

Tool to retrieve pending client pages for a Business Manager using the Meta Marketing API.

List Pending Shared Offsite Signal Container Business Objects

Tool to retrieve pending shared offsite signal container business objects from Meta Marketing API.

List Pending Owned Ad Accounts

Tool to retrieve pending owned ad accounts for a Business Manager account from Meta Marketing API.

List Pending Owned Pages

Tool to retrieve Pages with pending ownership status for a Business Manager from Meta Marketing API.

List Pending Users

Tool to retrieve pending users from a Business Manager in Meta Marketing API.

List Received Audience Sharing Requests

Tool to retrieve all received audience sharing requests for a business using the Meta Marketing API.

List Subscribed Apps

List one page of applications subscribed to a Meta ad account.

List System Users

Tool to retrieve system users for a Meta Business Manager account.

List Targeting Search

Tool to search for targeting options in Meta Ads Marketing API.

List Video Tags

Return one page of TaggableSubject entries from a Video's `/tags` edge.

List Video Thumbnails

List one page of available thumbnail variants for a Meta video.

Read Ad Sets

Retrieve ad sets from a Meta ad account using the Marketing API.

Send Conversion Events

Irreversibly submit 1-1,000 validated server conversion events to a Meta Pixel or dataset.

Update Ad Creative

Update Ad Creative

Update Campaign

Update an existing advertising campaign using the Meta Marketing API.

Upload Ad Image

Upload an image for use in Meta ad creatives using the Marketing API.

FAQ

Frequently asked questions

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

Yes, you can. Hermes 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 Metaads tools.

Yes, absolutely. You can configure which Metaads 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 Metaads data and credentials are handled as safely as possible.

Start with Metaads.It takes 30 seconds.

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

Start building