
Kadam Ad Network
io.github.kadam-official由 GitHub 账号 kadam-official 发布v0.3.4更新于 Oct 24, 2026
Kadam advertising platform — manage ads, campaigns, creatives, audiences and stats
概览
让助手通过 Kadam 广告平台 API 管理广告活动、创意、受众、发布商站点和统计数据。
- 可以做什么
- 将助手接入 Kadam 广告网络,用于广告主和发布商操作。广告主工具覆盖广告活动、文件夹、创意、受众、出价与站点管理、财务操作和统计;发布商工具覆盖站点、广告单元、账户信息、统计以及 Smart Mediation 网络连接。还提供参考资源和用于创建广告活动、分析效果、优化站点的工作流提示。
- 适用场景
- 当你在 Kadam 上投放广告或经营发布商业务,并希望助手代替网页后台来创建、修改、暂停或分析广告活动、创意、受众、站点和报表时使用。
- 运行要求
- 通过 npm 包 @kadam-net/mcp-server 以 stdio 在本地运行,需要 Node.js 18 或更高版本。至少需要一个 API 密钥:KADAM_ADV_API_KEY(广告主)或 KADAM_PUB_API_KEY(发布商),可从 Kadam 合作方或发布商个人资料页获取。可选变量用于设置 API 基础地址、日志级别以及服务端部署的 HTTP 传输配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Kadam Ad Network,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@kadam-net/mcp-server
[npm version] [npm downloads] [license] [node] [MCP Registry]
MCP server for Kadam ad network — manage campaigns, creatives, audiences, sites, and analytics via AI agents.
Built on the Model Context Protocol (MCP), the open standard for connecting LLMs to external tools and data.
Install (one click)
Cursor
Or add manually to .cursor/mcp.json:
Claude Code
Then set the env var: export KADAM_ADV_API_KEY=your-key
Claude Desktop
Download → double-click → Install. Or add manually to claude_desktop_config.json (Settings → Developer → Edit Config):
Any MCP client (universal one-liner)
Docker
npm global
Configuration
At least one API key must be provided in stdio mode. In HTTP mode, tokens are passed per-request via Bearer authentication.
Role-based catalog
The tool catalog matches the role of the bearer. Once per session (and once per process in stdio mode) the server calls GET /api/v1/access on the advertiser API, which answers { impersonation: bool }:
This is a catalog hint, not a gate: the Kadam API enforces the same rule on every call (403 / 422 for a client token). If /access cannot be reached, the session gets the client catalog — the smaller one is always safe to show.
HTTP Transport (multi-tenant deployment)
For server-side deployment serving multiple users:
Connecting via HTTP (Cursor / Claude)
Connecting via OAuth (ChatGPT)
Add https://partners.kadam.net/mcp (advertiser) or https://pub.kadam.net/mcp (publisher) as Server URL in ChatGPT settings. OAuth discovery, registration, and login happen automatically.
Tools (80)
Advertiser Tools (63)
Requires KADAM_ADV_API_KEY.
Dictionaries
Campaigns
Bid Management
Campaign Folders
Creatives
Audiences
Finance & Statistics
Publisher Tools (17)
Requires KADAM_PUB_API_KEY.
Sites (Sources)
Ad Units
User & Statistics
Kadam Smart Mediation
Selling an ad unit's traffic through outside ad networks alongside Kadam demand. The API,
the code and the report dimensions call it plain mediation. Read
kadam://reference/mediation first; split the income in kadam_pub_get_stats with
groupBy=network and the kadam_revenue / mediation_revenue metrics.
Resources (9)
Static reference data the agent can read before calling tools:
Prompts (4)
Pre-built workflow templates that guide the agent through multi-step operations:
Architecture
Key Design Decisions
- ToolWrapper middleware — centralized auth validation, error formatting, and logging for all 80 tools
- Lazy singleton API clients — one
HttpClientinstance per product, created on first use - Output truncation — hard 50KB limit per response with
maxResults(default 25, max 100) to prevent LLM context overflow - Human-readable output — formatted tables, aligned entities, pagination metadata instead of raw JSON
- Tool annotations —
readOnlyHint,destructiveHint,idempotentHintto guide agent behavior - Server instructions — usage patterns and constraints sent to the LLM on connection
- Dimension mapping — stats tools accept human-readable names ("clicks", "spend") and resolve them to API IDs internally
- Role-shaped catalog — the bearer is forwarded untouched, and its role is read once per session from
GET /access(see "Role-based catalog"). Tools declarerequires: "impersonation"andToolWrapperskips them for client sessions;campaigns.tsadds the manager-only campaign fields to its schemas only under impersonation. Nothing is enforced here — the API still answers 403 / 422 to a client token — so the catalog can never be wider than the key's real rights, only narrower when/accessis unreachable
Development
Prerequisites
- Node.js >= 18
- npm
Setup
Commands
Testing
202 tests across 23 files using Vitest + MCP SDK InMemoryTransport:
- Unit tests — output formatter, config, HTTP client (mocked fetch)
- Middleware tests — ToolWrapper auth, error formatting, logging
- Integration tests — full server with all 72 tools, 8 resources, 4 prompts via in-memory MCP client
- Tool handler tests — each tool module with mocked API clients
MCP Inspector
The MCP Inspector provides a visual interface for testing:
Deployment
Docker
CI/CD
The .gitlab-ci.yml pipeline includes:
- lint — ESLint + TypeScript check
- test — Vitest with coverage
- build — Vite production build
- publish — npm publish + Docker push (manual trigger)
License
MIT
来源:README.md,提交 2f55815
工具
0版本历史
1- v0.3.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分