@guiie/buda-mcp 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/marketplace-docs-sync.mdc +32 -0
- package/CHANGELOG.md +75 -0
- package/PUBLISH_CHECKLIST.md +48 -89
- package/README.md +446 -78
- package/dist/audit.d.ts +21 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +14 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -1
- package/dist/http.js +65 -7
- package/dist/index.js +12 -3
- package/dist/tools/account.js +1 -1
- package/dist/tools/arbitrage.js +1 -1
- package/dist/tools/balance.js +1 -1
- package/dist/tools/balances.js +1 -1
- package/dist/tools/banks.js +1 -1
- package/dist/tools/batch_orders.d.ts +6 -1
- package/dist/tools/batch_orders.d.ts.map +1 -1
- package/dist/tools/batch_orders.js +47 -3
- package/dist/tools/cancel_all_orders.d.ts +1 -1
- package/dist/tools/cancel_all_orders.d.ts.map +1 -1
- package/dist/tools/cancel_all_orders.js +10 -13
- package/dist/tools/cancel_order.d.ts +1 -1
- package/dist/tools/cancel_order.d.ts.map +1 -1
- package/dist/tools/cancel_order.js +10 -10
- package/dist/tools/cancel_order_by_client_id.d.ts +1 -1
- package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -1
- package/dist/tools/cancel_order_by_client_id.js +9 -9
- package/dist/tools/compare_markets.d.ts +9 -0
- package/dist/tools/compare_markets.d.ts.map +1 -1
- package/dist/tools/compare_markets.js +63 -53
- package/dist/tools/dead_mans_switch.d.ts +2 -2
- package/dist/tools/dead_mans_switch.d.ts.map +1 -1
- package/dist/tools/dead_mans_switch.js +68 -6
- package/dist/tools/deposits.js +2 -2
- package/dist/tools/fees.js +1 -1
- package/dist/tools/lightning.d.ts +1 -1
- package/dist/tools/lightning.d.ts.map +1 -1
- package/dist/tools/lightning.js +25 -9
- package/dist/tools/market_sentiment.js +1 -1
- package/dist/tools/market_summary.js +1 -1
- package/dist/tools/markets.js +1 -1
- package/dist/tools/order_lookup.js +2 -2
- package/dist/tools/orderbook.js +1 -1
- package/dist/tools/orders.js +1 -1
- package/dist/tools/place_order.d.ts +1 -1
- package/dist/tools/place_order.d.ts.map +1 -1
- package/dist/tools/place_order.js +53 -4
- package/dist/tools/price_history.js +1 -1
- package/dist/tools/quotation.js +1 -1
- package/dist/tools/receive_addresses.d.ts +6 -1
- package/dist/tools/receive_addresses.d.ts.map +1 -1
- package/dist/tools/receive_addresses.js +37 -13
- package/dist/tools/remittance_recipients.js +2 -2
- package/dist/tools/remittances.d.ts +7 -2
- package/dist/tools/remittances.d.ts.map +1 -1
- package/dist/tools/remittances.js +46 -23
- package/dist/tools/simulate_order.js +1 -1
- package/dist/tools/spread.js +1 -1
- package/dist/tools/technical_indicators.d.ts.map +1 -1
- package/dist/tools/technical_indicators.js +3 -2
- package/dist/tools/ticker.js +1 -1
- package/dist/tools/trades.js +1 -1
- package/dist/tools/volume.js +1 -1
- package/dist/tools/withdrawals.d.ts +1 -1
- package/dist/tools/withdrawals.d.ts.map +1 -1
- package/dist/tools/withdrawals.js +21 -11
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +29 -1
- package/dist/validation.d.ts +6 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +26 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +8 -1
- package/marketplace/README.md +1 -1
- package/marketplace/claude-listing.md +75 -4
- package/marketplace/gemini-tools.json +325 -2
- package/marketplace/openapi.yaml +160 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/src/audit.ts +24 -0
- package/src/client.ts +3 -1
- package/src/http.ts +75 -7
- package/src/index.ts +10 -3
- package/src/tools/account.ts +1 -1
- package/src/tools/arbitrage.ts +1 -1
- package/src/tools/balance.ts +1 -1
- package/src/tools/balances.ts +1 -1
- package/src/tools/banks.ts +1 -1
- package/src/tools/batch_orders.ts +52 -2
- package/src/tools/cancel_all_orders.ts +10 -12
- package/src/tools/cancel_order.ts +10 -9
- package/src/tools/cancel_order_by_client_id.ts +9 -8
- package/src/tools/compare_markets.ts +78 -61
- package/src/tools/dead_mans_switch.ts +76 -5
- package/src/tools/deposits.ts +2 -2
- package/src/tools/fees.ts +1 -1
- package/src/tools/lightning.ts +28 -9
- package/src/tools/market_sentiment.ts +1 -1
- package/src/tools/market_summary.ts +1 -1
- package/src/tools/markets.ts +1 -1
- package/src/tools/order_lookup.ts +2 -2
- package/src/tools/orderbook.ts +1 -1
- package/src/tools/orders.ts +1 -1
- package/src/tools/place_order.ts +56 -5
- package/src/tools/price_history.ts +1 -1
- package/src/tools/quotation.ts +1 -1
- package/src/tools/receive_addresses.ts +40 -13
- package/src/tools/remittance_recipients.ts +2 -2
- package/src/tools/remittances.ts +49 -22
- package/src/tools/simulate_order.ts +1 -1
- package/src/tools/spread.ts +1 -1
- package/src/tools/technical_indicators.ts +3 -2
- package/src/tools/ticker.ts +1 -1
- package/src/tools/trades.ts +1 -1
- package/src/tools/volume.ts +1 -1
- package/src/tools/withdrawals.ts +22 -10
- package/src/utils.ts +36 -1
- package/src/validation.ts +29 -0
- package/src/version.ts +11 -3
- package/test/unit.ts +623 -22
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Keep marketplace documentation in sync with tool changes
|
|
3
|
+
globs: src/tools/**/*.ts
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Marketplace Documentation Sync
|
|
8
|
+
|
|
9
|
+
Any change to `src/tools/` that adds, removes, or modifies a tool **must** be accompanied by matching updates to all three marketplace files.
|
|
10
|
+
|
|
11
|
+
## Files to keep in sync
|
|
12
|
+
|
|
13
|
+
| File | What to update |
|
|
14
|
+
|------|----------------|
|
|
15
|
+
| `marketplace/claude-listing.md` | Add/remove/update `### \`tool_name\`` section in the correct group (Public or Authenticated) |
|
|
16
|
+
| `marketplace/gemini-tools.json` | Add/remove/update entry in `functionDeclarations[]` with Gemini types (`STRING`, `INTEGER`, `NUMBER`, `OBJECT`) |
|
|
17
|
+
| `marketplace/openapi.yaml` | Add/remove/update path + response schema — **public tools only** (auth tools are excluded intentionally) |
|
|
18
|
+
|
|
19
|
+
## When each file needs updating
|
|
20
|
+
|
|
21
|
+
- **New tool added** → add to all applicable files above
|
|
22
|
+
- **Tool removed** → remove from all files
|
|
23
|
+
- **Parameter added/changed/removed** → update description and `required` array in all files
|
|
24
|
+
- **Tool description changed** → update all files
|
|
25
|
+
- **Auth status changed** (public ↔ auth) → move between sections in `claude-listing.md`, update `gemini-tools.json`, add/remove from `openapi.yaml`
|
|
26
|
+
|
|
27
|
+
## Quick checklist before committing
|
|
28
|
+
|
|
29
|
+
- [ ] `claude-listing.md` reflects all 46+ tools (run `grep "^### \`" marketplace/claude-listing.md | wc -l` to count)
|
|
30
|
+
- [ ] `gemini-tools.json` `functionDeclarations` count matches
|
|
31
|
+
- [ ] `openapi.yaml` paths count matches public tool count
|
|
32
|
+
- [ ] `CHANGELOG.md` has an entry describing the change
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,81 @@ This project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## [1.5.2] – 2026-04-11
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
|
|
18
|
+
- **Trust proxy configured for Railway** — added `app.set("trust proxy", 1)` to Express before any middleware. Without this, `express-rate-limit` saw the proxy IP for every request instead of the real client IP, making per-IP rate limiting effectively useless in the Railway deployment.
|
|
19
|
+
|
|
20
|
+
- **Constant-time bearer token comparison** — `mcpAuthMiddleware` now uses `crypto.timingSafeEqual` via a new `safeTokenEqual()` helper (exported from `src/utils.ts`) instead of plain string equality, eliminating the theoretical timing side-channel on the `MCP_AUTH_TOKEN` comparison.
|
|
21
|
+
|
|
22
|
+
- **PORT and MCP_RATE_LIMIT startup validation** — both environment variables are now parsed through a new `parseEnvInt(raw, fallback, min, max, name)` helper that throws a descriptive error and exits on `NaN` or out-of-range values, preventing silent misconfigurations (e.g. `MCP_RATE_LIMIT=abc` previously resolved to `NaN` and could disable the rate limiter).
|
|
23
|
+
|
|
24
|
+
- **MCP_AUTH_TOKEN entropy warning** — server now emits a `console.warn` at startup if `MCP_AUTH_TOKEN` is set but shorter than 32 characters, nudging operators toward adequately random secrets.
|
|
25
|
+
|
|
26
|
+
- **Dead man's switch fully isolated to stdio transport** — `renew_cancel_timer` and `disarm_cancel_timer` now also return `TRANSPORT_NOT_SUPPORTED` on HTTP transport (previously only `schedule_cancel_all` was blocked). An attacker with HTTP access could previously disarm or renew a timer armed via the stdio process, since both share the same module-level `timers` Map.
|
|
27
|
+
|
|
28
|
+
- **Input validation in `compare_markets`** — `base_currency` is now validated with `validateCurrency()` before fetching tickers, consistent with all other tools that accept a currency parameter. Arbitrary-length strings no longer reach the cache or API.
|
|
29
|
+
|
|
30
|
+
- **BOLT-11 invoice regex strengthened** — regex updated from `/^ln(bc|tb|bcrt)\d/i` to `/^ln(bc|tb|bcrt)\d*[munp]?1[a-z0-9]{20,}$/i`. The new pattern requires the bech32 separator `1`, at least 20 characters of bech32 data after it, and anchors at `$` — rejecting malformed strings that happen to start with the right prefix.
|
|
31
|
+
|
|
32
|
+
- **API path redaction from error responses** — removed the `path` field from all `BudaApiError` catch blocks across 31 tool handlers. The field was included in MCP tool responses, leaking internal API endpoint patterns (e.g. `/currencies/BTC/withdrawals`) to clients. The `path` property still exists on `BudaApiError` for internal use in audit logs.
|
|
33
|
+
|
|
34
|
+
- **Structured audit logging for destructive operations** — new `src/audit.ts` module with `logAudit(event: AuditEvent)` writes newline-delimited JSON to `process.stderr` for all 11 handlers with financial side-effects: `place_order`, `cancel_order`, `cancel_all_orders`, `cancel_order_by_client_id`, `place_batch_orders`, `create_withdrawal`, `lightning_withdrawal`, `create_receive_address`, `quote_remittance`, `accept_remittance_quote`, `schedule_cancel_all`. Audit events include `ts`, `tool`, `transport`, `args_summary` (sanitized — never includes `confirmation_token`, `invoice`, or `address`), `success`, and `error_code`. Each handler exposes an optional `transport` parameter (default `"stdio"`) for future HTTP-aware logging.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **`safeTokenEqual(a, b)` utility** — exported from `src/utils.ts`; constant-time string comparison using `crypto.timingSafeEqual`. Usable by any future code that compares secrets.
|
|
39
|
+
- **`parseEnvInt(raw, fallback, min, max, name)` utility** — exported from `src/utils.ts`; safe environment variable integer parsing with range validation. Used for `PORT` and `MCP_RATE_LIMIT` at startup.
|
|
40
|
+
- **`handleCompareMarkets` exported handler** — `compare_markets.ts` logic extracted from the inline registration closure into a named, exported function for unit testability.
|
|
41
|
+
|
|
42
|
+
### Tests
|
|
43
|
+
|
|
44
|
+
- **+28 unit tests** covering all new security behaviors: `safeTokenEqual` (5 cases), `parseEnvInt` (6 cases), `handleCompareMarkets` validateCurrency guard (4 cases), improved BOLT-11 regex (3 cases), DMS HTTP transport guard for renew and disarm (4 cases), `logAudit` output format and secret redaction (3 cases), audit integration with `handlePlaceOrder` (1 case), `path` field absence in error responses (2 cases).
|
|
45
|
+
- **Updated 3 existing test fixtures** — replaced placeholder invoice string `"lnbc1000u1ptest..."` (which contained dots — invalid bech32) with a well-formed test value that satisfies the improved BOLT-11 regex.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## [1.5.1] – 2026-04-11
|
|
50
|
+
|
|
51
|
+
### Security
|
|
52
|
+
|
|
53
|
+
- **HTTP startup guard for missing `MCP_AUTH_TOKEN`** — when `BUDA_API_KEY`/`BUDA_API_SECRET` are present but `MCP_AUTH_TOKEN` is not set, the HTTP server now exits with a `FATAL` error at startup instead of silently leaving the `/mcp` endpoint publicly accessible. This closes the opt-in footgun where operators could deploy credentials without a protecting token.
|
|
54
|
+
|
|
55
|
+
- **Rate limiting on `/mcp`** — `express-rate-limit` middleware (120 req/min per IP by default) is applied to `POST /mcp` and `GET /mcp` before auth, preventing looping agents from saturating the Buda API. Configurable via the `MCP_RATE_LIMIT` environment variable.
|
|
56
|
+
|
|
57
|
+
- **Crypto address format validation in `create_withdrawal`** — the `address` field is now validated against per-currency regex rules for BTC, ETH, USDC, USDT, LTC, BCH, and XRP before any API call. Unknown currencies pass through to the exchange. Returns `INVALID_ADDRESS` on failure. Tool description now explicitly warns that crypto withdrawals are irreversible.
|
|
58
|
+
|
|
59
|
+
- **BOLT-11 invoice format validation in `lightning_withdrawal`** — the `invoice` field is now checked against a prefix regex (`/^ln(bc|tb|bcrt)\d/i`) before the API call, rejecting non-invoice strings (e.g. a Bitcoin address pasted by mistake). Zod minimum length tightened from 1 to 50 characters.
|
|
60
|
+
|
|
61
|
+
- **Dead man's switch blocked on HTTP transport** — `schedule_cancel_all` now returns `TRANSPORT_NOT_SUPPORTED` when called via the HTTP server, where a process restart (deploy, crash, autoscale) silently drops all in-memory timers. `renew_cancel_timer` and `disarm_cancel_timer` remain callable. The `register()` function accepts a new `transport: "stdio" | "http"` parameter (default `"stdio"`).
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- **Batch orders optional notional cap** — `place_batch_orders` now accepts an optional `max_notional` parameter. If the sum of `amount × limit_price` across all limit orders exceeds the cap, the entire batch is rejected before any API call with `NOTIONAL_CAP_EXCEEDED`. Market orders contribute 0 (execution price unknown).
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **Security: path traversal in MCP resource handlers** — `buda://ticker/{market}` and `buda://summary/{market}` resource handlers now call `validateMarketId` before interpolating the parameter into the API URL, preventing path traversal to unintended Buda API endpoints.
|
|
70
|
+
- **Security: bearer token auth for HTTP server** — `src/http.ts` now supports an optional `MCP_AUTH_TOKEN` environment variable. When set, all requests to `/mcp` must include `Authorization: Bearer <token>`. Health check and server-card endpoints remain public.
|
|
71
|
+
- **Bug: NaN propagation in `flattenAmount`** — now throws an explicit error on invalid amount strings instead of silently returning `NaN`.
|
|
72
|
+
- **Bug: nonce collision on concurrent HTTP requests** — `BudaClient` now uses a per-instance counter to guarantee unique nonces even when multiple requests land within the same millisecond.
|
|
73
|
+
- **Bug: `version.ts` crash on missing `package.json`** — `readFileSync` is now wrapped in `try/catch` with fallback `"unknown"` to prevent process crash in deployments without `package.json`.
|
|
74
|
+
- **Bug: incorrect PUT payload in `cancel_order` and `dead_mans_switch`** — body is now `{ order: { state: "canceling" } }` per Buda API Rails convention, matching `cancel_order_by_client_id` and `remittances`.
|
|
75
|
+
- **Bug: `ttl_seconds` bounds not enforced in `handleScheduleCancelAll`** — added explicit validation (10–300, integer) in the handler itself, independent of Zod schema; a negative TTL would previously have fired the timer immediately.
|
|
76
|
+
- **Bug: `gtd_timestamp` not validated in `place_order`** — now checks that the value is a valid ISO 8601 datetime and is in the future before sending it to the API.
|
|
77
|
+
- **Bug: `sma_50` returned incorrect partial average** — `get_technical_indicators` now returns `null` for `sma_50` (with an `sma_50_warning` field) when fewer than 50 candles are available, instead of silently computing an average over fewer points.
|
|
78
|
+
- **Security: `quote_remittance` now requires `confirmation_token="CONFIRM"`** — this tool is non-idempotent (each call creates a new remittance record); the confirmation guard prevents accidental or repeated invocations.
|
|
79
|
+
- **Security: `create_receive_address` now requires `confirmation_token="CONFIRM"`** — this tool is non-idempotent (each call generates a new blockchain address); the confirmation guard prevents accidental repeated calls.
|
|
80
|
+
- **Marketplace docs updated** — `gemini-tools.json`, `claude-listing.md`, `openapi.yaml`, and `README.md` updated to reflect all changes.
|
|
81
|
+
- **Marketplace documentation gap** — `claude-listing.md`, `gemini-tools.json`, and `openapi.yaml` were missing 18 tools that were already implemented and registered in the server. All three files now reflect the full set of 46 tools.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
10
85
|
## [1.5.0] – 2026-04-11
|
|
11
86
|
|
|
12
87
|
### Added
|
package/PUBLISH_CHECKLIST.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Publish Checklist — buda-mcp v1.
|
|
1
|
+
# Publish Checklist — buda-mcp v1.5.2
|
|
2
2
|
|
|
3
|
-
Steps to publish `v1.
|
|
4
|
-
|
|
5
|
-
> **Important for v1.4.0:** The new `schedule_cancel_all` tool uses in-memory timer state that is lost on server restart. This is prominently documented in the tool description, README auth section, and CHANGELOG. Do NOT encourage users to rely on this tool in hosted/Railway deployments.
|
|
3
|
+
Steps to publish `v1.5.2` to npm, the MCP registry, and notify community directories.
|
|
6
4
|
|
|
7
5
|
---
|
|
8
6
|
|
|
@@ -10,13 +8,13 @@ Steps to publish `v1.4.0` to npm, the MCP registry, and notify community directo
|
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
10
|
# Confirm version
|
|
13
|
-
node -e "console.log(require('./package.json').version)" # should print 1.
|
|
11
|
+
node -e "console.log(require('./package.json').version)" # should print 1.5.2
|
|
14
12
|
|
|
15
13
|
# Build and test
|
|
16
14
|
npm run build
|
|
17
15
|
npm test
|
|
18
16
|
|
|
19
|
-
# Sync server.json version (already done, but
|
|
17
|
+
# Sync server.json version (already done, but confirm)
|
|
20
18
|
npm run sync-version
|
|
21
19
|
|
|
22
20
|
# Verify no credentials are logged (audit)
|
|
@@ -39,58 +37,9 @@ Verify: https://www.npmjs.com/package/@guiie/buda-mcp
|
|
|
39
37
|
|
|
40
38
|
## 3. GitHub release
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
git add -A
|
|
44
|
-
git commit -m "chore: release v1.4.0
|
|
45
|
-
|
|
46
|
-
- simulate_order: live order cost simulation (no order placed, simulation: true)
|
|
47
|
-
- calculate_position_size: Kelly-style sizing from capital/risk/entry/stop (client-side)
|
|
48
|
-
- get_market_sentiment: composite score -100..+100 from price/volume/spread
|
|
49
|
-
- get_technical_indicators: RSI/MACD/BB/SMA20/SMA50 from trade history (no libs)
|
|
50
|
-
- schedule_cancel_all + renew_cancel_timer + disarm_cancel_timer: in-memory dead man's switch (auth-gated)
|
|
51
|
-
- aggregateTradesToCandles() extracted to utils.ts (shared by price_history + technical_indicators)
|
|
52
|
-
- OhlcvCandle interface moved to types.ts
|
|
53
|
-
- 59 unit tests (24 new)"
|
|
54
|
-
|
|
55
|
-
git tag v1.4.0
|
|
56
|
-
git push origin main --tags
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Then create a GitHub Release from the tag:
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
**Release notes template (GitHub):**
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
## buda-mcp v1.4.0 — Trading Tools
|
|
67
|
-
|
|
68
|
-
### 5 new tools
|
|
40
|
+
Tag and release already created via `gh release create v1.5.2`. Verify at:
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
Simulates a buy or sell order using live ticker data — no order placed. Returns estimated fill price, fee (actual taker rate from market data: 0.8% crypto / 0.5% stablecoin), total cost, and slippage vs mid. All outputs include simulation: true.
|
|
72
|
-
|
|
73
|
-
**`calculate_position_size`** (public)
|
|
74
|
-
Kelly-style position sizing from capital, risk %, entry, and stop-loss. Fully client-side. Returns units, capital_at_risk, position_value, fee_impact, and a plain-text risk note.
|
|
75
|
-
|
|
76
|
-
**`get_market_sentiment`** (public)
|
|
77
|
-
Composite sentiment score (−100 to +100) from price variation 24h (40%), volume vs 7d average (35%), and spread vs market-type baseline (25%). Returns score, label, component breakdown, and disclaimer.
|
|
78
|
-
|
|
79
|
-
**`get_technical_indicators`** (public)
|
|
80
|
-
RSI (14), MACD (12/26/9), Bollinger Bands (20, 2σ), SMA 20, SMA 50 — computed server-side from Buda trade history with no external libraries. Returns signal interpretations and structured warning if insufficient candles.
|
|
81
|
-
|
|
82
|
-
**`schedule_cancel_all` + `renew_cancel_timer` + `disarm_cancel_timer`** (auth-gated)
|
|
83
|
-
In-memory dead man's switch: arms a timer that cancels all open orders if not renewed. WARNING: timer state is lost on server restart. Use only on locally-run instances.
|
|
84
|
-
|
|
85
|
-
### Infrastructure
|
|
86
|
-
- `aggregateTradesToCandles()` extracted to `utils.ts` — shared by `get_price_history` and `get_technical_indicators`
|
|
87
|
-
- `OhlcvCandle` interface exported from `types.ts`
|
|
88
|
-
- 59 unit tests (was 35)
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npx @guiie/buda-mcp
|
|
92
|
-
```
|
|
93
|
-
```
|
|
42
|
+
https://github.com/gtorreal/buda-mcp/releases/tag/v1.5.2
|
|
94
43
|
|
|
95
44
|
---
|
|
96
45
|
|
|
@@ -115,19 +64,23 @@ Verify: https://smithery.ai/server/@guiie/buda-mcp
|
|
|
115
64
|
**Email/message template:**
|
|
116
65
|
|
|
117
66
|
```
|
|
118
|
-
Subject: [Update] buda-mcp v1.
|
|
67
|
+
Subject: [Update] buda-mcp v1.5.2 — Security hardening (second pass)
|
|
119
68
|
|
|
120
69
|
Hi mcp.so team,
|
|
121
70
|
|
|
122
|
-
I've released v1.
|
|
71
|
+
I've released v1.5.2 of buda-mcp (@guiie/buda-mcp on npm).
|
|
123
72
|
|
|
124
|
-
Key changes (
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
73
|
+
Key changes (security hardening, no new tools):
|
|
74
|
+
- Constant-time token comparison (timing-safe Bearer token auth)
|
|
75
|
+
- Strict environment variable validation (PORT, MCP_RATE_LIMIT) with safe exit on bad config
|
|
76
|
+
- MCP_AUTH_TOKEN entropy warning (< 32 chars)
|
|
77
|
+
- trust proxy support for correct client IP detection behind reverse proxies
|
|
78
|
+
- Audit logging for all 11 destructive tool handlers (structured JSON to stderr)
|
|
79
|
+
- Dead man's switch: renew/disarm also blocked on HTTP transport
|
|
80
|
+
- validateCurrency() added to compare_markets tool
|
|
81
|
+
- Stronger BOLT-11 regex validation in lightning_withdrawal
|
|
82
|
+
- Internal API paths redacted from all error responses (31 tool handlers)
|
|
83
|
+
- 28 new unit tests (total now 184)
|
|
131
84
|
|
|
132
85
|
Links:
|
|
133
86
|
- npm: https://www.npmjs.com/package/@guiie/buda-mcp
|
|
@@ -146,23 +99,25 @@ Thank you!
|
|
|
146
99
|
**Message template:**
|
|
147
100
|
|
|
148
101
|
```
|
|
149
|
-
Subject: [Update] buda-mcp v1.
|
|
102
|
+
Subject: [Update] buda-mcp v1.5.2
|
|
150
103
|
|
|
151
104
|
Hi Glama team,
|
|
152
105
|
|
|
153
|
-
buda-mcp has been updated to v1.
|
|
106
|
+
buda-mcp has been updated to v1.5.2.
|
|
154
107
|
|
|
155
108
|
Package: @guiie/buda-mcp (npm)
|
|
156
109
|
Registry: io.github.gtorreal/buda-mcp (MCP Registry)
|
|
157
|
-
Version: 1.
|
|
158
|
-
|
|
159
|
-
Changes (
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
110
|
+
Version: 1.5.2
|
|
111
|
+
|
|
112
|
+
Changes (security hardening, second pass):
|
|
113
|
+
- Constant-time token comparison (timing-safe auth)
|
|
114
|
+
- Strict env var validation (PORT, MCP_RATE_LIMIT)
|
|
115
|
+
- Audit logging for all destructive handlers
|
|
116
|
+
- Dead man's switch: renew/disarm also blocked on HTTP
|
|
117
|
+
- validateCurrency() in compare_markets
|
|
118
|
+
- Stronger BOLT-11 regex
|
|
119
|
+
- Internal paths redacted from error responses
|
|
120
|
+
- 184 unit tests
|
|
166
121
|
|
|
167
122
|
Quick start:
|
|
168
123
|
npx @guiie/buda-mcp
|
|
@@ -177,21 +132,25 @@ Thank you!
|
|
|
177
132
|
|
|
178
133
|
## 8. Post-publish verification
|
|
179
134
|
|
|
180
|
-
- [ ] `npx @guiie/buda-mcp@1.
|
|
181
|
-
- [ ] `npm info @guiie/buda-mcp version` returns `1.
|
|
182
|
-
- [ ] GitHub release tag `v1.
|
|
183
|
-
- [ ] MCP Registry entry reflects v1.
|
|
184
|
-
- [ ] Smithery server card lists
|
|
185
|
-
- [ ]
|
|
186
|
-
- [ ]
|
|
187
|
-
- [ ]
|
|
188
|
-
- [ ]
|
|
189
|
-
- [ ]
|
|
135
|
+
- [ ] `npx @guiie/buda-mcp@1.5.2` starts successfully
|
|
136
|
+
- [ ] `npm info @guiie/buda-mcp version` returns `1.5.2`
|
|
137
|
+
- [ ] GitHub release tag `v1.5.2` is visible
|
|
138
|
+
- [ ] MCP Registry entry reflects v1.5.2
|
|
139
|
+
- [ ] Smithery server card lists all tools
|
|
140
|
+
- [ ] `GET /health` returns `"version":"1.5.2"` on Railway deployment
|
|
141
|
+
- [ ] HTTP server exits if `BUDA_API_KEY` set but `MCP_AUTH_TOKEN` is absent
|
|
142
|
+
- [ ] `create_withdrawal` rejects a truncated BTC address with `INVALID_ADDRESS`
|
|
143
|
+
- [ ] `lightning_withdrawal` rejects a non-BOLT11 string with `INVALID_INVOICE`
|
|
144
|
+
- [ ] `place_batch_orders` with `max_notional` rejects over-cap batch before API call
|
|
145
|
+
- [ ] `schedule_cancel_all` via HTTP returns `TRANSPORT_NOT_SUPPORTED`
|
|
146
|
+
- [ ] `renew_cancel_timer` via HTTP returns `TRANSPORT_NOT_SUPPORTED`
|
|
147
|
+
- [ ] Error responses do NOT include internal `path` field
|
|
148
|
+
- [ ] Audit events appear in stderr as JSON with `audit: true`
|
|
190
149
|
- [ ] mcp.so listing updated
|
|
191
150
|
- [ ] Glama.ai listing updated
|
|
192
151
|
|
|
193
152
|
---
|
|
194
153
|
|
|
195
|
-
## ARCHIVED:
|
|
154
|
+
## ARCHIVED: previous checklists
|
|
196
155
|
|
|
197
|
-
See git
|
|
156
|
+
See git tags `v1.5.0`, `v1.5.1`, `v1.4.0`, `v1.4.1`, `v1.4.2` for previous release notes and verification steps.
|