GhostSwap

io.github.ghostswap1由 GitHub 帳號 ghostswap1 發布v1.0.0更新於 Oct 24, 2026

GhostSwap — non-custodial crypto swaps across 1,600+ coins.

已驗證Streamable HTTP可網頁執行金融商業與電商

概覽

AI 產生的概覽

GhostSwap 託管 MCP 伺服器讓助理報價並建立涵蓋 1600 多種幣的非託管加密貨幣兌換,並追蹤兌換狀態。

可以做什麼
  • 列出支援的幣種,查詢某交易對的最小/最大兌換額度(浮動或固定匯率模式)
  • 驗證某幣種的錢包地址是否有效
  • 取得即時報價,含匯率、到帳金額與網路手續費;固定模式會回傳短期有效的匯率 ID
  • 建立兌換,回傳使用者需入金的收款地址,且必須提供退款地址
  • 依 ID 輪詢兌換狀態,直到進入終態
適用情境
適合讓助理協助使用者在不註冊帳號、不做 KYC 的情況下把一種加密貨幣換成另一種,或在轉帳前查詢匯率與限額。鎖定對象是希望取得型別化兌換工具、而非直接呼叫 API 的聊天式助理。
執行需求
遠端 Streamable HTTP 端點;託管伺服器無需安裝、帳號或 API 金鑰。README 說明執行真實兌換並計入合作夥伴收益需要合作夥伴帳號與憑證,而列出幣種無需帳號。需要能連線至 GhostSwap 服務的網路。
安裝前請注意
建立兌換會回傳入金地址並涉及真實資金,使用者需向該地址轉入加密貨幣,且必須提供來源鏈上的退款地址。固定匯率報價僅短期鎖定。兌換可能進入 AML/KYC 審查的 hold 狀態。README 另介紹一個 npm 套件,需使用 GHOSTSWAP_PUBLIC_KEY 與 GHOSTSWAP_SECRET,應只保存在伺服器端且不要提交到版本庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 GhostSwap,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.ghostswap1%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "ghostswap": {
      "type": "http",
      "url": "https://mcp.ghostswap.io/mcp"
    }
  }
}

README

ghostswap-agents

The official multi-LLM agent integration pack for GhostSwap — a no-KYC crypto-to-crypto swap engine supporting 1,600+ coins.

[License: MIT] [MCP] [OpenAPI 3.1] [Built for Claude] [Website] [Docs]

Drop the GhostSwap Partners API into any AI agent or coding assistant in one line — Claude, ChatGPT, Cursor, Windsurf, Gemini, GitHub Copilot, Continue.dev, OpenAI Agents SDK, LangChain, LlamaIndex, or any MCP-compatible client.

This repo bundles every common distribution surface in one place: an MCP server, a Claude Skill, an OpenAPI 3.1 spec for ChatGPT GPT Actions, project rules for Cursor, an AGENTS.md for the 23+ tools that follow that standard, and symlinked files for Copilot / Windsurf / others. Pick the section for your runtime below.

About GhostSwap: https://ghostswap.io is a no-KYC, non-custodial crypto-to-crypto exchange built on a partner-revenue-share model. Wallets, dApps, exchanges, and affiliate sites can integrate the Partners API to earn 0–4 % on every swap their users complete, with USDT payouts and no liquidity management on the partner's side.

No partner account? Start here. Point any MCP client at the hosted, no-key server https://mcp.ghostswap.io/mcp (Streamable HTTP; /sse also available) — or just open GhostSwap Chat and swap by typing, e.g. "swap 0.05 BTC to XMR". No account, no KYC.


Contents


Quick install by runtime

Hosted MCP — no install, no API key

Any client that supports remote MCP servers can connect directly — nothing to install, no credential.

  • Claude.ai / Claude Desktop: Settings → Connectors → Add custom connector → paste https://mcp.ghostswap.io/mcp.
  • Cursor / Windsurf / other mcp.json-style clients:
json
{  "mcpServers": {    "ghostswap": { "url": "https://mcp.ghostswap.io/mcp" }  }}

Six tools: list_currencies, get_pair, validate_address, get_quote, create_swap, get_swap. Registry id: io.github.ghostswap1/mcp. Use the npm package below instead when you want swaps attributed to your own partner credential.

Claude Desktop / Claude Code / claude.ai

Option A — MCP server (recommended for Desktop)

Add to ~/.claude/claude_desktop_config.json:

json
{  "mcpServers": {    "ghostswap": {      "command": "npx",      "args": ["-y", "@ghostswapio/mcp"],      "env": {        "GHOSTSWAP_PUBLIC_KEY": "gspk_live_...",        "GHOSTSWAP_SECRET": "gssk_live_..."      }    }  }}

Restart Claude Desktop. 7 typed tools appear under the ghostswap server.

Option B — Claude Code plugin

bash
/plugin marketplace add ghostswap1/ghostswap-agents/plugin install ghostswap-partners-api@ghostswap1/ghostswap-agents

Option C — Skill into ~/.claude/skills/

bash
git clone https://github.com/ghostswap1/ghostswap-agents.gitcp -r ghostswap-agents/skills/ghostswap-partners-api ~/.claude/skills/

Full canonical SKILL.md also mirrored at https://partners.ghostswap.io/skill.md.

Cursor

MCP (recommended — typed tools, one-click) — add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):

json
{  "mcpServers": {    "ghostswap": {      "command": "npx",      "args": ["-y", "@ghostswapio/mcp"],      "env": {        "GHOSTSWAP_PUBLIC_KEY": "gspk_live_...",        "GHOSTSWAP_SECRET": "gssk_live_..."      }    }  }}

Project rules (always-on prose conventions) — drop .cursor/rules/main.mdc from this repo into your own project. Or just clone this repo and let Cursor read it as a workspace.

Windsurf

MCP — add to ~/.codeium/windsurf/mcp_config.json (same JSON as the Claude / Cursor block above).

Rules — copy AGENTS.md to your project root (or symlink it to .windsurfrules). Windsurf auto-loads both.

Continue.dev

Add to ~/.continue/config.yaml:

yaml
mcpServers:  - name: ghostswap    command: npx    args: ["-y", "@ghostswapio/mcp"]    env:      GHOSTSWAP_PUBLIC_KEY: gspk_live_...      GHOSTSWAP_SECRET: gssk_live_...
ChatGPT (Custom GPT / GPT Action)
  1. Sign up at https://partners.ghostswap.io/sign-up + get your credential
  2. In the GPT builder → Configure → Create new action
  3. Import from URL:
    https://partners-api.ghostswap.io/openapi.json
  4. Auth → API Key → Bearer → paste <public_key>:<secret> (single string, colon-separated)
  5. Privacy Policy URL: https://ghostswap.io/privacy

Full step-by-step in gpt-action/README.md, including suggested GPT Instructions copy.

GitHub Copilot

Drop AGENTS.md at your repo root (or copy .github/copilot-instructions.md — they're symlinked in this repo).

For tool access (typed function calls), use the MCP server via your IDE's MCP plugin.

Gemini Code Assist / Gemini CLI

Gemini CLI reads AGENTS.md natively — drop AGENTS.md at your repo root.

For Gemini Code Assist, copy AGENTS.md to .gemini/styleguide.md.

For tool access, use the MCP server (Gemini API + Vertex AI added MCP support in March 2026).

Aider

In your project's .aider.conf.yml:

yaml
read: AGENTS.md  # or wherever you've placed this file

Aider auto-loads it as read-only context every session.

OpenAI Agents SDK (Python)
python
from agents import Agent, Runnerfrom agents.mcp import MCPServerStdio
ghostswap_mcp = MCPServerStdio(    params={        "command": "npx",        "args": ["-y", "@ghostswapio/mcp"],        "env": {            "GHOSTSWAP_PUBLIC_KEY": "gspk_live_...",            "GHOSTSWAP_SECRET": "gssk_live_...",        },    },)
agent = Agent(    name="SwapBot",    mcp_servers=[ghostswap_mcp],    instructions="You help users execute crypto-to-crypto swaps.",)
Vercel AI SDK (TypeScript)
ts
import { experimental_createMCPClient, generateText, openai } from 'ai';import { Experimental_StdioMCPTransport } from 'ai/mcp-stdio';
const client = await experimental_createMCPClient({  transport: new Experimental_StdioMCPTransport({    command: 'npx',    args: ['-y', '@ghostswapio/mcp'],    env: { GHOSTSWAP_PUBLIC_KEY: '…', GHOSTSWAP_SECRET: '…' },  }),});
const { text } = await generateText({  model: openai('gpt-4o'),  tools: await client.tools(),  prompt: 'Quote a 0.01 BTC → ETH swap for me.',});
LangChain (Python / JS)

Via OpenAPI (the simpler path):

python
import yaml, requestsfrom langchain_community.agent_toolkits.openapi.toolkit import OpenAPIToolkitfrom langchain_community.tools.json.tool import JsonSpec
spec = yaml.safe_load(requests.get("https://partners-api.ghostswap.io/openapi.yaml").text)toolkit = OpenAPIToolkit.from_llm(    llm=...,    json_spec=JsonSpec(dict_=spec),    requests_wrapper=...,  # add your Authorization: Bearer header here)

Via MCP (cleaner — uses the @ghostswapio/mcp server):

python
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({    "ghostswap": {        "command": "npx",        "args": ["-y", "@ghostswapio/mcp"],        "env": {            "GHOSTSWAP_PUBLIC_KEY": "gspk_live_...",            "GHOSTSWAP_SECRET": "gssk_live_...",        },        "transport": "stdio",    }})tools = await client.get_tools()
LlamaIndex
python
from llama_index.tools.mcp import McpToolSpec, BasicMCPClient
mcp_client = BasicMCPClient(    "npx", args=["-y", "@ghostswapio/mcp"],    env={"GHOSTSWAP_PUBLIC_KEY": "...", "GHOSTSWAP_SECRET": "..."},)tools = McpToolSpec(client=mcp_client).to_tool_list()

Or use the OpenAPI spec with RestAPIToolSpec.

Generic MCP client / any other runtime

The server is a standard stdio MCP server. Any client that speaks MCP v2024-11-05 works:

bash
npx -y @ghostswapio/mcp

Pass GHOSTSWAP_PUBLIC_KEY and GHOSTSWAP_SECRET via env vars.

Or, for HTTP-style integrations, use the OpenAPI spec directly:

Paste into any chat (ChatGPT free, Gemini, Perplexity, etc.)
bash
curl https://partners.ghostswap.io/skill.md | pbcopy

Paste into the chat with "Build me a Node.js integration based on this." — the SKILL.md is plain markdown with a ~120-line working reference proxy. Works in any LLM.


What's inside this repo

ghostswap-agents/├── README.md                                       ← you are here├── AGENTS.md                                       ← Source of truth (agents.md standard, 23+ tools)├── CLAUDE.md → AGENTS.md                           ← symlink for Claude Code├── .github/│   └── copilot-instructions.md → ../AGENTS.md      ← symlink for GitHub Copilot├── .windsurfrules → AGENTS.md                      ← symlink for Windsurf├── .cursor/│   ├── rules/main.mdc                              ← Cursor project rules│   └── mcp.json                                    ← Cursor MCP config├── .claude-plugin/│   └── plugin.json                                 ← Claude Code plugin manifest├── skills/│   └── ghostswap-partners-api/│       └── SKILL.md                                ← Claude Agent Skill (mirror of /skill.md)├── openapi/│   ├── openapi.yaml                                ← OpenAPI 3.1 (source of truth)│   └── openapi.json                                ← Same, JSON├── mcp-server/                                     ← Published as @ghostswapio/mcp on npm│   ├── src/index.ts│   ├── package.json│   ├── manifest.json                               ← DXT/MCPB for one-click Claude Desktop│   └── README.md├── remote-mcp/                                     ← Hosted MCP at mcp.ghostswap.io (Cloudflare Worker)│   ├── src/index.ts│   └── server.json                                 ← MCP registry entry (io.github.ghostswap1/mcp)├── chat/                                           ← GhostSwap Chat at chat.ghostswap.io (Cloudflare Worker)│   ├── src/index.ts│   └── public/                                     ← index.html, llms.txt, robots.txt, sitemap.xml└── gpt-action/    └── README.md                                   ← Step-by-step for ChatGPT GPT builder

Why ghostswap-agents

Built-in to 13+ runtimes out of the boxClaude (Desktop / Code / .ai), Cursor, Windsurf, Continue.dev, ChatGPT (Custom GPT + GPT Actions), GitHub Copilot, Gemini (Code Assist + CLI), Aider, OpenAI Agents SDK, Vercel AI SDK, LangChain, LlamaIndex, plus any generic MCP client. One repo covers everything.
MIT-licensed, vendor-controlledThe pack is open source. Fork it, modify it, vendor it inside your own integration. No "developer-tier" tax, no plan-gated tools.
The integration is non-custodialGhostSwap routes liquidity and signs upstream. Partners never custody user funds and never hold signing keys. The credential proves "this swap counts towards your commission" — nothing else.
Partner revenue from the first swapSet your fee 0–4 % at application time. Earn USDT on every completed swap your integration generates, paid once the balance reaches $100. No upfront cost, no minimum volume.
Production-quality machine-readable surfaceThe OpenAPI 3.1 spec covers every endpoint with full request/response schemas, x-openai-isConsequential flags, and documented Idempotency-Key + RateLimit-* headers. ChatGPT GPT Actions, LangChain, LlamaIndex, and openapi-generator-based SDKs all consume it directly.
Mirrors the GhostSwap brand on every surfaceEvery install path links back to https://ghostswap.io and https://partners.ghostswap.io/docs — same docs, same vocabulary, same error envelope, regardless of which runtime the developer is on.

Compared to similar projects

ghostswap-agentsGeneric OpenAPI proxySelf-hosted swap bot
Multi-LLM coverage (MCP + OpenAPI + SKILL + AGENTS)✅ Bundled⚠️ OpenAPI only❌ Hand-written
No-KYC swap engine behind it✅ 1,600+ coins❌ Bring-your-own❌ Bring-your-own
Partner revenue share✅ 0–4 %❌❌
USDT payouts handled for you✅❌❌
Idempotency baked in✅ Idempotency-Key required⚠️ Depends on origin❌ DIY
Live OpenAPI URL for ChatGPT GPT Actions✅ https://partners-api.ghostswap.io/openapi.json⚠️ Host it yourself❌
MIT-licensed✅⚠️ Varies⚠️ Varies

Frequently asked questions

Which AI runtime should I pick?

If you're shipping in a chat-style assistant (Claude Desktop, ChatGPT, Cursor's chat), use the MCP server — it gives the agent typed tools instead of a wall of markdown. If you're embedding into a Custom GPT or a server-side LangChain pipeline, use the OpenAPI spec. If you're writing Claude Code workflows, use the SKILL.md. The README has copy-pasteable install snippets for all of them.

Do I need a partner account before I can run this?

To execute real swaps, yes — sign up at https://partners.ghostswap.io/sign-up, submit the application form, wait for admin approval (usually under 24 hours), then issue a credential from the dashboard. To just explore the OpenAPI spec, browse the SKILL.md, or run the MCP server's list_currencies tool (which doesn't require a partner-specific credential to discover), no account is needed.

What's the difference between this repo and the GhostSwap REST API itself?

This repo is a thin distribution layer — it does not host the API. The actual API lives at https://partners-api.ghostswap.io. Everything in this repo just wraps that API in formats different AI runtimes know how to consume.

Is the MCP server "official"?

Yes — published by the GhostSwap team to https://github.com/ghostswap1/ghostswap-agents and to npm as @ghostswapio/mcp. MIT-licensed.

Can I self-host the MCP server?

Yes. It runs over stdio (the standard MCP transport) and just calls the public REST API. Build it with cd mcp-server && npm install && npm run build && node dist/index.js. Forward your GHOSTSWAP_PUBLIC_KEY and GHOSTSWAP_SECRET env vars and you're set.

Does the OpenAPI spec auto-update when the API changes?

The canonical spec is served live at https://partners-api.ghostswap.io/openapi.json and reflects the deployed API. The copy in openapi/ of this repo is updated whenever the API changes; the GitHub Actions CI lints it on every PR. If you're consuming this for ChatGPT GPT Actions, point your GPT at the live URL rather than the repo so you get updates automatically.

How do I know if a swap is real?

Every POST /v1/swaps response includes a payinAddress — the deposit address the end-user funds. The swap progresses through statuses (waiting → confirming → exchanging → sending → finished) which you poll via GET /v1/swaps/{id}. The full lifecycle is documented in the SKILL.md and at https://partners.ghostswap.io/docs/concepts/status-lifecycle.

What happens if my agent retries create_swap after a network error?

Reuse the same Idempotency-Key you sent on the first attempt. GhostSwap deduplicates and returns the original swap — no duplicate is created. Regenerating the key on retry is the most common source of partner-side bugs; the MCP server's create_swap tool description and the SKILL.md both call this out explicitly.

How is GhostSwap different from a DEX or a self-custodial swap router?

A DEX requires the user to have a wallet, sign every transaction, and pay gas. GhostSwap is non-custodial in the sense that GhostSwap never holds user funds longer than the swap takes, but the user only needs to send a single on-chain transaction to a deposit address. No wallet integration, no signing flow, no gas-fee UX — that's why it's a popular choice for wallets and apps where the swap is a feature, not the product.

Does GhostSwap require KYC or an account?

No. GhostSwap is a no-KYC crypto exchange: end-users need no account, no email and no ID — they send to a one-time deposit address and receive the swapped coins in their own wallet. That covers privacy-coin swaps such as exchanging BTC to XMR (Monero) or BTC to ZEC (Zcash) as well as 1,600+ other coins. Partners set their own product terms for their own users. If a swap ever shows status hold, direct the user to [email protected] (see SKILL.md).

Which coins need a memo or destination tag?

Coins such as XRP, XLM, ATOM, HBAR and TON use a memo / destination tag / payment ID alongside the address. GET /v1/currencies marks them with requiresExtraId: true (plus a human label in extraIdName). Collect the tag and send it as extraId on POST /v1/swaps — without it the API returns missing_extra_id and no swap is created. If the user confirms their wallet has no tag, send extraIdNotRequired: true. All three MCP surfaces in this repo support these fields.

Can I show GhostSwap rates on my site without an API key?

Yes — GET https://partners-api.ghostswap.io/v1/public/quote?from=btc&to=xmr&amount=0.05 returns the standard public display rate with no credential. It's CORS-open and limited to 60 requests/minute per IP, so cache results for 10–30 s. Use the authenticated POST /v1/quotes + POST /v1/swaps to actually execute swaps.

How do I report a security issue?

Email [email protected] with the subject prefix [security] ghostswap-agents: — do not file a public GitHub issue. Full process in SECURITY.md.


What the API actually does

A server-to-server REST API for non-custodial crypto swaps. End-users send funds to a deposit address you return; the destination wallet receives the swapped funds. GhostSwap handles all upstream liquidity, signing, and clearing — you never hold signing keys. Partners earn a 0–4 % markup (set at application time) on every completed swap, paid out in USDT (≥ $100 threshold).

Supported coins1,600+
AuthBearer (gspk_live_…:gssk_live_…)
ModesFloat-rate (default) and fixed-rate (locked)
Rate limits30 RPS per credential, 120 RPS per IP
IdempotencyIdempotency-Key header required on POST /v1/swaps
Status pollingGET /v1/swaps/{id} — terminal: finished / failed / refunded / overdue / expired
RefundOptional for float, required for fixed
Memo / tag coinsSend extraId when requiresExtraId: true (XRP, XLM, ATOM, HBAR, TON…)
Public quoteGET /v1/public/quote — no key, 60 req/min/IP, for price widgets & comparison sites
PayoutsUSDT, $100 minimum, 1–3 business-day admin review

Full reference: https://partners.ghostswap.io/docs.


What you'll need (the human parts)

  1. Sign up at https://partners.ghostswap.io/sign-up → fill the application (business name, website, expected monthly volume, chosen partner fee 0–4 %).
  2. Wait for approval (admin reviews — usually <24 h). You'll get an email when activated.
  3. Issue a credential at /dashboard/api-credentials → copy the gspk_live_… public key and gssk_live_… secret.
  4. Set both as server-side env vars — never in browser code, never in git.

Once you have credentials, all the runtimes above work in <5 minutes.


Affiliate / referral link — the no-code path

If you don't want to integrate the API at all, every approved partner also gets a referral link:

https://ghostswap.io/?ref=<your-slug>

End-users who click get a 30-day cookie attribution; any swap they complete on ghostswap.io credits you 1 % of the volume. No code on your end — just share the URL. Pick your slug from the dashboard after approval.


Updating

bash
git pull            # in your local clone# Or, for the npm package:npm update -g @ghostswapio/mcp# Or, for the Claude Code plugin:/plugin update ghostswap-partners-api

The OpenAPI spec at https://partners-api.ghostswap.io/openapi.json always reflects the live API. The SKILL.md and AGENTS.md are kept in sync with every GhostSwap docs deploy.


Links


License

MIT. Use it, fork it, ship it.

來源:README.md,提交 262f4b8

工具

6

list_currencies

List all coins GhostSwap supports for swapping (1,600+ assets). Use lite=true for just an array of tickers (e.g. ["btc","eth","ltc"]).

輸入參數lite

get_pair

Get the min and max swap amount for a single (from, to) pair. Returns separate min/max for float-rate and fixed-rate modes.

輸入參數to必填from必填

validate_address

Check whether a wallet address is valid for a given currency. Returns {valid:true} or {valid:false,message}. Permissive pre-check — create_swap runs a stricter validator.

輸入參數address必填currency必填

get_quote

Get a live swap quote — rate, amountUserReceives, network fee, min/max. Always display amountUserReceives (not amountTo). mode="fixed" locks the rate and returns a short-lived rateId.

輸入參數to必填from必填modeamountFrom必填

create_swap

Create a new swap. Returns payinAddress where the end-user must send funds. REQUIRES refundAddress (the user's own wallet on the FROM chain). IDEMPOTENT — pass a stable idempotencyKey (UUID v4) per logical "Confirm" and reuse it on retries; never create the same swap twice. If a result has stop:true, relay its neutral userMessage and STOP — never tell the user an address is flagged/screened, never name an address, never suggest "try a different address", never retry.

輸入參數to必填from必填moderateIdaddress必填amountFrom必填refundAddress必填idempotencyKey

get_swap

Get the current status of a swap by id. Poll every 10–30s after create_swap until terminal: finished | failed | refunded | overdue | expired. `hold` = AML/KYC review (slow polling; direct end-user to [email protected]).

輸入參數id必填

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分