@advertising-chat/mcp-manage
v0.2.1
Published
Management MCP server for Advertising.chat — operate ad units, line items, creatives, campaigns, and performance queries from any MCP-capable agent with your own account
Downloads
52
Maintainers
Readme
@advertising-chat/mcp-manage
Operate your Advertising.chat account from Claude Desktop, Claude Code, or any MCP-capable agent host — with your own account and permissions.
mcp-manage is a local MCP (Model Context Protocol) server that projects
the Advertising.chat management API as ~39 tools: ad units, line items,
creatives (including flow creatives), campaigns, ad groups, API keys, and
real-time performance queries. Every call runs with your token and
your role — the server can't do anything you couldn't do with curl.
Quick start
Authenticate once with the Advertising.chat CLI:
npx ads-cli login # or: ads login, if you have ads-cli installedmcp-managepicks up (and auto-refreshes) the cached token at~/.ads-cli. Alternatively setADCHAT_TOKENto an access token.Add the server to your MCP host. Claude Desktop (
claude_desktop_config.json):{ "mcpServers": { "advertising-chat-manage": { "command": "npx", "args": ["-y", "@advertising-chat/mcp-manage"] } } }Claude Code:
claude mcp add advertising-chat-manage -- npx -y @advertising-chat/mcp-manageAsk your agent things like "how many impressions did we serve yesterday?" or "create a disabled line item for the homepage ad unit with the summer-sale creative."
Configuration
| Env var | Meaning |
|---|---|
| ADCHAT_TOKEN | Explicit access token (overrides the ~/.ads-cli cache). |
| ADCHAT_ORG | Target org id. Default: your own org, resolved from your identity. |
| ADCHAT_SYSTEM_REQUEST | true to send X-Adchat-System-Request (sysops only; requires ADCHAT_ORG). |
| ADCHAT_MANAGE_BASE_URL | Management API base URL override (default https://api.advertising.chat/system). |
Safety model
- Your authority, nothing more. Requests carry your Auth0 token and target org; org membership and role checks happen server-side exactly as they do for the console. A viewer role can read everything and mutate nothing.
- Created disabled. Ad units, line items, campaigns, and ad groups are
created with
enabled: falseunless you explicitly ask to launch. - Deletes need confirmation. Destructive tools refuse to run without an
explicit
confirm: trueargument, and MCP hosts additionally prompt on non-read-only tools. - Attributed. Every request is tagged
X-Adchat-Agent: mcp-managefor audit. - The server never logs your token. Installing third-party MCP servers alongside this one is your host's trust decision.
Embedding the tool layer
The tool definitions and handlers are importable without the stdio server — the Advertising.chat console copilot consumes the same table server-side:
import {
tools, // definitions: name, description, zod schema, annotations
createHandlers, // bind handlers to an HTTP client
createHttpClient,
validateFlowPayload,
} from '@advertising-chat/mcp-manage';
const http = createHttpClient({ getToken, org });
const handlers = createHandlers(http);
await handlers.list_ad_units({ limit: 10 });Docs
Full tool catalog and walkthrough: https://docs.advertising.chat/adkit/manage-mcp/
