Token导航 LogoToken导航TokenDH.com
The Splitwise MCP logo
AI代理stdio官方级别未说明来源级核验

The Splitwise MCP

MCP Server

一个基于模型上下文协议(MCP)的服务器,用于通过自然语言和语音支持管理Splitwise费用。

工具数

7

提示词数

0

GitHub Stars

4

资源数

0
PythonClaude自然语言处理Claude DesktopClaudeCursorCline

安装说明

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

作者 / 组织

hubshashwat

提供方

hubshashwat

最后核验

2026/5/17 20:22

快速接入

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

命令预览

pip install splitwise-mcp

详细介绍

拆分MCP服务器

![MCP](https://modelcontextprotocol.io) ![PyPI](https://pypi.org/project/splitwise-mcp/)

一种集成了以下功能的模型上下文协议(MCP)服务器 分行.连接您的人工智能助手(Claude、Cursor等),使用自然语言管理Splitwise的费用,并提供语音支持!

运作原理

flowchart LR
    Client[Claude / Cursor] -->|MCP| Server[splitwise-mcp]
    Server -->|audio| Deepgram[Deepgram STT]
    Deepgram -->|text| Gemini[Gemini 3 Flash]
    Gemini -->|action| Splitwise[Splitwise API]

特性

工具说明
voice_command发送音频→ Deepgram转录→ 双子进程→ 执行拆分
text_command发送文本→ 双子进程→ 执行拆分
add_expense添加费用,支持团体、百分比、除外责任和特定付款人
delete_expense按ID删除费用
list_friends列出您的Splitwise好友
configure_splitwise配置API凭据
login_with_token使用OAuth2令牌登录

智能名称匹配:如果Deepgram转录了“Humeet”,但你的朋友是“Sumeet”的话,双子座会要求你澄清,而不是猜测。

高级拆分

  • 百分比:“我分得40%,爱丽丝分得60%”
  • 群组:“添加到公寓组”(自动获取成员)
  • 除外条款:“添加到公寓,但排除Bob”
  • 支付方:“爱丽丝付了50美元”
  • 删除:“删除费用12345”

安装

选项1:从PyPI安装(推荐)

pip install splitwise-mcp

选项2:从源代码安装

  1. 克隆存储库:
   git clone https://github.com/hubshashwat/the-splitwise-mcp.git
   cd the-splitwise-mcp
  1. 创建并激活虚拟环境:
   python3 -m venv .venv
   source .venv/bin/activate
  1. 安装软件包:
   pip install -e .

配置

您需要API密钥,具体取决于您想要的功能:

必需(核心拼接功能)

  1. 拆分API键 (https://secure.splitwise.com/apps/new)

- 注册新应用程序 - 获取:消费者密钥、消费者秘密和API密钥 - 要求……: add_expense, list_friends, delete_expense

可选(AI功能)

  1. Gemini API密钥 (https://aistudio.google.com/) - *可选的*

- 创建API密钥(可用的免费层) - 模型:使用Gemini 3.0 Flash-确保您的API密钥可以访问此模型 - 要求……: text_command (自然语言处理)

  1. Deegram API密钥 (https://console.deepgram.com/) - *可选的*

- 注册并获取API密钥(提供免费层) - 要求……: voice_command (音频转录)

摘要:

  • 纯文本用户:需要Splitwise+Gemini密钥(跳过Deepgram)
  • 语音用户:需要全部5把钥匙
  • API基本用户:只需要3个拼接键

设置环境变量 在您的shell中或添加到您的Claude Desktop配置中(见下文)。

用法

您可以在中使用此服务器 两种方式:

选项A:独立终端代理(不需要Claude!)🖥️

直接在终端中运行语音/文本代理:

# Install the package
pip install splitwise-mcp

# Download the agent script
curl -O https://raw.githubusercontent.com/hubshashwat/the-splitwise-mcp/main/run_agent.py

# Set environment variables
export SPLITWISE_CONSUMER_KEY="your_key"
export SPLITWISE_CONSUMER_SECRET="your_secret"  
export SPLITWISE_API_KEY="your_api_key"
export GEMINI_API_KEY="your_gemini_key"
export DEEPGRAM_API_KEY="your_deepgram_key"

# Run the agent
python run_agent.py

命令:

  • vvoice -录制10秒的音频并对其进行处理
  • ttext -键入命令
  • qquit -退出

示例会话:

🤖 Splitwise Voice Agent
Enter command (voice/text/quit): t
Enter request: Add expense of $50 with John for dinner

⚠️  Proposed Action:
   Function: add_expense
   Args: {
     "description": "dinner",
     "cost": 50.0,
     "split_with": ["John"]
   }

Proceed? (yes/edit/cancel): yes
✅ Expense added!

选项B:使用MCP客户端💬

此服务器使用 stdio传输 并与 所有MCP兼容客户端:

克劳德桌面

添加到您的配置中:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "splitwise": {
      "command": "full path of python",
      "args": ["-m", "splitwise_mcp.server"],
      "env": {
        "SPLITWISE_CONSUMER_KEY": "your_consumer_key",
        "SPLITWISE_CONSUMER_SECRET": "your_consumer_secret",
        "SPLITWISE_API_KEY": "your_api_key",
        "GEMINI_API_KEY": "your_gemini_key",
        "DEEPGRAM_API_KEY": "your_deepgram_key"
      }
    }
  }
}
备注:如果 splitwise-mcp 控制台命令可用,您可以使用 "command": "splitwise-mcp" 没有args。

然后在克劳德: *“加上与约翰共进晚餐的费用50美元”*

Claude CLI

使用相同的配置格式 claude-cli --mcp-config.

游标/VS代码(反重力、Cline、Continue.dev)

添加到MCP设置(.vscode/settings.json 或光标设置):

{
  "mcp.servers": {
    "splitwise": {
      "command": "full path of python",
      "args": ["-m", "splitwise_mcp.server"],
      "env": {
        "SPLITWISE_CONSUMER_KEY": "your_consumer_key",
        "SPLITWISE_CONSUMER_SECRET": "your_consumer_secret",
        "SPLITWISE_API_KEY": "your_api_key",
        "GEMINI_API_KEY": "your_gemini_key",
        "DEEPGRAM_API_KEY": "your_deepgram_key"
      }
    }
  }
}

然后你可以问你的AI助手: *“使用Splitwise添加费用…”*

其他MCP客户端

此服务器与支持stdio传输的任何MCP客户端兼容。使用相同的配置模式。

______________________________________________________________________

备注:如果从源代码而不是pip安装,请使用可执行文件的完整路径:

  • macOS/Linux: "/path/to/the-splitwise-mcp/.venv/bin/splitwise-mcp"
  • 视窗: "C:\\path\\to\\the-splitwise-mcp\\.venv\\Scripts\\splitwise-mcp.exe"

远程访问(SSE)

要通过HTTP为远程客户端运行MCP服务器,请执行以下操作:

.venv/bin/uvicorn splitwise_mcp.sse:app --host 0.0.0.0 --port 8000

连接方式: http://YOUR_IP:8000/sse

发展

运行测试:

.venv/bin/python tests/test_logic.py

故障排除

麦克风问题(macOS)

如果代理立即说“录制完成”,但没有捕获到音频(音量:0.0),则您的终端可能缺乏麦克风权限。

  1. 首选 系统设置>隐私和安全>麦克风.
  2. 允许访问您的终端应用程序(终端、iTerm、VS代码等)。
  3. 重新启动终端 以使更改生效。

许可证

麻省理工学院

目录标签

目录标签

PythonClaude自然语言处理费用管理本地部署语音控制Splitwise集成AI助手

支持客户端

Claude DesktopClaudeCursorCline

接入字段

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

stdio

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

none

工具数量(toolCount,工具数)

7

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP