ynab-mcp-server logo

ynab-mcp-server

Community
calebl

Model Context Protocol for YNAB (you need a budget)

Publishercalebl
Repositoryynab-mcp-server
LanguageTypeScript
Forks
44
Stars
111
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    ynab-mcp-server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    111 stars and 44 forks from the linked repository.

MseeP.ai Security Assessment Badge

ynab-mcp-server

smithery badge

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.

Setup

Specify env variables:

  • YNAB_API_TOKEN (required)
  • YNAB_BUDGET_ID (optional)

Goal

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:

Workflows:

First time setup

  • be prompted to select your budget from your available budgets. If you try to use another tool first, this prompt should happen asking you to set your default budget.
    • Tools needed: ListBudgets

Manage overspent categories

Adding new transactions

Approving transactions

Check total monthly spending vs total income

Auto-distribute ready to assign funds based on category targets

Current state

Available tools:

  • ListBudgets - lists available budgets on your account
  • BudgetSummary - provides a summary of categories that are underfunded and accounts that are low
  • GetUnapprovedTransactions - retrieve all unapproved transactions
  • CreateTransaction - creates a transaction for a specified budget and account.
    • example prompt: Add a transaction to my Ally account for $3.98 I spent at REI today
    • requires GetBudget to be called first so we know the account id
  • ApproveTransaction - approves an existing transaction in your YNAB budget
    • requires a transaction ID to approve
    • can be used in conjunction with GetUnapprovedTransactions to approve pending transactions
    • After calling get unapproved transactions, prompt: approve the transaction for $6.95 on the Apple Card

Next:

  • be able to approve multiple transactions with 1 call
  • updateCategory tool - or updateTransaction more general tool if I can get optional parameters to work correctly with zod & mcp framework
  • move off of mcp framework to use the model context protocol sdk directly?

Quick Start

bash
# Install dependencies
npm install

# Build the project
npm run build

Project Structure

ynab-mcp-server/
├── src/
│   ├── tools/        # MCP Tools
│   └── index.ts      # Server entry point
├── .cursor/
│   └── rules/        # Cursor AI rules for code generation
├── package.json
└── tsconfig.json

Adding Components

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:

bash
# 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

Tool Development

Example tool structure:

typescript
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;

Publishing to npm

  1. Update your package.json:

    • Ensure name is unique and follows npm naming conventions
    • Set appropriate version
    • Add description, author, license, etc.
    • Check bin points to the correct entry file
  2. Build and test locally:

    bash
    npm run build
    npm link
    ynab-mcp-server  # Test your CLI locally
  3. Login to npm (create account if necessary):

    bash
    npm login
  4. Publish your package:

    bash
    npm publish

After publishing, users can add it to their claude desktop client (read below) or run it with npx

Using with Claude Desktop

Installing via Smithery

To install YNAB Budget Assistant for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @calebl/ynab-mcp-server --client claude

Local Development

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

json
{
  "mcpServers": {
    "ynab-mcp-server": {
      "command": "node",
      "args":["/absolute/path/to/ynab-mcp-server/dist/index.js"]
    }
  }
}

After Publishing

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

json
{
  "mcpServers": {
    "ynab-mcp-server": {
      "command": "npx",
      "args": ["ynab-mcp-server"]
    }
  }
}

Other MCP Clients

Check https://modelcontextprotocol.io/clients for other available clients.

Building and Testing

  1. Make changes to your tools
  2. Run npm run build to compile
  3. The server will automatically load your tools on startup

Learn More

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "calebl-ynab-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ynab-mcp-server"
      ]
    }
  }
}

Use ynab-mcp-server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ynab-mcp-server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ynab-mcp-server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ynab-mcp-server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "calebl-ynab-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ynab-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ynab-mcp-server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ynab-mcp-server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ynab-mcp-server to help me with this task?
ynab-mcp-server
Sure. I read it.
Here is what I found using ynab-mcp-server.

Frequently asked questions

What is the ynab-mcp-server MCP server used for?

ynab-mcp-server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ynab-mcp-server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ynab-mcp-server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ynab-mcp-server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ynab-mcp-server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ynab-mcp-server MCP to TypingMind?

ynab-mcp-server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ynab-mcp-server MCP provide in TypingMind?

ynab-mcp-server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ynab-mcp-server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ynab-mcp-server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇