MCP Server for connecting to the Meta Marketing API
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add meta-marketing-api --env META_ACCESS_TOKEN='<META_ACCESS_TOKEN>' -- npx -y meta-ads-mcp~/.codex/config.toml
[mcp_servers.meta-marketing-api]
command = "npx"
args = ["-y", "meta-ads-mcp"]
env = { META_ACCESS_TOKEN = "<META_ACCESS_TOKEN>" }
# codex mcp add meta-marketing-api --env META_ACCESS_TOKEN='<META_ACCESS_TOKEN>' -- npx -y meta-ads-mcp~/.cursor/mcp.json
{
"mcpServers": {
"meta-marketing-api": {
"command": "npx",
"args": [
"-y",
"meta-ads-mcp"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"meta-marketing-api": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"meta-ads-mcp"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"meta-marketing-api": {
"command": "npx",
"args": [
"-y",
"meta-ads-mcp"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"meta-marketing-api": {
"command": "npx",
"args": [
"-y",
"meta-ads-mcp"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"meta-marketing-api": {
"command": "npx",
"args": [
"-y",
"meta-ads-mcp"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>"
}
}
}
}Environment variables
META_ACCESS_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.