MCP Server
The Model Context Protocol lets an AI agent call your application directly. This server exposes the same operations as the REST API, so an agent can create projects and run jobs on your behalf.
Setup
Generate an API key in Settings, then add the server to your MCP client. For Claude Desktop, that is claude_desktop_config.json:
{
"mcpServers": {
"dadads": {
"command": "npx",
"args": ["-y", "@dadads/mcp-server"],
"env": {
"TRANSPORT": "stdio",
"API_KEY": "sk_...",
"API_BASE_URL": "https://ads.daho.ai"
}
}
}
}The server also runs over HTTP for clients that prefer it. Omit TRANSPORT and it listens on PORT (8787 by default), reading the key from the Authorization header or a ?token= query parameter.
Available tools
| Tool | What it does |
|---|---|
get_me | Profile, project count, and remaining credits. Useful before spending one. |
list_projects | Every project, most recently updated first. |
get_project | One project by id, with its description and metadata. |
create_project | Create a project. Takes a name and optional description. |
run_audit | Run the 161-control audit on a project. Costs one credit, refunded if it fails. Returns a job id immediately. |
get_latest_audit | The newest completed audit, summarised: scores, weakest categories, quick wins, critical issues, and what moved. Start here. |
list_findings | The findings ledger — one row per failing or warning control, carried across audits. Filter by status and platform. |
update_finding | Set a finding's status (open, in_progress, fixed, wont_fix, snoozed) and note. |
run_job | Start any job type on a project. Prefer run_audit for ads_audit — same job, checked input. |
get_job | A job's status and full result. Poll this after run_audit; prefer get_latest_audit unless you need one control's raw evidence. |
Example
Once connected, ask your agent in plain language. It will chain the tools itself:
"How is Acme's Google account doing, and what should I fix first?"
-> list_projects
-> get_latest_audit { projectId: 7 }
-> list_findings { projectId: 7, status: ["open"], platform: "google" }
"I've fixed the negative keyword lists."
-> update_finding { projectId: 7, findingId: 45, status: "fixed" }
"Re-audit it."
-> run_audit { projectId: 7,
accounts: { google: { accountId: "776-992-4543" } } }
-> get_job { jobId: 12 }In-browser tools
The same operations are also registered with the browser's WebMCP interface (document.modelContext) when the browser supports it, so an in-page agent can drive the app using your existing session — no API key involved. See lib/webmcp/ to add your own.
Adding a tool
There are three agent surfaces and they deliberately share one vocabulary. When you add a capability worth exposing, register it in each:
mcp-server/src/index.ts— for external MCP clientsweb/src/lib/webmcp/tools/projects.ts— for in-browser agentsweb/src/lib/chat/tools.ts— for the built-in assistant