AI and MCP

How to connect Dify to SpendixAI with MCP

Add SpendixAI as an MCP server in Dify, use dynamic client registration to sign in, and attach read-only tools to agents and workflows. Setup caveats included.

Editorial illustration for How to connect Dify to SpendixAI with MCP

Why bring SpendixAI into Dify

Dify lets you build chat apps, agents and workflows, and it can import tools from an MCP server. If you keep your spending in SpendixAI, adding it as a server means an agent you build can answer from those records instead of guessing. This guide covers the connection and the choices that keep it safe.

A note on who we are

SpendixAI is the expense tracker we make for people in India. It works from statements you upload and expenses you type in, with no bank connection and no SMS reading. We checked the Dify steps against the vendor's documentation in November 2026.

Adding the server

  1. In SpendixAI go to Developer → MCP connections and copy the server address.
  2. In Dify open Integrations → Tools and select the MCP tab.
  3. Add a server and enter <your SpendixAI server address> as its URL.
  4. Name it, for example spendixai, and choose a short, unique server identifier.
  5. Leave dynamic client registration switched on and authorize.
  6. On the SpendixAI consent screen sign in, choose your workspace and select Read only.
  7. Wait for Dify to import the tools, then attach them to an app.

Pick the identifier with care. Changing it later breaks any app that refers to the old one.

Where the tools can be used

  • As a Tool node inside a Workflow or Chatflow app.
  • As part of an Agent node in those same app types.
  • In a standalone Agent app.

Requirements and unknowns side by side

ItemNotes
TransportDify's documentation names HTTP only
Sign-inOAuth with dynamic client registration, on by default
Static token optionCustom headers exist, but SpendixAI does not use them
Identifier limitsA Japanese page gives 24 characters of lowercase letters, digits, underscore and hyphen; we could not confirm this in English
Plan or versionNot stated in the documentation we read
Approval stepNot described

Treat agents as unattended

The documentation does not describe a prompt before a tool call, so an app or agent calls its tools by itself. That makes the preset you choose on the SpendixAI consent screen your main control. Read only allows viewing transactions and reports. Read and add also allows creating transactions and uploading documents. Full access goes further, to categorisation rules and insights. Start with the first and move up only for a reason you can name.

You also control which tools an app can reach, simply by choosing what to attach. An agent that only needs spending summaries does not need anything that writes.

First questions to test with

Try asking the app what you spent on food last month compared with the month before, then which merchants you paid most often this quarter, then for your recurring charges and the yearly cost of each. If the answers look odd, open the matching report in SpendixAI and compare. The reply is written by the model your Dify app uses, under its provider's terms, and tax-related figures should go to a chartered accountant.

Choosing a good server description

Take a moment over the name and identifier you give the server. They are what you and your teammates will see when you attach tools to an app, so something plain and specific, such as spendixai, beats a vague label. If more than one person builds in the same Dify workspace, agree on the identifier first, because it cannot be changed without breaking the apps that use it.

It is also sensible to build a small test app before a real one. Attach the SpendixAI tools, ask one question, and read the answer next to the report in SpendixAI. Once you trust the connection, copy the pattern into the apps you actually care about.

Changing your mind

To stop an app reading your records, disconnect it from Developer → MCP connections in SpendixAI. If the Dify screens differ from this description, for example in the wording of the add button, follow Dify's current guide.

SPENDIXAI JOURNAL

Useful ideas start with a clearer picture of your own spending.

Explore your reports