MCP Server

Diary Tools exposes an MCP server so AI agents can list, search, and update contacts, and create Gmail drafts — without building custom API clients.

Endpoint

URLhttps://app.diary.tools/api/mcp
TransportStreamable HTTP
Server namediary-tools

Authenticate with a Bearer token in the Authorization header.

Authentication

There are two common ways to authenticate:

  1. Agent API keys — create a long-lived key (agt_live_…) in the portal under Subscription → Agents / API keys. Best for OpenClaw and other automation hosts.
  2. Human OAuth — Cognito OAuth (PKCE) for interactive clients such as Claude or MCP Inspector. Use the access JWT as the Bearer token.

Agent keys support presets such as Read Only, User (default for automation), and Admin.

Example config

Portal Integrations → MCP shows a ready-made snippet. A typical OpenClaw-style config looks like:

{
  "mcp": {
    "servers": {
      "diary-tools": {
        "url": "https://app.diary.tools/api/mcp",
        "transport": "streamable-http",
        "headers": {
          "Authorization": "Bearer agt_live_…"
        }
      }
    }
  }
}

Replace the token with your agent key. Never commit live keys to source control.

IDs

Most tools take:

  • projectId — the project slug (for example personal)
  • contactId — the contact slug (for example jane-smith)

Available tools

ToolWhat it does
list_contactsList all contacts in a project
search_contactsFuzzy search by name, company, job title, or email
get_contactFetch one contact by id
update_contactPatch contact fields (CRM and OSINT). Use "REMOVE" or null to clear optional fields; name and email cannot be cleared
send_emailCreate a Gmail draft to a contact by id (not a raw address). Markdown body is formatted, not rewritten. Optional replyToLatestThread replies in the latest thread. Returns a Gmail deep link — it does not auto-send

Resources

The server also publishes MCP resources agents can read:

URIPurpose
skill://diary-toolsWhen and how to use the tools
skill://diary-tools/server-guideAuth, setup, IDs, and permissions

Tips

  • Prefer search_contacts before guessing ids.
  • send_email requires Gmail connected on that project — see Connecting Gmail.
  • Agents can read OSINT fields via get_contact / update_contact; there is no separate OSINT MCP tool.