npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

meta-mcp

v1.11.0

Published

MCP Server for Facebook Marketing API integration

Readme

Facebook Marketing API Client for Meta Client Platform (MCP)

This package provides tools for interacting with the Facebook Marketing API through the Meta Client Platform.

Important Update

As of version 2.0.0: All request payloads must use snake_case format as they are passed directly to the Facebook Marketing API without transformation. Previous versions used camelCase with automatic conversion.

The server now acts as a direct proxy to the Facebook Marketing API, passing all parameters through without modification and returning Facebook API responses directly.

Installation

npm install meta-mcp

Configuration

Set the following environment variables:

FB_ACCESS_TOKEN=your_facebook_access_token
FB_AD_ACCOUNT_ID=your_ad_account_id
FB_API_VERSION=v22.0
FB_API_DOMAIN=https://graph.facebook.com

Usage Examples

Creating a Campaign

const result = await callTool({
  name: "createCampaign",
  arguments: {
    config: {
      name: "Test Campaign",
      objective: "OUTCOME_AWARENESS",
      status: "PAUSED",
      special_ad_categories: ["NONE"],
      daily_budget: 2000, // $20.00
      bid_strategy: "LOWEST_COST_WITHOUT_CAP"
    }
  }
});

Updating a Campaign

const result = await callTool({
  name: "updateCampaign",
  arguments: {
    campaignId: "23848238482384",
    config: {
      name: "Updated Campaign Name",
      daily_budget: 5000 // $50.00
    }
  }
});

Creating an Ad Set

const result = await callTool({
  name: "createAdSet",
  arguments: {
    config: {
      name: "My First Ad Set",
      campaign_id: "23848238482384",
      daily_budget: 1000, // $10.00
      billing_event: "IMPRESSIONS",
      optimization_goal: "REACH",
      bid_strategy: "LOWEST_COST_WITHOUT_CAP",
      targeting: {
        geo_locations: {
          countries: ["US"]
        },
        age_min: 18,
        age_max: 65,
        genders: [1, 2]
      },
      status: "PAUSED"
    }
  }
});

Creating an Ad

const result = await callTool({
  name: "createAd",
  arguments: {
    config: {
      name: "My First Ad",
      adset_id: "23848238482384",
      status: "PAUSED",
      creative: {
        name: "My First Creative",
        title: "Try our amazing product!",
        body: "This is the best product you'll ever use.",
        link_url: "https://example.com",
        image_url: "https://example.com/image.jpg",
        call_to_action: "LEARN_MORE"
      }
    }
  }
});

Getting Campaigns

const result = await callTool({
  name: "getCampaigns",
  arguments: {
    limit: 10,
    status: "ACTIVE",
    datePreset: "last_30_days"
  }
});

Getting Ad Sets

const result = await callTool({
  name: "getAdSets",
  arguments: {
    campaignId: "23848238482384"
  }
});

Getting Ads

const result = await callTool({
  name: "getAds",
  arguments: {
    adSetId: "23848238482384"
  }
});

Pausing a Campaign

const result = await callTool({
  name: "pauseCampaign",
  arguments: {
    campaignId: "23848238482384"
  }
});

Available Tools

Campaign Management

  • createCampaign: Create a new campaign
  • updateCampaign: Update an existing campaign
  • getCampaign: Get details for a specific campaign
  • getCampaigns: Get a list of campaigns
  • pauseCampaign: Pause an active campaign

Ad Set Management

  • createAdSet: Create a new ad set
  • updateAdSet: Update an existing ad set
  • getAdSet: Get details for a specific ad set
  • getAdSets: Get a list of ad sets for a campaign
  • getAccountAdSets: Get a list of ad sets for the account
  • pauseAdSet: Pause an active ad set

Ad Management

  • createAd: Create a new ad
  • updateAd: Update an existing ad
  • getAd: Get details for a specific ad
  • getAds: Get a list of ads for an ad set
  • getAccountAds: Get a list of ads for the account
  • pauseAd: Pause an active ad

Account Management

  • getAvailableAdAccounts: Get a list of available ad accounts

Facebook API Parameters

Refer to the Facebook Marketing API documentation for details on available parameters and their formats. As the server now acts as a direct proxy, you can use any parameter documented in the Facebook Marketing API directly in your requests.

Error Handling

Errors from the Facebook API are passed directly to the client without modification. Check the error message and details for information about what went wrong.

License

MIT