From 77f30c2837b51a195a4f28c60e23e68b06a0e827 Mon Sep 17 00:00:00 2001 From: pcriadoperez Date: Thu, 3 Dec 2026 14:15:58 +0000 Subject: [PATCH] Release workflow: the OpenAI and Claude plugin ZIPs, built and checked - scripts/build-release.py builds ccxt-openai-.zip (only the usage skill, no .app.json or "apps", description without the coding skills, its own README) and the two Claude plugin ZIPs, and fails on the OpenAI rules we know: one https MCP server, no app references or hooks, 5 positive and 3 negative review cases with their fields, listing field lengths, the four listing URLs, icons, keywords, no reviewer credentials, and the agent-plugins 1.0.0 schemas (vendored in scripts/schemas). - .github/workflows/release.yml runs it on a v* tag and attaches the ZIPs to a release, or keeps them as an artifact when started by hand; it also validates the Claude plugins with claude plugin validate --profile directory. - Skills synced from the ccxt/ccxt#31384 branch (ccxt/ccxt sources now carry the edits made here): the usage skill covers show_table, fetch_route, views by default and raw data for backtests, and no longer mentions account tools; the TypeScript skill loses its duplicate key block. - check-versions.py keeps accepting 0.0.1 until v0.0.1 is released. --- .github/workflows/release.yml | 73 +++++++ .gitignore | 1 + README.md | 4 +- chatgpt/README.md | 2 +- chatgpt/ccxt/skills/ccxt-rust/SKILL.md | 2 +- chatgpt/ccxt/skills/ccxt-typescript/SKILL.md | 9 +- chatgpt/ccxt/skills/ccxt/SKILL.md | 11 +- claude/ccxt-local/skills/ccxt-mcp/SKILL.md | 2 +- claude/ccxt/skills/ccxt-typescript/SKILL.md | 9 +- claude/ccxt/skills/ccxt/SKILL.md | 11 +- release/openai/README.md | 16 ++ scripts/build-release.py | 181 ++++++++++++++++++ scripts/check-versions.py | 11 +- .../agent-plugins-1.0.0-mcp.schema.json | 120 ++++++++++++ .../agent-plugins-1.0.0-plugin.schema.json | 65 +++++++ 15 files changed, 482 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 release/openai/README.md create mode 100644 scripts/build-release.py create mode 100644 scripts/schemas/agent-plugins-1.0.0-mcp.schema.json create mode 100644 scripts/schemas/agent-plugins-1.0.0-plugin.schema.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2bc70d4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,73 @@ +name: Release + +# Builds the plugin ZIPs (scripts/build-release.py) and attaches them to a GitHub release: +# ccxt-openai-.zip upload at platform.openai.com/plugins +# ccxt-claude-.zip the Claude ccxt plugin (Claude's "Upload plugin") +# ccxt-local-claude-.zip the Claude ccxt-local plugin +# Push a tag such as v0.0.1 to publish a release. A run started by hand from the Actions tab +# builds and checks the ZIPs and keeps them as a workflow artifact, without a release. + +on: + push: + tags: [ 'v*' ] + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: release + cancel-in-progress: false + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Build and check the ZIPs + run: | + pip install --quiet jsonschema + python3 scripts/build-release.py dist + + - name: Validate the Claude plugins for the plugin directory + run: | + npm install -g --no-audit --no-fund @anthropic-ai/claude-code >/dev/null + for dir in claude/ccxt claude/ccxt-local; do + claude plugin validate --profile directory "$dir" + done + + - name: Keep the ZIPs with the run + uses: actions/upload-artifact@v4 + with: + name: plugin-zips + path: dist/*.zip + + - name: Publish the release + if: startsWith(github.ref, 'refs/tags/') + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.ref_name }} + run: | + versions=$(python3 -c 'import json + for p in ("chatgpt/ccxt/plugin.json", "claude/ccxt/.claude-plugin/plugin.json", "claude/ccxt-local/.claude-plugin/plugin.json"): + print("- `" + p.split("/")[0] + "/" + p.split("/")[1] + "` " + json.load(open(p))["version"])') + cat > notes.md </dev/null 2>&1; then + gh release upload "$TAG" dist/*.zip --clobber + else + gh release create "$TAG" dist/*.zip --title "$TAG" --notes-file notes.md + fi diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/README.md b/README.md index af19d12..94b8e71 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,9 @@ Every skill here is a copy from ccxt/ccxt `master`; the list of skills each plug Manifests and READMEs are maintained here, not copied. Claude Code only updates an installed plugin when its `version` changes, so a PR that changes anything a plugin ships must raise that plugin's version (`python3 scripts/bump-version.py `); [`check-versions.yml`](.github/workflows/check-versions.yml) fails the PR otherwise, and validates the manifests. -Marketplace files: [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json) for Claude, [`.agents/plugins/marketplace.json`](.agents/plugins/marketplace.json) for ChatGPT and Codex. The README artwork is in [`.github/assets`](.github/assets); the demo is recorded from the real views against the production server. +Marketplace files: [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json) for Claude, [`.agents/plugins/marketplace.json`](.agents/plugins/marketplace.json) for ChatGPT and Codex. + +Releases: push a tag such as `v0.0.1` and [`release.yml`](.github/workflows/release.yml) builds and checks the ZIPs ([`scripts/build-release.py`](scripts/build-release.py)) and attaches them to a GitHub release: `ccxt-openai-.zip` to upload at platform.openai.com/plugins (only the usage skill, no `.app.json`, which OpenAI refuses), and `ccxt-claude-.zip` / `ccxt-local-claude-.zip` for the Claude plugins. Run it by hand from the Actions tab to get the ZIPs without a release. The README artwork is in [`.github/assets`](.github/assets); the demo is recorded from the real views against the production server. diff --git a/chatgpt/README.md b/chatgpt/README.md index 3e06265..1d399c4 100644 --- a/chatgpt/README.md +++ b/chatgpt/README.md @@ -8,4 +8,4 @@ Files: [`../.agents/plugins/marketplace.json`](../.agents/plugins/marketplace.json) and [`ccxt/`](ccxt/). -For the OpenAI directory, upload a ZIP of the contents of `ccxt/` (with `plugin.json` and `mcp.json` at the root of the ZIP) at platform.openai.com/plugins, without `.app.json` and without the `"apps"` line in `plugin.json`: OpenAI refuses packages with app references. `.app.json` links the installed plugin to the CCXT app registered in the CCXT OpenAI organization, so ChatGPT serves the tools through that app (views render, and the tools are there in cloud runs too) instead of only as a local MCP server. +For the OpenAI directory, upload `ccxt-openai-.zip` from the [latest release](https://github.com/ccxt/ccxt-plugins/releases) at platform.openai.com/plugins. It is built by `scripts/build-release.py`, which leaves out `.app.json` and the `"apps"` line (OpenAI refuses packages with app references) and keeps only the `ccxt` usage skill. `.app.json` links the installed plugin to the CCXT app registered in the CCXT OpenAI organization, so ChatGPT serves the tools through that app. diff --git a/chatgpt/ccxt/skills/ccxt-rust/SKILL.md b/chatgpt/ccxt/skills/ccxt-rust/SKILL.md index beba5a5..f7f8166 100644 --- a/chatgpt/ccxt/skills/ccxt-rust/SKILL.md +++ b/chatgpt/ccxt/skills/ccxt-rust/SKILL.md @@ -1,6 +1,6 @@ --- name: ccxt-rust -description: CCXT cryptocurrency exchange library for Rust developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Rust projects. Use when working with crypto exchanges in Rust applications, trading bots, or low-latency services. Async (tokio), typed unified methods returning Result. +description: CCXT cryptocurrency exchange library for Rust developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Rust projects. Use when working with crypto exchanges in Rust applications, trading bots, or low-latency services. Async (tokio), typed unified methods that return a Result with an ExchangeError on failure. --- # CCXT for Rust diff --git a/chatgpt/ccxt/skills/ccxt-typescript/SKILL.md b/chatgpt/ccxt/skills/ccxt-typescript/SKILL.md index cbcef44..b02cc6a 100644 --- a/chatgpt/ccxt/skills/ccxt-typescript/SKILL.md +++ b/chatgpt/ccxt/skills/ccxt-typescript/SKILL.md @@ -769,14 +769,7 @@ exchange.apiKey = 'YOUR_API_KEY' exchange.secret = 'YOUR_SECRET' ``` -### Environment Variables (Recommended) -```typescript -const exchange = new ccxt.binance({ - apiKey: 'YOUR_API_KEY', - secret: 'YOUR_SECRET', - enableRateLimit: true -}) -``` +Keep real keys out of source code and version control: load them at runtime from a secrets manager or your deployment's configuration. ### Testing Authentication ```typescript diff --git a/chatgpt/ccxt/skills/ccxt/SKILL.md b/chatgpt/ccxt/skills/ccxt/SKILL.md index 2661244..8f0446c 100644 --- a/chatgpt/ccxt/skills/ccxt/SKILL.md +++ b/chatgpt/ccxt/skills/ccxt/SKILL.md @@ -1,6 +1,6 @@ --- name: ccxt -description: Use the hosted CCXT connector for live public crypto market data - prices, order books, candles, recent trades and market search on major exchanges - to show charts, order books and price boards in the chat, and to fetch raw historical data (candles, trades) for backtests. Use when the user asks about a crypto price, a market or symbol on an exchange, an order book, a chart, how prices compare across exchanges, or for raw market data to backtest or analyse. +description: Use the hosted CCXT connector for live public crypto market data - prices, order books, candles, recent trades and market search on major exchanges - to show charts, order books, price boards and tables of trades, funding rates and open interest in the chat, to quote the best route for a trade size, and to fetch raw historical data (candles, trades) for backtests. Use when the user asks about a crypto price, a market or symbol on an exchange, an order book, a chart, how prices compare across exchanges, or for raw market data to backtest or analyse. --- # CCXT market data @@ -18,8 +18,8 @@ The CCXT connector reads **public** market data from a curated set of major exch - **Always answer with a CCXT view by default.** Whenever the user asks for market data (candles or OHLCV, a price or price history, an order book, depth, liquidity, tickers, recent trades), call the matching `show_*` tool first, even if they did not say "show" or "chart": - `show_chart` for candles, OHLCV, price history or how a market has moved (candles + volume); - `show_orderbook` for the order book, depth, spread or liquidity; - - `show_tickers` for prices, 24h change or volume of one or several symbols on one exchange. -- Recent trades have no view of their own: call `show_chart` for the symbol so the user sees the market, and `get_trades` for the trades themselves. + - `show_tickers` for prices, 24h change or volume of one or several symbols on one exchange; + - `show_table` for recent trades, funding rates or open interest (`data`: `trades`, `funding_rates`, `funding_rate_history`, `open_interest`, `open_interest_history`). Funding and open interest need perpetual symbols such as `BTC/USDT:USDT`. A field the exchange does not report is missing, not zero. - Skip the view only when the user asks for the raw rows (CSV, JSON, a file, data for a backtest), says they do not want a chart, or you only need the numbers for a calculation. - Views render only in hosts that support MCP Apps (for example Claude and ChatGPT on the web, desktop and mobile). Terminal hosts show the text summary instead. The result's `meta.ui` says what happened: - `displayed`: the user sees the view, so comment on it rather than repeating every number; @@ -27,6 +27,7 @@ The CCXT connector reads **public** market data from a curated set of major exch - `unsupported`, `unknown` or `off`: nothing was shown, so present the summary as text. - A shown view stays live where the host allows it: it refreshes itself about every 2 seconds from a shared exchange stream, or every 5 seconds or more from REST, and says "Live" or "Delayed". Do not call `live_update` (it is the views' own refresh tool) and do not re-run a `show_*` tool only to refresh a view. - When you need numbers to reason with, in addition to the view or instead of it in the cases above, use `get_tickers`, `get_orderbook`, `get_ohlcv` or `get_trades`. +- For "where should I buy" or "best price for this size" questions, call `fetch_route` (from, to, and amountIn or amountOut) instead of comparing order books by hand: the CCXT order router walks the books on many exchanges, counts fees and depth, and can split across venues. It is a quote, not an order. Read `fillRatio` before `effectiveRate`. Executing a route needs the local CCXT MCP server. Route quotes are limited per user: on `RATE_LIMITED`, wait `retryAfterSeconds`. - To compare exchanges, call the tool once per exchange. - `describe_exchange` lists an exchange's timeframes and capabilities. @@ -37,7 +38,7 @@ When the user asks for the raw data rather than a view, the `get_*` tools return - `get_ohlcv` rows are `[timestampMs, open, high, low, close, volume]`, up to 500 candles per call. `get_trades` returns up to 200 public trades per call. - For a longer history, page forward: pass `since`, then call again with `since` set just after the last timestamp returned, until `meta.hasMore` is false or you reach the end of the range. Read `meta.notice`: it says when the exchange did not return data from `since`. - Hand the rows over unchanged, as CSV or JSON, or in a file where the host can write one. Do not round, resample or fill gaps unless the user asks, and say which exchange, symbol, timeframe and time range the data covers. -- Page a few calls, not hundreds: the server is shared and rate limited. For a large download (years of minute candles, full trade history) or for data this server has no tool for (funding rate history, open interest, liquidations and so on), write the user a short script with the CCXT library instead (`fetchOHLCV`, `fetchTrades`, `fetchFundingRateHistory`, ...), using the `ccxt-python`, `ccxt-typescript` or other `ccxt-*` coding skill. Those are public endpoints and need no API keys. +- Page a few calls, not hundreds: the server is shared and rate limited. For a large download (years of minute candles, full trade history) or for data this server has no tool for (liquidations and so on), write the user a short script with the CCXT library instead (`fetchOHLCV`, `fetchTrades`, `fetchFundingRateHistory`, ...) in the language they use. Those are public endpoints and need no API keys. Funding-rate and open-interest history are available here as `show_table`. ## Report data honestly @@ -48,7 +49,7 @@ When the user asks for the raw data rather than a view, the `get_*` tools return ## Accounts and trading -`get_balance`, `get_orders`, `get_positions` and `get_my_trades` exist but return `ACCOUNT_REQUIRED`: this hosted server has no accounts. When the user asks for balances, orders, positions, their trades, or to trade or withdraw: +This hosted server has no accounts and no account tools. When the user asks for their balances, open or past orders, positions or own trades, or to trade or withdraw: 1. Say that this connector serves public market data only. Do not stop at a refusal. 2. Offer the local CCXT MCP server, which does these things from the user's own computer: https://docs.ccxt.com/docs/mcp#local-server diff --git a/claude/ccxt-local/skills/ccxt-mcp/SKILL.md b/claude/ccxt-local/skills/ccxt-mcp/SKILL.md index 48a2b1a..324ec1d 100644 --- a/claude/ccxt-local/skills/ccxt-mcp/SKILL.md +++ b/claude/ccxt-local/skills/ccxt-mcp/SKILL.md @@ -22,7 +22,7 @@ CCXT also runs a public, read-only MCP endpoint at `https://mcp.ccxt.com/mcp` (S - **ChatGPT (web):** chatgpt.com/plugins > plus button > **Add custom MCP server** > the URL, **No authentication** > **Create as a plugin**. **ChatGPT desktop / Codex:** the plugin, `codex plugin marketplace add ccxt/ccxt-plugins` then `codex plugin add ccxt@ccxt`; or Settings > MCP servers > Add server > **Streamable HTTP**, or `[mcp_servers.ccxt]` `url = "https://mcp.ccxt.com/mcp"` in `~/.codex/config.toml`. - **Cursor / VS Code:** `{ "mcpServers": { "ccxt": { "url": "https://mcp.ccxt.com/mcp" } } }` / `{ "servers": { "ccxt": { "type": "http", "url": "https://mcp.ccxt.com/mcp" } } }`. -What it offers: `list_exchanges`, `describe_exchange`, `search_markets`, `get_tickers`, `get_orderbook`, `get_ohlcv`, `get_trades`, and the `show_chart` / `show_orderbook` / `show_tickers` views, on a curated set of major exchanges (`list_exchanges` names them). `get_balance`, `get_orders`, `get_positions` and `get_my_trades` return `ACCOUNT_REQUIRED`: relay it and point the user to the local server. No trading, no `watch_*` streams, no prediction markets, no `params`, no `call_read_method`. It is shared and rate-limited: on `RATE_LIMITED` / `EXCHANGE_UNAVAILABLE` wait `retryAfterSeconds`, don't loop. Data is briefly cached: order books 1 s, tickers and trades 2 s, candles a tenth of the candle length (2–60 s). Phase 1: signing in with exchange accounts is planned, not available. Details: https://docs.ccxt.com/docs/mcp#hosted-server-no-install +What it offers: `list_exchanges`, `describe_exchange`, `search_markets`, `get_tickers`, `get_orderbook`, `get_ohlcv`, `get_trades`, and the `show_chart` / `show_orderbook` / `show_tickers` views, on a curated set of major exchanges (`list_exchanges` names them). It has no account tools (`get_balance`, `get_orders`, `get_positions` and `get_my_trades` exist only on the local server): for balances, orders, positions or the user's own trades, point the user to the local server. `fetch_route` gives a best-route quote (executing it, `execute_route`, needs the local server; route quotes are limited per user there). No trading, no `watch_*` streams, no prediction markets, no `params`, no `call_read_method`. It is shared and rate-limited: on `RATE_LIMITED` / `EXCHANGE_UNAVAILABLE` wait `retryAfterSeconds`, don't loop. Data is briefly cached: order books 1 s, tickers and trades 2 s, candles a tenth of the candle length (2–60 s). Phase 1: signing in with exchange accounts is planned, not available. Details: https://docs.ccxt.com/docs/mcp#hosted-server-no-install ## Install (local server) diff --git a/claude/ccxt/skills/ccxt-typescript/SKILL.md b/claude/ccxt/skills/ccxt-typescript/SKILL.md index cbcef44..b02cc6a 100644 --- a/claude/ccxt/skills/ccxt-typescript/SKILL.md +++ b/claude/ccxt/skills/ccxt-typescript/SKILL.md @@ -769,14 +769,7 @@ exchange.apiKey = 'YOUR_API_KEY' exchange.secret = 'YOUR_SECRET' ``` -### Environment Variables (Recommended) -```typescript -const exchange = new ccxt.binance({ - apiKey: 'YOUR_API_KEY', - secret: 'YOUR_SECRET', - enableRateLimit: true -}) -``` +Keep real keys out of source code and version control: load them at runtime from a secrets manager or your deployment's configuration. ### Testing Authentication ```typescript diff --git a/claude/ccxt/skills/ccxt/SKILL.md b/claude/ccxt/skills/ccxt/SKILL.md index 2661244..8f0446c 100644 --- a/claude/ccxt/skills/ccxt/SKILL.md +++ b/claude/ccxt/skills/ccxt/SKILL.md @@ -1,6 +1,6 @@ --- name: ccxt -description: Use the hosted CCXT connector for live public crypto market data - prices, order books, candles, recent trades and market search on major exchanges - to show charts, order books and price boards in the chat, and to fetch raw historical data (candles, trades) for backtests. Use when the user asks about a crypto price, a market or symbol on an exchange, an order book, a chart, how prices compare across exchanges, or for raw market data to backtest or analyse. +description: Use the hosted CCXT connector for live public crypto market data - prices, order books, candles, recent trades and market search on major exchanges - to show charts, order books, price boards and tables of trades, funding rates and open interest in the chat, to quote the best route for a trade size, and to fetch raw historical data (candles, trades) for backtests. Use when the user asks about a crypto price, a market or symbol on an exchange, an order book, a chart, how prices compare across exchanges, or for raw market data to backtest or analyse. --- # CCXT market data @@ -18,8 +18,8 @@ The CCXT connector reads **public** market data from a curated set of major exch - **Always answer with a CCXT view by default.** Whenever the user asks for market data (candles or OHLCV, a price or price history, an order book, depth, liquidity, tickers, recent trades), call the matching `show_*` tool first, even if they did not say "show" or "chart": - `show_chart` for candles, OHLCV, price history or how a market has moved (candles + volume); - `show_orderbook` for the order book, depth, spread or liquidity; - - `show_tickers` for prices, 24h change or volume of one or several symbols on one exchange. -- Recent trades have no view of their own: call `show_chart` for the symbol so the user sees the market, and `get_trades` for the trades themselves. + - `show_tickers` for prices, 24h change or volume of one or several symbols on one exchange; + - `show_table` for recent trades, funding rates or open interest (`data`: `trades`, `funding_rates`, `funding_rate_history`, `open_interest`, `open_interest_history`). Funding and open interest need perpetual symbols such as `BTC/USDT:USDT`. A field the exchange does not report is missing, not zero. - Skip the view only when the user asks for the raw rows (CSV, JSON, a file, data for a backtest), says they do not want a chart, or you only need the numbers for a calculation. - Views render only in hosts that support MCP Apps (for example Claude and ChatGPT on the web, desktop and mobile). Terminal hosts show the text summary instead. The result's `meta.ui` says what happened: - `displayed`: the user sees the view, so comment on it rather than repeating every number; @@ -27,6 +27,7 @@ The CCXT connector reads **public** market data from a curated set of major exch - `unsupported`, `unknown` or `off`: nothing was shown, so present the summary as text. - A shown view stays live where the host allows it: it refreshes itself about every 2 seconds from a shared exchange stream, or every 5 seconds or more from REST, and says "Live" or "Delayed". Do not call `live_update` (it is the views' own refresh tool) and do not re-run a `show_*` tool only to refresh a view. - When you need numbers to reason with, in addition to the view or instead of it in the cases above, use `get_tickers`, `get_orderbook`, `get_ohlcv` or `get_trades`. +- For "where should I buy" or "best price for this size" questions, call `fetch_route` (from, to, and amountIn or amountOut) instead of comparing order books by hand: the CCXT order router walks the books on many exchanges, counts fees and depth, and can split across venues. It is a quote, not an order. Read `fillRatio` before `effectiveRate`. Executing a route needs the local CCXT MCP server. Route quotes are limited per user: on `RATE_LIMITED`, wait `retryAfterSeconds`. - To compare exchanges, call the tool once per exchange. - `describe_exchange` lists an exchange's timeframes and capabilities. @@ -37,7 +38,7 @@ When the user asks for the raw data rather than a view, the `get_*` tools return - `get_ohlcv` rows are `[timestampMs, open, high, low, close, volume]`, up to 500 candles per call. `get_trades` returns up to 200 public trades per call. - For a longer history, page forward: pass `since`, then call again with `since` set just after the last timestamp returned, until `meta.hasMore` is false or you reach the end of the range. Read `meta.notice`: it says when the exchange did not return data from `since`. - Hand the rows over unchanged, as CSV or JSON, or in a file where the host can write one. Do not round, resample or fill gaps unless the user asks, and say which exchange, symbol, timeframe and time range the data covers. -- Page a few calls, not hundreds: the server is shared and rate limited. For a large download (years of minute candles, full trade history) or for data this server has no tool for (funding rate history, open interest, liquidations and so on), write the user a short script with the CCXT library instead (`fetchOHLCV`, `fetchTrades`, `fetchFundingRateHistory`, ...), using the `ccxt-python`, `ccxt-typescript` or other `ccxt-*` coding skill. Those are public endpoints and need no API keys. +- Page a few calls, not hundreds: the server is shared and rate limited. For a large download (years of minute candles, full trade history) or for data this server has no tool for (liquidations and so on), write the user a short script with the CCXT library instead (`fetchOHLCV`, `fetchTrades`, `fetchFundingRateHistory`, ...) in the language they use. Those are public endpoints and need no API keys. Funding-rate and open-interest history are available here as `show_table`. ## Report data honestly @@ -48,7 +49,7 @@ When the user asks for the raw data rather than a view, the `get_*` tools return ## Accounts and trading -`get_balance`, `get_orders`, `get_positions` and `get_my_trades` exist but return `ACCOUNT_REQUIRED`: this hosted server has no accounts. When the user asks for balances, orders, positions, their trades, or to trade or withdraw: +This hosted server has no accounts and no account tools. When the user asks for their balances, open or past orders, positions or own trades, or to trade or withdraw: 1. Say that this connector serves public market data only. Do not stop at a refusal. 2. Offer the local CCXT MCP server, which does these things from the user's own computer: https://docs.ccxt.com/docs/mcp#local-server diff --git a/release/openai/README.md b/release/openai/README.md new file mode 100644 index 0000000..6bbb67f --- /dev/null +++ b/release/openai/README.md @@ -0,0 +1,16 @@ +# CCXT — hosted market-data plugin + +Connects ChatGPT to the hosted CCXT MCP server at `https://mcp.ccxt.com/mcp`, plus a skill that teaches the assistant how to use it. Nothing runs on your computer, and no exchange account or API key is needed. + +Ask for prices, order books, OHLCV candles, recent trades, funding rates, open interest and market listings on a curated set of major cryptocurrency exchanges. ChatGPT can show an interactive candlestick chart, an order-book depth view, a price board and sortable tables in the chat. Route quotes come from the CCXT order router and place no orders. + +The server is read-only and public. It does not place orders, move funds or read exchange accounts. For balances, orders, positions and opt-in trading, use the local CCXT MCP server (`ccxt-mcp` on npm), which keeps API keys on your own machine: see the [CCXT MCP docs](https://docs.ccxt.com/docs/mcp). + +| File | Purpose | +|---|---| +| `plugin.json` | the plugin manifest, with the listing, review test cases and icons under `extensions["com.openai"]` | +| `mcp.json` | the hosted server (`https://mcp.ccxt.com/mcp`, streamable HTTP, no authentication) | +| `skills/ccxt/SKILL.md` | how the assistant uses the tools | +| `assets/` | logo and composer icons | + +Source: [github.com/ccxt/ccxt-plugins](https://github.com/ccxt/ccxt-plugins). Support: [github.com/ccxt/ccxt/issues](https://github.com/ccxt/ccxt/issues). License: MIT. diff --git a/scripts/build-release.py b/scripts/build-release.py new file mode 100644 index 0000000..80a4bf1 --- /dev/null +++ b/scripts/build-release.py @@ -0,0 +1,181 @@ +"""Build and check the release ZIPs, one per directory, into dist/. + + python3 scripts/build-release.py [out_dir] + +- ccxt-openai-.zip: chatgpt/ccxt for upload at platform.openai.com/plugins. OpenAI + refuses packages with app references, and its directory turned down the coding skills + ("not suitable for broad discovery"), so the ZIP leaves out .app.json, the "apps" field and + every skill but the usage skill, drops the sentence about coding skills from the description, + and uses release/openai/README.md as its README. +- ccxt-claude-.zip and ccxt-local-claude-.zip: the Claude plugins as they + are (Claude's "Upload plugin", or a manual install). + +Fails, writing nothing it would not stand behind, when a ZIP breaks a rule we know of. The +rules are from https://developers.openai.com/plugins/deploy/submission; recheck them there. +""" +import io +import json +import os +import re +import sys +import zipfile + +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +OUT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(ROOT, 'dist')) +CODING_SENTENCE = re.compile(r' Plus skills for writing code with the CCXT library in [^.]*\.') +SKIP = {'.DS_Store'} +errors = [] + + +def fail(message): + errors.append(message) + print('::error::' + message) + + +def files_under(directory): + for base, dirs, names in os.walk(directory): + dirs.sort() + for name in sorted(names): + if name not in SKIP: + path = os.path.join(base, name) + yield path, os.path.relpath(path, directory) + + +def write_zip(path, entries): + # entries: (name in zip, bytes); fixed timestamps so the same input gives the same ZIP + with zipfile.ZipFile(path, 'w', zipfile.ZIP_DEFLATED) as archive: + for name, data in sorted(entries): + info = zipfile.ZipInfo(name, date_time=(1980, 1, 1, 0, 0, 0)) + info.external_attr = 0o644 << 16 + info.compress_type = zipfile.ZIP_DEFLATED + archive.writestr(info, data) + print(f'{os.path.relpath(path, ROOT)}: {len(entries)} files') + for name, data in sorted(entries): + print(f' {len(data):>8} {name}') + + +def read(path): + with open(path, 'rb') as handle: + return handle.read() + + +def png_size(data): + if data[:8] != b'\x89PNG\r\n\x1a\n': + return None + return int.from_bytes(data[16:20], 'big'), int.from_bytes(data[20:24], 'big') + + +def check_openai(entries): + files = dict(entries) + plugin = json.loads(files['plugin.json']) + mcp = json.loads(files['mcp.json']) + try: + import jsonschema + for name, document in (('plugin', plugin), ('mcp', mcp)): + with open(os.path.join(ROOT, 'scripts', 'schemas', f'agent-plugins-1.0.0-{name}.schema.json')) as handle: + for problem in jsonschema.Draft202012Validator(json.load(handle)).iter_errors(document): + fail(f'openai {name}.json: {problem.message} at {list(problem.absolute_path)}') + except ImportError: + fail('pip install jsonschema to check the OpenAI manifests against their schemas') + if any(name in ('.app.json', 'hooks.json') or name.startswith('hooks/') for name in files): + fail('openai: app references or hooks in the ZIP') + openai = plugin.get('extensions', {}).get('com.openai', {}) + if 'apps' in openai: + fail('openai: extensions.com.openai.apps is set (OpenAI refuses app references)') + if not re.fullmatch(r'[a-z0-9]+(-[a-z0-9]+)*', plugin.get('name', '')) or len(plugin['name']) > 64: + fail('openai: name must be lowercase letters, numbers and single hyphens, at most 64 characters') + if not re.fullmatch(r'\d+\.\d+\.\d+', plugin.get('version', '')): + fail('openai: version must be an explicit x.y.z') + if CODING_SENTENCE.search(plugin.get('description', '')) or 'coding skill' in plugin.get('description', ''): + fail('openai: the description still mentions the coding skills the ZIP leaves out') + if len(plugin.get('keywords', [])) > 25: + fail('openai: more than 25 keywords') + servers = mcp.get('mcpServers', {}) + if len(servers) != 1: + fail(f'openai: {len(servers)} MCP servers; exactly one can be connected per plugin') + for key, server in servers.items(): + if not str(server.get('url', '')).startswith('https://') or server.get('headers'): + fail(f'openai: MCP server {key} needs an https url and no headers') + interface = openai.get('interface', {}) + for field, limit in (('displayName', 30), ('shortDescription', 30), ('longDescription', 4000), ('developerName', 80)): + value = interface.get(field, '') + if not value or len(value) > limit: + fail(f'openai: interface.{field} is required, at most {limit} characters (has {len(value)})') + if not interface.get('category'): + fail('openai: interface.category is required') + for field in ('websiteURL', 'supportURL', 'privacyPolicyURL', 'termsOfServiceURL'): + if not str(interface.get(field, '')).startswith('https://'): + fail(f'openai: interface.{field} must be an https URL (all four are required for MCP review)') + prompts = interface.get('defaultPrompt', []) + prompts = [prompts] if isinstance(prompts, str) else prompts + if len(prompts) > 3 or any(len(p) > 128 or '@' in p for p in prompts) or len(set(prompts)) != len(prompts): + fail('openai: at most 3 unique starter prompts, 128 characters each, without @mentions') + capabilities = interface.get('capabilities', []) + if len(capabilities) > 20 or any(len(c) > 120 for c in capabilities): + fail('openai: at most 20 capabilities of 120 characters') + for field in ('logo', 'composerIcon', 'logoDark', 'composerIconDark'): + path = interface.get(field) + if path is None: + if field == 'logo': + fail('openai: interface.logo is required for submission') + continue + name = path[2:] if path.startswith('./') else path + if name not in files: + fail(f'openai: interface.{field} points at {path}, which is not in the ZIP') + elif len(files[name]) > 5 * 1024 * 1024: + fail(f'openai: {name} is over 5 MiB') + elif name.endswith('.png'): + size = png_size(files[name]) + if size is None or size[0] != size[1] or size[0] < 48 or size[0] > 4096: + fail(f'openai: {name} must be a square PNG of 48 to 4096 pixels (is {size})') + review = openai.get('review', {}) + cases = review.get('test_cases', {}) + positive, negative = cases.get('positive', []), cases.get('negative', []) + if len(positive) != 5 or len(negative) != 3: + fail(f'openai: initial MCP review needs exactly 5 positive and 3 negative cases (has {len(positive)} and {len(negative)})') + for case in positive: + for field in ('description', 'prompt', 'tools_triggered', 'expected_behavior'): + if not case.get(field): + fail(f'openai: positive case "{case.get("description")}" has no {field}') + for case in negative: + for field in ('description', 'prompt'): + if not case.get(field): + fail(f'openai: negative case has no {field}') + for field in ('test_credentials', 'reviewer_instructions'): + if field in review: + fail(f'openai: review.{field} is not allowed in the ZIP (use the dashboard form)') + skills = sorted({name.split('/')[1] for name in files if name.startswith('skills/')}) + if skills != ['ccxt']: + fail(f'openai: expected only the ccxt usage skill, found {skills}') + + +def build_openai(): + source = os.path.join(ROOT, 'chatgpt', 'ccxt') + plugin = json.loads(read(os.path.join(source, 'plugin.json'))) + plugin['extensions']['com.openai'].pop('apps', None) + plugin['description'] = CODING_SENTENCE.sub('', plugin['description']) + entries = [('plugin.json', (json.dumps(plugin, indent=2, ensure_ascii=False) + '\n').encode())] + entries.append(('README.md', read(os.path.join(ROOT, 'release', 'openai', 'README.md')))) + for path, name in files_under(source): + if name in ('plugin.json', 'README.md', '.app.json'): + continue + if name.startswith('skills/') and not name.startswith('skills/ccxt/'): + continue + entries.append((name, read(path))) + check_openai(entries) + return f'ccxt-openai-{plugin["version"]}.zip', entries + + +def build_claude(directory, label): + source = os.path.join(ROOT, 'claude', directory) + version = json.loads(read(os.path.join(source, '.claude-plugin', 'plugin.json')))['version'] + entries = [(name, read(path)) for path, name in files_under(source)] + return f'{label}-{version}.zip', entries + + +os.makedirs(OUT, exist_ok=True) +builds = [build_openai(), build_claude('ccxt', 'ccxt-claude'), build_claude('ccxt-local', 'ccxt-local-claude')] +if errors: + sys.exit(f'{len(errors)} problem(s); no ZIP written') +for name, entries in builds: + write_zip(os.path.join(OUT, name), entries) diff --git a/scripts/check-versions.py b/scripts/check-versions.py index ee9034a..d77e4dd 100644 --- a/scripts/check-versions.py +++ b/scripts/check-versions.py @@ -28,9 +28,10 @@ def version_tuple(version, where): return tuple(int(x) for x in match.groups()) -# Versions deliberately set back once, accepted even though they are lower than base's: the -# plugins were reset to 0.0.1 for their first directory submissions (Dec 2026). A later change -# must still raise the version above 0.0.1, so this allows nothing after the reset lands. +# Versions deliberately set back once, accepted even though they are not higher than base's: +# the plugins were reset to 0.0.1 for their first directory submissions (Dec 2026), and changes +# before that first release keep 0.0.1. Remove this once v0.0.1 is released; any change after +# it must raise the version again. RESETS = { 'claude/ccxt/.claude-plugin/plugin.json': '0.0.1', 'claude/ccxt-local/.claude-plugin/plugin.json': '0.0.1', @@ -48,8 +49,8 @@ def version_tuple(version, where): print(f'{directory}: new plugin') continue after = json.load(open(manifest)).get('version') - if RESETS.get(manifest) == after and version_tuple(after, manifest) < version_tuple(before, f'{base}:{manifest}'): - print(f'{directory}: {before} -> {after} (one-time reset)') + if RESETS.get(manifest) == after and version_tuple(after, manifest) <= version_tuple(before, f'{base}:{manifest}'): + print(f'{directory}: {before} -> {after} (kept at the first-release version)') continue if version_tuple(after, manifest) <= version_tuple(before, f'{base}:{manifest}'): print(f'::error file={manifest}::{directory} changed but its version stayed {after} ' diff --git a/scripts/schemas/agent-plugins-1.0.0-mcp.schema.json b/scripts/schemas/agent-plugins-1.0.0-mcp.schema.json new file mode 100644 index 0000000..a9139a4 --- /dev/null +++ b/scripts/schemas/agent-plugins-1.0.0-mcp.schema.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", + "title": "Agent Plugins MCP Configuration", + "description": "Machine-readable schema for mcp.json in Agent Plugins 1.0.0. The Agent Plugins specification defines additional semantic and operational requirements.", + "type": "object", + "properties": { + "$schema": { + "const": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", + "description": "Canonical identifier of the MCP configuration schema for the Agent Plugins version targeted by this document." + }, + "mcpServers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/server" + } + } + }, + "required": ["$schema", "mcpServers"], + "additionalProperties": false, + "$defs": { + "server": { + "title": "MCP server", + "oneOf": [ + { + "$ref": "#/$defs/stdioServer" + }, + { + "$ref": "#/$defs/streamableHttpServer" + }, + { + "$ref": "#/$defs/sseServer" + } + ] + }, + "stdioServer": { + "title": "stdio MCP server", + "type": "object", + "properties": { + "type": { + "const": "stdio" + }, + "command": { + "type": "string", + "minLength": 1, + "description": "Executable token. Resolution rules are defined by the Agent Plugins specification." + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "type": "object", + "propertyNames": { + "not": { + "enum": ["PLUGIN_ROOT", "PLUGIN_DATA"] + } + }, + "additionalProperties": { + "type": "string" + } + }, + "cwd": { + "type": "string", + "pattern": "^(?:\\./|\\$\\{PLUGIN_ROOT\\}(?:/|$)|\\$\\{PLUGIN_DATA\\}(?:/|$))", + "description": "Plugin-relative, PLUGIN_ROOT-rooted, or PLUGIN_DATA-rooted working directory. Filesystem containment is validated separately." + } + }, + "required": ["type", "command"], + "additionalProperties": false + }, + "streamableHttpServer": { + "title": "Streamable HTTP MCP server", + "type": "object", + "properties": { + "type": { + "const": "streamable-http" + }, + "url": { + "type": "string", + "minLength": 1, + "description": "MCP endpoint URL. URL semantics are defined by the Agent Plugins specification." + }, + "headers": { + "$ref": "#/$defs/headers" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "sseServer": { + "title": "Legacy HTTP+SSE MCP server", + "type": "object", + "properties": { + "type": { + "const": "sse" + }, + "url": { + "type": "string", + "minLength": 1, + "description": "MCP endpoint URL. URL semantics are defined by the Agent Plugins specification." + }, + "headers": { + "$ref": "#/$defs/headers" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "headers": { + "title": "HTTP headers", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } +} diff --git a/scripts/schemas/agent-plugins-1.0.0-plugin.schema.json b/scripts/schemas/agent-plugins-1.0.0-plugin.schema.json new file mode 100644 index 0000000..8fed0e1 --- /dev/null +++ b/scripts/schemas/agent-plugins-1.0.0-plugin.schema.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "title": "Agent Plugins Manifest", + "description": "Machine-readable schema for plugin.json in Agent Plugins 1.0.0. The Agent Plugins specification defines additional semantic and operational requirements.", + "type": "object", + "properties": { + "$schema": { + "const": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "description": "Canonical identifier of the plugin manifest schema for the Agent Plugins version targeted by this document." + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^(?!.*(?:--|\\.\\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$", + "description": "Human-readable plugin name." + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "homepage": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "license": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "extensions": { + "type": "object", + "description": "Client-specific manifest data keyed by reverse-domain extension namespace. Agent Plugins assigns no semantics to namespace object contents.", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["$schema", "name"], + "additionalProperties": false +}