
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 分