金融计划协议服务器

Lever MCP服务器是一个用于连接Claude到用户金融计划的模型上下文协议服务器,支持通过URL令牌进行金融计划的管理和更新。

  • by marksoulier
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 marksoulier/lever-mcp

使用说明

杠杆MCP服务器

MCP(模型上下文协议)服务器 杠杆 --财务规划应用程序。通过服务器URL中的令牌将Claude连接到用户的财务计划。

先决条件

  • Node.js 20+
  • 基于Lever模式的Supabase项目
  • cloudflared 已安装(见下文)

设置

1.克隆并安装

git clone <repo-url>
cd lever-mcp
npm install

2.配置环境

cp .env.example .env

编辑 .env 并填写您的值:

SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key-here
PORT=3000

使用 匿名/公开 来自Supabase的键(设置→ API),而不是service_role密钥。

3.安装cloudflared

curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 \
  -o ~/cloudflared && chmod +x ~/cloudflared

要使其在系统范围内可用,请执行以下操作: sudo mv ~/cloudflared /usr/local/bin/cloudflared 如果你只是把它移到 ~/cloudflared,更新 tunnel 脚本在 package.json 使用 ~/cloudflared 而不是 cloudflared.

跑步

在项目目录中打开两个终端。

终端1——启动MCP服务器:

npm start

终端2——启动Cloudflare隧道:

npm run tunnel

隧道输出将包括一个公共URL,如:

https://some-words-here.trycloudflare.com

每次重新启动隧道时,此URL都会更改。对于永久URL,请设置 命名为Cloudflare隧道 拥有一个免费的Cloudflare帐户。

连接到克劳德

两者都运行后,使用您的隧道URL和用户的UUID令牌将MCP服务器添加到Claude:

https://some-words-here.trycloudflare.com/mcp?token=<user-uuid>

令牌是用户的 id 从任一 anonymous_users 或 auth.users Supabase的桌子。

在Claude.ai中 (设置→ 连接器→ Add):

  • 类型:远程MCP
  • URL:上面带有您的令牌的完整URL

可用工具

工具 说明
get_plan 获取用户最近的财务计划
get_event_schema 列出支持的事件类型或返回特定类型的参数规范
update_plan 添加、删除或更新用户计划中的事件

update_plan操作

op: "add_event"     — add a new event (use get_event_schema first to get parameter spec)
op: "remove_event"  — remove an event by its id
op: "update_field"  — change a single parameter value on an existing event