Skip to main content
Glama
gtorreal
by gtorreal

buda-mcp

npm version License: MIT Node.js >=18

Buda.com 的 MCP 服务器——智利、哥伦比亚和秘鲁领先的加密货币交易所。为任何兼容 MCP 的 AI 助手提供市场数据、订单簿、交易历史、点差、技术指标和价格模拟的实时访问权限——无需账户或 API 密钥。


快速开始

npx @guiie/buda-mcp

或者永久安装:

npm install -g @guiie/buda-mcp
buda-mcp

在您的 MCP 客户端中安装

Claude Code

claude mcp add buda-mcp -- npx -y @guiie/buda-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "buda-mcp": {
      "command": "npx",
      "args": ["-y", "@guiie/buda-mcp"]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "buda-mcp": {
      "command": "npx",
      "args": ["-y", "@guiie/buda-mcp"]
    }
  }
}

工具

所有工具均为公开——无需 API 密钥或账户。

get_market_summary ⭐ 从这里开始

一键式摘要:最新价格、买入/卖出价、点差百分比、24 小时交易量、价格变动以及 liquidity_ratinghigh / medium / low)。当用户询问任何特定市场时,这是首选工具。

参数

类型

必需

描述

market_id

string

市场 ID(例如 BTC-CLP)。


get_markets

列出 Buda.com 上的所有交易对,或获取特定市场的详细信息(手续费、最小订单大小、折扣等级)。

参数

类型

必需

描述

market_id

string

市场 ID(例如 BTC-CLP)。省略则列出所有市场。


get_ticker

当前快照:最新价格、最佳买入/卖出价、24 小时交易量以及 24 小时和 7 天的价格变动。

参数

类型

必需

描述

market_id

string

市场 ID(例如 BTC-CLP, ETH-COP)。


get_orderbook

当前订单簿:按 {price, amount} 对象排序的买单和卖单。

参数

类型

必需

描述

market_id

string

市场 ID。

limit

number

每侧的最大价格层级(默认:全部)。


get_trades

以类型化对象表示的近期交易历史:{timestamp_ms, amount, price, direction}

参数

类型

必需

描述

market_id

string

市场 ID。

limit

number

交易数量(默认 50,最大 100)。

timestamp

number

Unix 秒数——返回早于此时间的交易(分页)。


get_market_volume

按方向(买入 = 买单,卖出 = 卖单)计算的 24 小时和 7 天交易量。

参数

类型

必需

描述

market_id

string

市场 ID。


get_spread

买入/卖出点差:绝对值和占卖出价的百分比。

参数

类型

必需

描述

market_id

string

市场 ID。


compare_markets

给定基础货币在所有报价货币对中的并排行情数据。

参数

类型

必需

描述

base_currency

string

基础货币(例如 BTC, ETH)。


get_price_history

从原始交易历史聚合的 OHLCV K 线(Buda 没有原生的 K 线端点)。支持 5m, 15m, 30m, 1h, 4h, 1d 周期。

参数

类型

必需

描述

market_id

string

市场 ID。

period

string

5m / 15m / 30m / 1h / 4h / 1d(默认 1h)。

limit

number

聚合前获取的原始交易数(默认 100,最大 1000)。


get_arbitrage_opportunities

检测资产在 Buda 的 CLP、COP 和 PEN 市场之间的跨国价格差异,并归一化为 USDC。

参数

类型

必需

描述

base_currency

string

例如 BTC

threshold_pct

number

报告的最小差异(默认 0.5)。


simulate_order

使用实时行情数据模拟买入或卖出订单——不会实际下单。返回 estimated_fill_pricefee_amounttotal_costslippage_vs_mid_pct。所有响应都包含 simulation: true

参数

类型

必需

描述

market_id

string

市场 ID。

side

buy

sell

订单方向。

amount

number

以基础货币计的订单大小。

price

number

市价订单模拟请省略。


calculate_position_size

根据资本、风险百分比、入场价和止损价计算凯利公式风格的仓位大小。完全在客户端执行——无 API 调用。

参数

类型

必需

描述

market_id

string

市场 ID(用于上下文)。

capital

number

用于计算的总资本。

risk_pct

number

承担风险的资本百分比(0.1–10)。

entry_price

number

入场价格。

stop_loss_price

number

止损价格。


get_market_sentiment

综合情绪得分(-100 到 +100),由三个部分组成:24 小时价格变动 (40%)、交易量与 7 天平均值对比 (35%)、点差与市场类型基准对比 (25%)。返回 scorelabelcomponent_breakdowndisclaimer

参数

类型

必需

描述

market_id

string

市场 ID。


get_technical_indicators

RSI (14)、MACD (12/26/9)、布林带 (20, 2σ)、SMA 20、SMA 50——从 Buda 交易历史在服务器端计算(无外部库)。返回信号解读,如果 K 线少于 20 根,则返回结构化警告。包含 disclaimer

参数

类型

必需

描述

market_id

string

市场 ID。

period

string

1h / 4h / 1d(默认 1h)。

limit

number

获取的原始交易数(500–1000)。


get_real_quotation

返回给定订单金额和方向的实时报价,显示确切的成交价格、手续费和余额变化,而不下单。

参数

类型

必需

描述

market_id

string

市场 ID。

type

Bid

Ask

订单方向。

amount

number

以基础货币计的订单大小。

limit_price

number

限价报价的限价。


get_available_banks

列出给定货币所在国家/地区可用于法币存取款的银行。

参数

类型

必需

描述

currency

string

法币代码(例如 CLP, COP, PEN)。


MCP 资源

除了工具外,服务器还公开了客户端可以直接读取的 MCP 资源:

URI

描述

buda://markets

所有 Buda.com 市场的 JSON 列表

buda://ticker/{market}

特定市场的 JSON 行情(例如 buda://ticker/BTC-CLP

buda://summary/{market}

带有流动性评级的完整市场摘要(例如 buda://summary/BTC-CLP


覆盖的市场

报价

国家

示例对

CLP

智利

BTC-CLP, ETH-CLP, SOL-CLP

COP

哥伦比亚

BTC-COP, ETH-COP, SOL-COP

PEN

秘鲁

BTC-PEN, ETH-PEN

USDC

美元挂钩

BTC-USDC, USDT-USDC

BTC

交叉

ETH-BTC, LTC-BTC, BCH-BTC


从源码构建

git clone https://github.com/gtorreal/buda-mcp.git
cd buda-mcp
npm install
npm run build
node dist/index.js        # stdio (for MCP clients)
node dist/http.js         # HTTP on port 3000 (for Railway / hosted)

运行测试:

npm run test:unit        # 100 unit tests, no network required
npm run test:integration # live API tests (skips if unreachable)
npm test                 # both

HTTP / Railway 部署

dist/http.js 入口点运行一个 Express 服务器,包含:

  • POST /mcp — 可流式传输的 HTTP MCP 传输

  • GET /mcp — SSE 流式传输

  • GET /health — 健康检查 ({ status })

  • GET /.well-known/mcp/server-card.json — 兼容 Smithery 的静态工具清单

环境变量

变量

必需

描述

PORT

HTTP 监听端口(默认:3000

MCP_RATE_LIMIT

/mcp 上每个 IP 每分钟的最大请求数(默认:120

TRUST_PROXY_HOPS

X-Forwarded-For 信任的反向代理跳数(默认:1)。


安全性

服务器仅公开 Buda.com 的公共 API 端点。不接受或存储任何凭据。所有工具参数均应用输入验证以防止提示词注入。错误消息经过脱敏处理——内部详细信息(路径、上游错误)仅记录到 stderr,绝不会返回给调用者。

报告漏洞

请通过 GitHub 安全公告 私下报告安全问题,而不是作为公开问题。请参阅 SECURITY.md 了解完整的披露政策。


项目结构

src/
  client.ts                   BudaClient (HTTP + 429 retry)
  cache.ts                    In-memory TTL cache with in-flight deduplication
  types.ts                    TypeScript types for Buda API responses
  validation.ts               validateMarketId(), validateCurrency()
  utils.ts                    flattenAmount(), aggregateTradesToCandles(), getLiquidityRating()
  version.ts                  Single source of truth for version string
  index.ts                    stdio MCP server entrypoint
  http.ts                     HTTP/SSE MCP server entrypoint
  tools/
    markets.ts                get_markets
    ticker.ts                 get_ticker
    orderbook.ts              get_orderbook
    trades.ts                 get_trades
    volume.ts                 get_market_volume
    spread.ts                 get_spread
    compare_markets.ts        compare_markets
    price_history.ts          get_price_history
    arbitrage.ts              get_arbitrage_opportunities
    market_summary.ts         get_market_summary
    simulate_order.ts         simulate_order
    calculate_position_size.ts calculate_position_size
    market_sentiment.ts       get_market_sentiment
    technical_indicators.ts   get_technical_indicators
    banks.ts                  get_available_banks
    quotation.ts              get_real_quotation
marketplace/
  cursor-mcp.json             Cursor MCP config example
  claude-listing.md           Claude registry listing
  openapi.yaml                OpenAPI spec (GPT Actions / HTTP wrapper)
  gemini-tools.json           Gemini function declarations

许可证

MIT — Buda.com API 文档

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - A tier

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gtorreal/buda-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server