Token导航 LogoToken导航TokenDH.com
Lunchmoney App logo
开发工具未说明官方级别未说明来源级核验

Lunchmoney App

MCP Server

提供CLI和MCP服务器接口,用于管理Lunch Money个人财务API的交易、类别、账户等操作。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
Ruby命令行工具ClaudeAPI集成Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ajaya

提供方

ajaya

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

午餐钱红宝石

MCP服务器和CLI 午餐费 个人理财API。

  • 命令行界面 --用于管理交易、类别、帐户等的人性化Thor命令
  • MCP服务器 --展示与相同的操作 模型上下文协议 与AI助手一起使用的工具

两个接口共享一个共同的后端,因此每个操作都可以在两种模式下使用。

需求

安装

git clone https://github.com/ajaya/lunchmoney-ruby.git
cd lunchmoney-ruby

安装Ruby

安装Ruby 3.4.8 房车:

brew install rv
rv install 3.4.8
ruby -v                  # verify
bundle install

配置

cp .env .env.local
# Edit .env.local and set LUNCHMONEY_API_TOKEN

或者通过CLI进行身份验证:

bundle exec ruby bin/lunchmoney login 

环境变量

变量默认值描述
LUNCHMONEY_API_TOKEN-API访问令牌(必需)
LUNCHMONEY_CACHE_DB_PATH~/.config/lunchmoney/cache.sqlite3SQLite缓存位置
LUNCHMONEY_LOG_LEVELdebug, info, warn, error, fatal
LUNCHMONEY_LOG_OUTPUTstderrstderr, stdout,或绝对文件路径

CLI使用情况

为方便起见设置别名:

alias lunchmoney='rv run --ruby 3.4.8 ruby /path/to/lunchmoney-ruby/bin/lunchmoney'
# Help
lunchmoney help                        # list all commands
lunchmoney tree                        # show full command tree
lunchmoney transactions help list      # show all parameters for a subcommand

# Examples
lunchmoney transactions list           # last 30 days of transactions
lunchmoney transactions show 123       # single transaction
lunchmoney categories list
lunchmoney plaid_accounts list
lunchmoney user me

# JSON output (useful for scripting / AI agents)
lunchmoney transactions list --json

# Resolve foreign key IDs to full objects (requires --json)
lunchmoney transactions list --json --resolve

没有 --resolve,事务包含裸ID,如 "category_id": 42.与 --resolve,这些扩展为完整对象("category": { "id": 42, "name": "Groceries", ... }).

命令

命令描述
help [COMMAND]描述可用命令
tree打印所有可用命令的树
login TOKEN节省您的午餐钱API代币
logout删除已保存的API令牌
交易
transactions list列出交易记录
transactions show ID显示单个交易
transactions create从JSON创建事务(stdin或 --data)
transactions update ID更新交易
transactions update_bulk从JSON批量更新事务(stdin或 --data)
transactions delete ID删除交易
transactions delete_bulk ID1 ID2 ...删除多个交易记录
transactions split ID拆分交易(stdin或 --data)
transactions unsplit ID取消交易拆分
transactions group组交易(stdin或 --data)
transactions ungroup ID取消交易组分组
分类
categories list列出类别
categories show ID显示单个类别
categories create --name=NAME创建类别
categories update ID更新类别
categories delete ID删除类别
格子帐
plaid_accounts list列出所有与Plaid关联的帐户
plaid_accounts show ID显示单个Plaid帐户
plaid_accounts fetch触发Plaid数据同步
手工账目
manual_accounts list列出所有手动管理的帐户
manual_accounts show ID显示单个手动帐户
manual_accounts create创建新的手动帐户
manual_accounts update ID更新手动帐户
manual_accounts delete ID删除手动帐户
循环项
recurring_items list列出所有重复项目
recurring_items show ID显示单个重复项目
标签
tags list列出所有标签
tags show ID显示单个标签
tags create --name=NAME创建新标签
tags update ID更新标签
tags delete ID删除标签
总结
summary budget获取日期范围的预算摘要
用户
user me显示当前经过身份验证的用户
服务器
server start启动MCP服务器(通过stdio的JSON-RPC)
server config打印Claude的MCP配置片段

MCP服务器

通过stdio启动服务器:

bundle exec ruby bin/lunchmoney server

# Or with rv:
rv run --ruby 3.4.8 ruby bin/lunchmoney server

克劳德代码/克劳德桌面

生成一个带有解析路径和当前令牌的可粘贴配置片段:

bundle exec ruby bin/lunchmoney server config --claude

# Or with rv:
rv run --ruby 3.4.8 ruby bin/lunchmoney server config --claude

这将输出Claude Code、Claude Desktop和Docker的JSON块。将相关片段复制到:

  • 克劳德代码.mcp.json 在项目根目录中,或 ~/.claude/settings.json 全球访问
  • 克劳德桌面claude_desktop_config.json

如果您更喜欢手动配置,这里有一个最小的示例:

{
  "mcpServers": {
    "lunchmoney": {
      "command": "/opt/homebrew/bin/rv",
      "args": [
        "run",
        "--ruby",
        "3.4.8",
        "ruby",
        "/path/to/lunchmoney-ruby/bin/lunchmoney",
        "server"
      ],
      "cwd": "/path/to/lunchmoney-ruby",
      "env": {
        "LUNCHMONEY_API_TOKEN": "your_token_here"
      }
    }
  }
}

调整 commandargs 对于你的Ruby版本管理器。这 server config --claude 命令检测您的本地设置并生成正确的路径。

发展

bundle exec rake test                # Run all tests
bundle exec ruby -Ilib -Itest test/tools/transactions_test.rb  # Single test file

建筑

CLI (Thor)  ─┐
             ├──▶  Api::* (shared backend)  ──▶  lunchmoney-sdk-ruby  ──▶  Lunch Money API
MCP server  ─┘

中的共享后端 lib/lunchmoney_app/api/ 包含所有业务逻辑。MCP工具处理程序(lib/lunchmoney_app/tools/)和CLI命令(lib/lunchmoney_app/cli/)是委托给他人的薄包装 Api::* 班级。

许可证

麻省理工学院

目录标签

目录标签

Ruby命令行工具ClaudeAPI集成本地部署个人财务API工具CLIMCP服务器

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP