• Pricing
  • FAQ
  • Guide
  • API Docs
Try the demo Loading demo...

MCP for AI Agents

Ask ChatGPT Ask Claude

Dollar Diary includes a remote Model Context Protocol server, so an AI agent can work directly with the same workspace data and operations available to API keys. It can inspect the API contract, read and change data, upload files, and run read-only SQL without scraping the web app.

Connect

With an editor role and an active workspace subscription, create a key from the API Keys page, then add https://www.dollardiary.com/mcp and the authorization header to any MCP client that supports Streamable HTTP and custom headers:

Authorization: Bearer <your-api-key>

Keep the key in your client’s secret or environment-variable store, never in a prompt or committed configuration file. Clients that support only OAuth authentication cannot connect with a Dollar Diary API key yet.

What an agent can do

The MCP server gives agents a compact set of tools for discovering and using the workspace API:

  • Search operations without loading the entire API contract into context.
  • Inspect an operation’s parameters, request body, required scope, and schemas.
  • Read transactions, tags, budgets, analytics, workspace configuration, and other API resources.
  • Create, update, and delete data when the connected key allows it.
  • Upload supported files and run read-only DuckDB SQL against the workspace.

For the complete operation and schema reference, see the API documentation or OpenAPI specification.

Access stays under your control

MCP uses the existing API permission model rather than creating a second path around it. Every call remains limited by the key’s workspace, stored scopes, owner grant, expiry, subscription gates, and rate limits. Removing the member who created a key, that member leaving the workspace, or that member deleting their account automatically revokes their active keys. Demotion to viewer does not revoke keys or remove stored scopes, but write permissions become dormant until the creator is an editor again. A workspace editor can revoke a key at any time. Activity is attributed to the same key and creator as a direct API request.

Start with a read-only key. Add CREATE, UPDATE, or DELETE only when you want the agent to make those changes, and revoke the key immediately if its client or secret store is compromised.

Read your first transactions

These are tool arguments, not raw HTTP requests. Your client handles MCP initialization and calls. Search the catalog, then inspect the selected operation before using it:

{"query":"listTransactions"}

Send that to search_api, then send this to describe_api:

{"operationId":"listTransactions","includeResponses":true}

describe_api returns input schemas and structured access requirements. Setting includeResponses: true also returns status codes, response headers, and response schemas. Search covers the Bearer-capable catalog; it does not filter results to your key’s permissions.

Call read_api:

{"operationId":"listTransactions","query":{"limit":2}}

The tool’s structuredContent is { operationId, status, ok, headers, data }. Its data is the original API response body, so transactions are in structuredContent.data.data and the cursor is in structuredContent.data.nextCursor. Pass a non-null cursor as query.cursor, retaining the same filters and sort. Stop when it is null.

For analytics, inspect getQueriesSchema and call it through read_api, then send your SQL as { "query": "SELECT COUNT(*) AS transaction_count FROM transactions" } to query_workspace. This counts rows, not total spend. Use the discovered schema for financial queries.

The optional search access filter uses HTTP methods: read means GET, and write means non-GET, including read-only POSTs such as SQL and dashboard drilldown. Omit it when searching for analytics. read_api calls GET; write_api calls POST, PUT, PATCH, or DELETE even when the operation is read-only. The operation’s access requirements determine permissions.

Make and retry changes

Inspect getTagById and updateTag. Read the tag before editing it. With UPDATE scope, call write_api using your actual tag ID and the read response’s resource-version header (or the tag’s updatedAt):

{
  "operationId":"updateTag",
  "pathParams":{"id":"<your-tag-id>"},
  "request":{"type":"json","value":{"name":"Dining out"}},
  "resourceVersion":"<updatedAt-from-your-read>",
  "idempotencyKey":"<new-unique-key>"
}

The angle-bracket values above are placeholders. Replace them before calling; idempotency keys accept only letters, digits, underscores, and hyphens. Reuse the exact arguments and key for a transport retry of the same operation. JSON property order still matters. MCP encodes identical multipart inputs deterministically, so the same upload arguments can also be retried with the same key. Replay lasts 24 hours from the original claim; reconcile before retrying older writes. Some operations do not replay; inspect their documented headers first.

On API errors, isError is true and structuredContent.data contains Problem Details; branch on its code. On a 412, read again and review the competing edit before submitting a new mutation. On TOO_MANY_REQUESTS, honor headers["retry-after"] with backoff. Quota errors require the operation-specific remedy. Gateway/input errors instead return structuredContent.error with type and message; protocol errors can occur before a tool runs.

Safe response headers include resource-version, idempotent-replayed, ratelimit, ratelimit-policy, legacy rate fields, retry-after, and x-request-id when present. A 204 result has data: null. Text responses are strings; binary responses use { encoding: "base64", mimeType, data } inside the tool’s data.

Files and transfer limits

Multipart write_api calls use request.type: "multipart", optional text fields, and a file with fieldName, filename, mimeType, and dataBase64. Use the upload operation’s exact field names and MIME types. Uploading a custom-field file only stages it; attach the returned pointer through setTransactionCustomFieldValues promptly, preserving existing active values.

MCP request bodies are capped at 14,000,000 bytes, including JSON and base64 overhead. Individual operations have additional limits. MCP response bodies are capped at 10,000,000 bytes before binary base64 encoding; clients can impose smaller context or transfer limits.

Exports can exceed that response cap. Use MCP to start and poll the job, then download larger artifacts directly through the authenticated REST download endpoint using the same key, from a backend client. Do not put the key in the URL or assume the returned download URL is public. See the compact integration guide for REST conventions and task navigation.

© 2026 Dollar Diary. All rights reserved. Based in California.

Product

DemoFeaturesPricingFAQGuideMCP OverviewAPI Docs

Learn

Discretion levelsThe power of tagsCustomize your tagsPersonal finance with SQLShared spending

Meta

Brand Assetssecurity.txtrobots.txtllms.txtopenapi.yamlsitemap.xml

Legal

Privacy PolicyTerms of ServiceSubprocessors
Icons by Tabler Merchant logos partially fetched via logo.dev Discretion animations by hammadh (CC BY 4.0) UI primitives via shadcn-svelte, thanks to Hunter Johnston
For questions, please reach out via support@dollardiary.com