mixirica13/remote-mcp-server-chatdata
If you are the rightful owner of remote-mcp-server-chatdata and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The ChatData Meta Ads MCP Server is a serverless solution for integrating with the Meta Ads API, deployed on Cloudflare Workers.
ChatData Meta Ads MCP Server - Cloudflare Workers
MCP (Model Context Protocol) Server for Meta Ads API integration, deployed on Cloudflare Workers.
Features
- ✅ 9 Meta Ads Tools: Complete integration with Meta Ads API
- ✅ Cloudflare Workers: Serverless deployment with global edge network
- ✅ Server-Sent Events (SSE): Real-time bidirectional streaming
- ✅ MCP Protocol 2025-11-25: Latest HTTP Streamable protocol
- ✅ Durable Objects: Stateful session management
Tools Available
- list_ad_accounts - List all Meta Ads accounts
- list_campaigns - List campaigns from an ad account
- get_campaign_insights - Get campaign metrics and insights
- get_account_insights - Get account-level insights
- search_campaigns - Search campaigns by name
- list_adsets - List ad sets from a campaign
- get_adset_insights - Get ad set metrics
- list_ads - List ads from an ad set
- get_ad_insights - Get ad-level metrics
Quick Start
Prerequisites
- Node.js 18+ installed
- Cloudflare account
- Meta Ads API access token
Installation
# Clone the repository
git clone https://github.com/mixirica13/remote-mcp-server-chatdata.git
cd remote-mcp-server-chatdata
# Install dependencies
npm install
Local Development
# Create .dev.vars file with your Meta token
echo 'META_ACCESS_TOKEN="your_meta_token_here"' > .dev.vars
# Start development server
npm start
# Server will be available at http://localhost:8787
Testing with MCP Inspector
# In another terminal, start MCP Inspector
npx @modelcontextprotocol/inspector@latest
# Visit http://localhost:5173
# Enter http://localhost:8787/sse and click Connect
Deploy to Cloudflare
# Configure your Meta token as a secret
wrangler secret put META_ACCESS_TOKEN
# Deploy to Cloudflare Workers
npm run deploy
After deployment, your MCP server will be available at:
- SSE:
https://remote-mcp-server-chatdata.YOUR_ACCOUNT.workers.dev/sse - MCP:
https://remote-mcp-server-chatdata.YOUR_ACCOUNT.workers.dev/mcp
Connect to Cloudflare AI Playground
You can connect to your MCP server from the Cloudflare AI Playground:
- Go to https://playground.ai.cloudflare.com/
- Enter your deployed MCP server URL (
remote-mcp-server-chatdata.<your-account>.workers.dev/sse) - You can now use your MCP tools directly from the playground!
Connect Claude Desktop to your MCP server
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"chatdata-meta-ads": {
"command": "npx",
"args": [
"mcp-remote",
"https://remote-mcp-server-chatdata.YOUR_ACCOUNT.workers.dev/sse"
]
}
}
}
Restart Claude Desktop and you should see the tools become available.
API Endpoints
- GET /sse - Server-Sent Events endpoint for MCP protocol
- POST /mcp - Standard MCP endpoint
- GET /health - Health check endpoint
- GET / or /info - Server information
Environment Variables
Configure in Cloudflare Workers settings or .dev.vars for local development:
META_ACCESS_TOKEN(required) - Meta Ads API access tokenMETA_API_VERSION(optional) - Meta API version (default: v21.0)SUPABASE_URL(optional) - Supabase project URL for token managementSUPABASE_KEY(optional) - Supabase API key
Architecture
┌─────────────────┐
│ Claude Client │
└────────┬────────┘
│ SSE/MCP Protocol
┌────────▼──────────────────┐
│ Cloudflare Worker │
│ (Global Edge Network) │
│ │
│ ┌─────────────────────┐ │
│ │ MCP Agent │ │
│ │ (Durable Object) │ │
│ └──────────┬──────────┘ │
└─────────────┼─────────────┘
│
│ HTTPS
┌─────────────▼────────────┐
│ Meta Ads Graph API │
│ graph.facebook.com │
└──────────────────────────┘
Development
# Type checking
npm run type-check
# Format code
npm run format
# Lint and fix
npm run lint:fix
# Generate TypeScript types
npm run cf-typegen
Links
License
MIT
Author
ChatData Team - mixirica13