Ramp MCP Server
官方與 Ramp 的開發者 API 互動,對您的支出進行分析,並利用大型語言模型獲取洞察。
文件
ramp-mcp:Ramp MCP 伺服器
概述
一個模型上下文協定伺服器,用於透過開發者 API 為 Ramp 擷取和分析資料或執行任務。為了克服權杖和輸入大小的限制,此伺服器實作了一個簡單的 ETL 管線加上記憶體中的暫存 sqlite 資料庫,供 LLM 進行分析。預設所有請求都發送到示範環境,但可以透過設定 RAMP_ENV=prd 來變更。由於 API 和/或您的 MCP 用戶端限制,大型資料集可能無法處理。
工具
資料庫工具
可用於在記憶體中設定、處理、查詢和刪除暫存資料庫的工具。
process_dataexecute_queryclear_table
擷取工具
可直接用於擷取資料的工具
get_ramp_categoriesget_currencies
載入工具
將資料載入伺服器,供用戶端擷取。根據您想使用的工具,請確保在您的 Ramp 用戶端上啟用這些範圍,並在啟動伺服器時將範圍作為 CLI 引數包含在內。
| 工具 | 範圍 |
|---|---|
| load_transactions | transactions:read |
| load_reimbursements | reimbursements:read |
| load_bills | bills:read |
| load_locations | locations:read |
| load_departments | departments:read |
| load_bank_accounts | bank_accounts:read |
| load_vendors | vendors:read |
| load_vendor_bank_accounts | vendors:read |
| load_entities | entities:read |
| load_spend_limits | limits:read |
| load_spend_programs | spend_programs:read |
| load_users | users:read |
對於大型資料集,建議明確提示 Claude 不要使用 REPL,並保持回應簡潔,以避免逾時或過度使用權杖。
設定
Ramp 設定
- 從 Ramp 開發者頁面建立一個新的用戶端(右上角個人資料 > Developer > Create app)
- 根據您想使用的工具,將所需範圍授予用戶端,並啟用用戶端憑證(點擊 App > Grant Types / Scopes)
- 在設定檔中包含用戶端 ID 和密鑰,以及您想使用的範圍
本地設定
- 透過
git clone [email protected]:ramp/ramp-mcp.git或同等方式複製此 Github 儲存庫 - 安裝
uv
使用方式
從您的 CLI 使用以下指令執行 MCP 伺服器:
RAMP_CLIENT_ID=... RAMP_CLIENT_SECRET=... RAMP_ENV=<demo|prd> uv run ramp-mcp -s <COMMA-SEPARATED-SCOPES>
設定
與 Claude Desktop 搭配使用
將以下內容新增至您的 claude_desktop_config.json:
{
"mcpServers": {
"ramp-mcp": {
"command": "uv",
"args": [
"--directory",
"/<ABSOLUTE-PATH-TO>/ramp-mcp", // make sure to update this path
"run",
"ramp-mcp",
"-s",
"transactions:read,reimbursements:read"
],
"env": {
"RAMP_CLIENT_ID": "<CLIENT_ID>",
"RAMP_CLIENT_SECRET": "<CLIENT_SECRET>",
"RAMP_ENV": "<demo|qa|prd>"
}
}
}
}
如果此檔案尚不存在,請在 /<ABSOLUTE-PATH-TO>/Library/Application Support/Claude/ 中建立一個
授權
Copyright (c) 2025, Ramp Business Corporation 保留所有權利。 此原始碼根據位於此原始碼樹根目錄中 LICENSE 檔案內的 MIT 授權條款授權。