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
| URL | https://app.diary.tools/api/mcp |
| Transport | Streamable HTTP |
| Server name | diary-tools |
Authenticate with a Bearer token in the Authorization header.
Authentication
There are two common ways to authenticate:
- 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. - 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 examplepersonal)contactId— the contact slug (for examplejane-smith)
Available tools
| Tool | What it does |
|---|---|
list_contacts | List all contacts in a project |
search_contacts | Fuzzy search by name, company, job title, or email |
get_contact | Fetch one contact by id |
update_contact | Patch contact fields (CRM and OSINT). Use "REMOVE" or null to clear optional fields; name and email cannot be cleared |
send_email | Create 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:
| URI | Purpose |
|---|---|
skill://diary-tools | When and how to use the tools |
skill://diary-tools/server-guide | Auth, setup, IDs, and permissions |
Tips
- Prefer
search_contactsbefore guessing ids. send_emailrequires 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.