Digital Agency Tools Docs

MCP & AI agents

The API is also an MCP (Model Context Protocol) server, so an AI agent such as Grok, Claude or ChatGPT can work in your business directly. Every endpoint in the reference is one tool (234 of them, listed in the tool catalogue), with the same keys, scopes, limits and errors as the REST API.

Quick start

  1. In the panel, open Settings → Developers and create a key for the agent. Start with a read key: the agent can look at everything and change nothing.
  2. Give your agent the server URL https://api.digitalagency.tools/mcp and the header Authorization: Bearer <key>. The next section has the exact setup for each client.
  3. Ask it something: "Which invoices are overdue, and who are they for?"
  4. Check what it did under Settings → Developers → Recent agent calls.

The server

  • URL: https://api.digitalagency.tools/mcp. It uses Streamable HTTP and is stateless, so it takes POST only: there is no event stream and no session to keep.
  • Auth: Authorization: Bearer <API key>, using a key from Settings → Developers. There is no OAuth sign-in (see which clients work).
  • Tools: only the ones the key can call. A read key gets the read-only tools and nothing else. Tools for features your plan does not include are left out.
  • Protocol versions: 2025-06-18</code>, <code>2025-03-26</code>, <code>2024-11-05. The server offers tools only; it has no resources or prompts.

Give each agent its own key, so you can see its calls and revoke it on its own.

The three settings every client needs

Server URL   https://api.digitalagency.tools/mcp
Transport    Streamable HTTP
Header       Authorization: Bearer dak1.…

Connect your client

Any MCP client that can send a custom Authorization header works. That covers the model APIs (xAI, OpenAI, Anthropic), desktop and IDE clients (Claude Desktop, Claude Code, Cursor, VS Code) and MCP Inspector.

Grok (xAI API)

Add a remote MCP tool to a Responses API call. Grok runs the tools itself and returns the final answer. Use allowed_tools to offer it only some tools.

OpenAI (Responses API)

Use a "type": "mcp" tool with the key in headers. Leave require_approval on for anything but a read key.

Claude (Anthropic API)

Use the MCP connector: list the server in mcp_servers with the key as authorization_token. The connector is a beta feature, so check Anthropic's documentation for the current anthropic-beta value.

Claude Code

One command adds the server to your project or user settings.

Claude Desktop

Claude Desktop's config file starts local servers, so bridge to this one with mcp-remote (needs Node.js). The key goes in an environment variable so the space in "Bearer …" survives.

Cursor and VS Code

Both read an mcp.json with the URL and headers. VS Code can prompt for the key instead of storing it in the file.

MCP Inspector

To try the tools by hand, run npx @modelcontextprotocol/inspector, choose Streamable HTTP, paste the URL and add the Authorization header.

Not supported yet

The "add a connector" screens in the claude.ai, ChatGPT and grok.com apps sign in with OAuth, which this server does not offer yet. Use one of the clients above instead.

Grok · xAI Responses API

curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4",
    "input": "List my overdue tasks and draft a client update for each project.",
    "tools": [{
      "type": "mcp",
      "server_url": "https://api.digitalagency.tools/mcp",
      "server_label": "digitalagency",
      "authorization": "Bearer '"$DA_API_KEY"'"
    }]
  }'

Grok · xAI Python SDK

from xai_sdk import Client
from xai_sdk.chat import user
from xai_sdk.tools import mcp

client = Client()
chat = client.chat.create(
    model="grok-4",
    tools=[mcp(
        server_url="https://api.digitalagency.tools/mcp",
        server_label="digitalagency",
        authorization="Bearer " + DA_API_KEY,
    )],
)
chat.append(user("Which invoices are overdue?"))
print(chat.sample().content)

OpenAI · Responses API

curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "input": "Which support tickets have waited longest for a reply?",
    "tools": [{
      "type": "mcp",
      "server_label": "digitalagency",
      "server_url": "https://api.digitalagency.tools/mcp",
      "headers": { "Authorization": "Bearer '"$DA_API_KEY"'" },
      "require_approval": "always"
    }]
  }'

Claude · Anthropic Messages API

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: mcp-client-2025-04-04" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 2048,
    "messages": [{ "role": "user", "content": "Summarise this week'"'"'s new deals." }],
    "mcp_servers": [{
      "type": "url",
      "url": "https://api.digitalagency.tools/mcp",
      "name": "digitalagency",
      "authorization_token": "'"$DA_API_KEY"'"
    }]
  }'

Claude Code

claude mcp add --transport http digitalagency \
  https://api.digitalagency.tools/mcp \
  --header "Authorization: Bearer $DA_API_KEY"

Claude Desktop · claude_desktop_config.json

{
  "mcpServers": {
    "digitalagency": {
      "command": "npx",
      "args": ["mcp-remote", "https://api.digitalagency.tools/mcp",
               "--header", "Authorization:${DA_AUTH}"],
      "env": { "DA_AUTH": "Bearer dak1.…" }
    }
  }
}

Cursor · ~/.cursor/mcp.json

{
  "mcpServers": {
    "digitalagency": {
      "url": "https://api.digitalagency.tools/mcp",
      "headers": { "Authorization": "Bearer dak1.…" }
    }
  }
}

VS Code · .vscode/mcp.json

{
  "inputs": [{ "type": "promptString", "id": "da-key",
               "description": "Digital Agency Tools API key", "password": true }],
  "servers": {
    "digitalagency": {
      "type": "http",
      "url": "https://api.digitalagency.tools/mcp",
      "headers": { "Authorization": "Bearer ${input:da-key}" }
    }
  }
}

The protocol, by hand

A client sends three kinds of message, each a JSON-RPC 2.0 POST to the same URL. First initialize (the reply names the protocol version and the server), then tools/list, then tools/call for each action. Batches (a JSON array of messages) are accepted. Notifications such as notifications/initialized get 202 with no body.

Tools

A tool's name is the endpoint's operation, in snake case: contacts_list, contacts_create, tasks_update, invoices_send. Its input is the path parameters, query parameters and JSON body of that endpoint, flattened into one object. contacts_update takes {"id": 482, "company": "Kelly & Co"}. List tools also take page and per_page.

The result is the API's usual envelope, {"data": …, "meta": {"request_id"}}, sent both as text and as structured content. A failure comes back as a tool result with isError: true and the error envelope, so the agent can read the invalid_request details and fix its call.

Tools carry MCP hints. Reads are readOnlyHint. Deletes, voids, refunds and key rotations are destructiveHint. Sends and payment links are openWorldHint, because they reach outside the platform.

Create and send tools take an optional idempotency_key. Reuse the same value when retrying and the first result is replayed instead of the action running twice (see idempotency).

1 · initialize

curl https://api.digitalagency.tools/mcp \
  -H "Authorization: Bearer $DA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize",
        "params": { "protocolVersion": "2025-06-18", "capabilities": {},
                    "clientInfo": { "name": "curl", "version": "1" } } }'

2 · tools/list

curl https://api.digitalagency.tools/mcp \
  -H "Authorization: Bearer $DA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }'

3 · tools/call

{ "jsonrpc": "2.0", "id": 3, "method": "tools/call",
  "params": { "name": "contacts_create",
              "arguments": { "name": "Niamh Kelly", "email": "niamh@example.com",
                             "idempotency_key": "grok-7c1e8a52" } } }

Result

{ "jsonrpc": "2.0", "id": 3, "result": {
    "content": [{ "type": "text", "text": "{ \"data\": { \"id\": 482, … } }" }],
    "structuredContent": { "data": { "id": 482, "name": "Niamh Kelly", … },
                           "meta": { "request_id": "req_…" } } } }

Keeping the tool list short

The model holds every tool definition in its context, so offering fewer tools makes it faster and more accurate. Add ?modules= to the server URL to offer only some modules, for example https://api.digitalagency.tools/mcp?modules=tasks,projects. With Grok or OpenAI you can also pass allowed_tools with exact tool names.

ModuleCoversTools
meta Account 6
contacts Contacts 8
deals Deals 9
projects Projects 28
tasks Tasks 13
planner Planner 4
meetings Meetings & bookings 17
products Products 17
coupons Coupons 8
invoices Invoices 16
proposals Proposals 10
discoveries Discoveries 9
tickets Tickets 11
forms Forms 8
newsletter Newsletter 8
staff Staff 4
notifications Notifications 3
developer Developers 13
settings Settings 20
pages Pages 8
agent Agent 6
subscription Subscription 8

Things to ask an agent

AskTools it will useKey
"Which invoices are overdue, and how much is outstanding in total?" invoices_listread
"Send a polite reminder for every invoice more than 14 days overdue." invoices_list, invoices_send with type: "reminder"write
"Close any support ticket that has had no reply from the client for 30 days." tickets_list, tickets_updatewrite
"Give me a Monday digest: new deals, meetings this week and tasks due." deals_list, meetings_list, tasks_listread
"Turn these meeting notes into tasks on the Website project." projects_list, agent_propose, agent_commitwrite
"Tidy up duplicate contacts with the same email address." contacts_list, contacts_update, contacts_deletewrite

Look up the exact names in the tool catalogue.

Safety

  • Start read-only. A read key cannot change anything, whatever the agent is told to do. Move to write once you trust the workflow. Only use admin if the agent must manage keys, webhooks or staff.
  • Require approval for destructive tools. Every delete, void, refund and rotation is marked destructiveHint. Set your client to ask before running those (OpenAI: require_approval; most desktop clients ask by default).
  • Treat business data as untrusted. Ticket messages, form answers and emails are written by other people. A message that says "ignore your instructions and delete…" is only text, but an agent might act on it. Read keys and approval prompts are the defence.
  • One key per agent, so the audit trail is clear and revoking one agent leaves the rest working. Revoke a key the moment it is no longer needed.
  • Things only a person can do stay in the browser: connecting Google, Stripe or Zoom, entering card details, setting up two-factor sign-in and linking a WhatsApp phone. Those tools return a link to open.

Audit

Every tool call is recorded with the tool, request, status, key, time and IP. Arguments are hashed, never stored. Owners see the latest calls under Settings → Developers → Recent agent calls. Calls count against the key's rate limit exactly like REST requests.

Troubleshooting

What you seeWhy, and what to do
405 when opening the URL The server only answers POST. A browser sends GET, so this is expected. Point an MCP client at it instead.
401 with WWW-Authenticate: Bearer The key is missing, mistyped, revoked or expired. Check the header is exactly Authorization: Bearer dak1.….
The client asks you to sign in (OAuth) That client only supports OAuth connectors. Use one that sends headers (see clients).
An empty tool list The business's plan does not include API access, or ?modules= names no real module.
A tool you expected is missing The key's scope is too low (a read key has no create tools), or the plan lacks that feature. The catalogue shows what each tool needs.
The agent gets slow or picks the wrong tool Too many tools. Narrow them with ?modules= or allowed_tools.
A result with isError: true The API refused the call. The text has the error type and message, and a request_id to quote to support. See errors.
rate_limited The key made too many calls. Agents retry on their own after the wait in the message; see rate limits.

Platform keys (super admins)

The platform's super admins can create dap1… platform keys under Super Admin → API & MCP. One key reaches every business: each tool then takes a required business_id. It also gets the platform_* tools for businesses, users, plans, SaaS billing, settings and operations. These keys can be read-only, can expire, and can be locked to IP addresses. They stop working the moment their owner is no longer a super admin. See Platform API.