Skip to content

MCP Server

The Ogarni.AI MCP server is a Model Context Protocol server that lets LLMs like Claude interact with your personal finance data directly. Instead of manually copying data between the app and your AI assistant, the MCP server gives the model structured access to all read-only API endpoints as tools.

The server exposes 20 read-only tools that map to the Ogarni.AI API endpoints. When connected to an MCP-compatible client (Claude Code, Claude Desktop, Cursor, Windsurf, etc.), the LLM can call these tools to:

  • List and search your purchase documents (receipts, invoices)
  • Retrieve spending summaries by week, month, or custom date range
  • Browse categories, tags, and recurring expenses
  • Check notifications and group details
  • View inbound mailboxes, loyalty accounts, and bank statement support
  • Detect duplicate documents
ToolDescription
ogarniai_list_documentsList purchase documents with date and sort filters
ogarniai_get_documentGet full details of a single document
ogarniai_get_document_imageGet the scanned receipt image
ogarniai_get_document_duplicatesGet duplicate suggestions for a document
ogarniai_list_categoriesList expense/income categories
ogarniai_list_tagsList user-defined tags
ogarniai_get_latest_weekly_summaryGet the most recent weekly summary
ogarniai_list_weekly_summariesList weekly summaries with pagination
ogarniai_get_period_summaryGet summary for a custom date range
ogarniai_get_preset_summaryGet summary for a preset period
ogarniai_list_notificationsList notifications with filters
ogarniai_get_notificationGet a single notification
ogarniai_get_unread_countGet unread notification count
ogarniai_list_groupsList finance groups
ogarniai_get_groupGet group details
ogarniai_list_mailboxesList inbound email addresses
ogarniai_list_deduplication_suggestionsList duplicate document suggestions
ogarniai_list_loyalty_accountsList loyalty program connections
ogarniai_list_supported_banksList supported banks for statement import
ogarniai_get_profileGet user profile information

The server requires one environment variable and accepts an optional second:

VariableRequiredDefaultDescription
OGARNIAI_API_TOKENYesYour API token (with oai_ prefix)
OGARNIAI_API_URLNohttps://api.ogarni.aiAPI base URL

The MCP server is designed with security in mind:

  • Read-only. All 20 tools are strictly read-only. The server cannot modify, create, or delete any data.
  • Input validation. Every tool validates its inputs using Zod schemas before making API calls.
  • No token exposure. The API token is used only in outgoing HTTP headers and is never returned in tool responses.
  • Scoped access. The server only needs a read scope token — no write or admin permissions required.