X Ads
v1.1.2X Ads MCP server: 25 read tools, 21 opt-in preview-first writes.
Values you need
| Variable | What it is | |
|---|---|---|
X_ADS_ACCESS_TOKEN | required secret | User OAuth 2.0 token. Keep it secret. |
X_ADS_ACCOUNT_IDS | required | Comma-separated allowed account IDs. Required even for reads. |
X_ADS_SCOPES | optional | Scopes actually granted to the token, including ads.read. |
X_ADS_ENABLE_WRITES | optional | true exposes 21 write tools. Defaults to false. Calls preview unless confirm is true. |
npm (npx)
Requires Node.js 18+
Run in a terminal
claude mcp add x-ads -e 'X_ADS_ACCESS_TOKEN=<X_ADS_ACCESS_TOKEN>' -e 'X_ADS_ACCOUNT_IDS=<X_ADS_ACCOUNT_IDS>' -- npx -y --package=@getmcpads/x-ads-mcp-server@1.1.2 x-ads-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"x-ads": {
"args": [
"-y",
"--package=@getmcpads/x-ads-mcp-server@1.1.2",
"x-ads-mcp"
],
"command": "npx",
"env": {
"X_ADS_ACCESS_TOKEN": "<X_ADS_ACCESS_TOKEN>",
"X_ADS_ACCOUNT_IDS": "<X_ADS_ACCOUNT_IDS>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"x-ads": {
"args": [
"-y",
"--package=@getmcpads/x-ads-mcp-server@1.1.2",
"x-ads-mcp"
],
"command": "npx",
"env": {
"X_ADS_ACCESS_TOKEN": "<X_ADS_ACCESS_TOKEN>",
"X_ADS_ACCOUNT_IDS": "<X_ADS_ACCOUNT_IDS>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "X_ADS_ACCESS_TOKEN",
"id": "x-ads-access-token",
"password": true,
"type": "promptString"
},
{
"description": "X_ADS_ACCOUNT_IDS",
"id": "x-ads-account-ids",
"password": true,
"type": "promptString"
}
],
"servers": {
"x-ads": {
"args": [
"-y",
"--package=@getmcpads/x-ads-mcp-server@1.1.2",
"x-ads-mcp"
],
"command": "npx",
"env": {
"X_ADS_ACCESS_TOKEN": "${input:x-ads-access-token}",
"X_ADS_ACCOUNT_IDS": "${input:x-ads-account-ids}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.x-ads]
command = "npx"
args = ["-y", "--package=@getmcpads/x-ads-mcp-server@1.1.2", "x-ads-mcp"]
env = { "X_ADS_ACCESS_TOKEN" = "<X_ADS_ACCESS_TOKEN>", "X_ADS_ACCOUNT_IDS" = "<X_ADS_ACCOUNT_IDS>" }For AI agents
- Ask the user for: X_ADS_ACCESS_TOKEN, X_ADS_ACCOUNT_IDS. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json