YNAB Budget Assistant
STDIOMCP server providing tools for interacting with YNAB budgets.
MCP server providing tools for interacting with YNAB budgets.
A Model Context Protocol (MCP) server built with mcp-framework. This MCP provides tools for interacting with your YNAB budgets setup at https://ynab.com
In order to have an AI interact with this tool, you will need to get your Personal Access Token from YNAB: https://api.ynab.com/#personal-access-tokens. When adding this MCP server to any client, you will need to provide your personal access token as YNAB_API_TOKEN. This token is never directly sent to the LLM. It is stored privately in an environment variable for use with the YNAB api.
Specify env variables:
The goal of the project is to be able to interact with my YNAB budget via an AI conversation. There are a few primary workflows I want to enable:
Available tools:
Add a transaction to my Ally account for $3.98 I spent at REI today
approve the transaction for $6.95 on the Apple Card
Next:
# Install dependencies npm install # Build the project npm run build
ynab-mcp-server/
├── src/
│ ├── tools/ # MCP Tools
│ └── index.ts # Server entry point
├── .cursor/
│ └── rules/ # Cursor AI rules for code generation
├── package.json
└── tsconfig.json
The YNAB sdk describes the available api endpoints: https://github.com/ynab/ynab-sdk-js.
YNAB open api specification is here: https://api.ynab.com/papi/open_api_spec.yaml. This can be used to prompt an AI to generate a new tool. Example prompt for Cursor Agent:
create a new tool based on the readme and this openapi doc: https://api.ynab.com/papi/open_api_spec.yaml
The new tool should get the details for a single budget
You can add more tools using the CLI:
# Add a new tool mcp add tool my-tool # Example tools you might create: mcp add tool data-processor mcp add tool api-client mcp add tool file-handler
Example tool structure:
import { MCPTool } from "mcp-framework"; import { z } from "zod"; interface MyToolInput { message: string; } class MyTool extends MCPTool<MyToolInput> { name = "my_tool"; description = "Describes what your tool does"; schema = { message: { type: z.string(), description: "Description of this input parameter", }, }; async execute(input: MyToolInput) { // Your tool logic here return `Processed: ${input.message}`; } } export default MyTool;
Update your package.json:
name
is unique and follows npm naming conventionsversion
description
, author
, license
, etc.bin
points to the correct entry fileBuild and test locally:
npm run build npm link ynab-mcp-server # Test your CLI locally
Login to npm (create account if necessary):
npm login
Publish your package:
npm publish
After publishing, users can add it to their claude desktop client (read below) or run it with npx
To install YNAB Budget Assistant for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @calebl/ynab-mcp-server --client claude
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "ynab-mcp-server": { "command": "node", "args":["/absolute/path/to/ynab-mcp-server/dist/index.js"] } } }
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "ynab-mcp-server": { "command": "npx", "args": ["ynab-mcp-server"] } } }
Check https://modelcontextprotocol.io/clients for other available clients.
npm run build
to compile