ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้ว
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Advan: Solana trading tools

โดย solaradexรุ่น 0.1.0i★ 0iบนเครื่องหรือคลาวด์
ชื่อใน registryio.github.solaradex/advan

วิธีติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Non-custodial Solana trading MCP: Jupiter quotes/swaps, token risk, portfolio. x402-paid.

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: บนเครื่องหรือคลาวด์
  • ช่องทาง (transport): stdio, Streamable HTTP
  • หมวด: บัญชี การเงิน และภาษี
  • ต้องใส่ค่าเหล่านี้: SOLANA_RPC_URL, JUPITER_API_KEY

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 4/4 · สิ่งที่คุณถามผ่านเซิร์ฟเวอร์ของผู้ทำ (advan.fly.dev)

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม · ตั้งครั้งเดียวที่ claude.ai หรือแอปบนคอม แล้วใช้ในแชตได้ · บัญชีฟรีเพิ่มได้ 1 ตัว

  1. เปิดหน้า Connectors ของ Claude

    CustomizeConnectors

    CustomizeConnectors1+ Add2https://…3Add4
  2. กด “+ Add” → “Add custom connector” แล้วกรอก 2 ช่องนี้

    คัดลอกจากที่นี่ไปวางในช่องชื่อเดียวกันบนหน้าจอของ Claude แล้วกด Continue

    Name · ชื่อAdvan: Solana trading tools
    Remote MCP server URL · ที่อยู่https://advan.fly.dev/mcp

    หัวข้อ Authentication ปล่อยตามที่ Claude ตรวจเจอ แล้วกด Add

  3. เปิดใช้ในแชต

    +ConnectorsAdvan: Solana trading tools

  4. ลองเลย

    ใช้ Advan: Solana trading tools บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ Advan: Solana trading tools หรือมีชื่อเครื่องมือของ Advan: Solana trading tools ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ ChatGPT ได้ เฉพาะแผนองค์กร

ใช้ได้กับ ChatGPT Business, Enterprise หรือ Edu บนเว็บ และแอดมินหรือเจ้าของ workspace ต้องเป็นคนเพิ่ม · ถ้าใช้ Free, Plus หรือ Pro: ChatGPT แผนของคุณยังต่อ MCP เองไม่ได้

  1. เปิดหน้าเพิ่ม MCP ของ ChatGPT บนเว็บ

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. กรอกชื่อและที่อยู่

    ใส่ชื่อ แล้ววางที่อยู่ใต้ Connection ติ๊กยอมรับคำเตือน แล้วกด Create as a plugin

    Name · ชื่อAdvan: Solana trading tools
    Connection · ที่อยู่https://advan.fly.dev/mcp
  3. เลือก Advan: Solana trading tools ในแชต

    เปิดแชตใหม่แล้วเลือก Advan: Solana trading tools จากรายการปลั๊กอินก่อนพิมพ์

  4. ลองเลย

    ใช้ Advan: Solana trading tools บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า ChatGPT บอกว่ากำลังใช้ Advan: Solana trading tools หรือมีชื่อเครื่องมือของ Advan: Solana trading tools ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ OpenAI เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Claude Code ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  2. วางคำสั่งนี้แล้วกด Enter

    claude mcp add --transport http advan https://advan.fly.dev/mcp
  3. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น Advan: Solana trading tools ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  4. ลองเลย

    ใช้ Advan: Solana trading tools บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ Advan: Solana trading tools หรือมีชื่อเครื่องมือของ Advan: Solana trading tools ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  2. เปิดแชตของ AI ใน Cursor โหมด Agent

  3. ลองเลย

    ใช้ Advan: Solana trading tools บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ Advan: Solana trading tools หรือมีชื่อเครื่องมือของ Advan: Solana trading tools ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  2. เปิดแชตของ AI ใน VS Code โหมด Agent

  3. ลองเลย

    ใช้ Advan: Solana trading tools บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ Advan: Solana trading tools หรือมีชื่อเครื่องมือของ Advan: Solana trading tools ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ที่อยู่สำหรับโปรแกรมที่ต่อผ่านเว็บ

ที่อยู่https://advan.fly.dev/mcp

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ Advan: Solana trading tools อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ต่อผ่านเว็บ

Claude Code

claude mcp add --transport http advan https://advan.fly.dev/mcp

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "advan": {
      "url": "https://advan.fly.dev/mcp"
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "advan": {
      "type": "http",
      "url": "https://advan.fly.dev/mcp"
    }
  }
}

ติดตั้งในเครื่อง

Claude Code

claude mcp add advan --env SOLANA_RPC_URL='ใส่ค่าของคุณ' --env JUPITER_API_KEY='ใส่ค่าของคุณ' -- npx -y advan-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "advan": {
      "command": "npx",
      "args": [
        "-y",
        "advan-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "ใส่ค่าของคุณ",
        "JUPITER_API_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "advan": {
      "command": "npx",
      "args": [
        "-y",
        "advan-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "ใส่ค่าของคุณ",
        "JUPITER_API_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "advan": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "advan-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "ใส่ค่าของคุณ",
        "JUPITER_API_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

ค่าที่ต้องใส่เอง

  • SOLANA_RPC_URL ความลับ จำเป็น env
    Solana RPC endpoint (mainnet)
  • JUPITER_API_KEY ความลับ env
    Jupiter API key (optional, raises rate limits)

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
60/สัปดาห์
licensei
ไม่ระบุ license
การเชื่อมต่อ
บนเครื่องหรือคลาวด์
ช่องทาง (transport)
stdio, streamable-http
รุ่นล่าสุดi
0.1.0
ส่งเข้า registryi
26 ต.ค. 2569
แก้โค้ดล่าสุดi
1 พ.ย. 2569
ผู้ทำ
solaradex
แพ็กเกจ
npm: advan-mcp
เว็บผู้ทำ
github.com
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ต่อผ่านคลาวด์ได้ใน

ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

ชื่อและคำอธิบายเครื่องมือตามที่ server ตอบมาเมื่อ 7 พ.ย. 2569 ผู้ทำเป็นคนเขียน ไม่ใช่เรา แสดงเป็นข้อความล้วน

  • get_quote

    Free Jupiter Swap API V2 quote (GET /swap/v2/order, no taker). Returns amounts, route, slippage, and referral fee fields. Does not return a transaction.

  • build_swap_tx

    Free. Returns an UNSIGNED base64 transaction for the taker wallet to sign. Advan never signs and never holds keys. Default (selfBroadcast false) keeps JupiterZ routes, which need Jupiter POST /swap/v2/execute to add the market-maker co-signature. Pass selfBroadcast true to exclud

  • token_risk

    Paid token risk report ($0.02 USDC via x402 exact on solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Combines RPC mint/freeze authority, Jupiter Tokens V2, and RugCheck. Ordinary MCP clients that cannot pay receive a payment-required error.

  • wallet_portfolio

    Paid wallet portfolio ($0.02 USDC via x402 exact). SOL plus SPL Token and Token-2022 balances, priced with Jupiter Price V3.

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 12 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub solaradex ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 10 วันที่ผ่านมา

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • ✓ ผ่าน

    endpoint ตอบ

    ตอบกลับใน 275 ms (HTTP 200)

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ไม่ต้องล็อกอิน

  • ✓ ผ่าน

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    อ่านคำอธิบายเครื่องมือ 4 ตัวแล้ว ไม่พบคำสั่งแอบแฝงถึง AI

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบด้วย Google เพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด บัญชี การเงิน และภาษีi

  • ดาวมากกว่า 0% ของอีก 3137 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 63% ของอีก 3137 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 3137 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Advan: Solana trading tools ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 4 จาก 4 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: SOLANA_RPC_URL, JUPITER_API_KEY

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

ได้ทั้งสองแบบ จะลงในเครื่องหรือต่อผ่านคลาวด์ก็ได้

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 10 วันที่ผ่านมา และส่งรุ่นล่าสุด (0.1.0) เข้า registry 17 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต่อผ่าน URL จึงใช้กับโปรแกรมที่รับ remote MCP ได้ เช่น ChatGPT แผน Business ขึ้นไป

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี CCXT, Finance Toolkit, AKQuant

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

CCXT

Official CCXT MCP server - Market data and trading across 100+ exchanges and prediction markets

โดย ccxtใช้กันมาก↓ 667/สัปดาห์★ 44.9Kอัปเดต 2 เดือนที่ผ่านมา

รันบนเครื่อง

Finance Toolkit

คำนวณตัวเลขทางการเงินกว่า 500 แบบจากงบการเงินดิบ

โดย JerBoumaใช้กันมาก↓ 15.6K/สัปดาห์★ 5.5Kอัปเดต เมื่อวานซืน

บนเครื่องหรือคลาวด์

AKQuant

Write and backtest trading strategies with AKQuant: API lookup, strategy checks, backtest runs

โดย akfamilyใช้กันมาก↓ 3.3K/สัปดาห์★ 2.6Kอัปเดต วันนี้

รันบนเครื่อง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Advan

Advan is an open-source MCP server and HTTP API that gives AI agents Solana trading tools. Quotes and unsigned swap transactions come from Jupiter Swap API V2. Token risk and wallet portfolio reads are paid with x402 (exact scheme, USDC).

The server is non-custodial. It never signs a transaction and it never loads a trading key. build_swap_tx returns an unsigned base64 transaction for the user's own wallet (taker) to sign. SOLANA_KEYPAIR_PATH is read only by scripts/e2e-devnet-x402.ts.

Package name: advan-mcp (unregistered on npm when this tree was created on 2026-10-25). Change the "name" field in package.json before publishing. The advan-mcp bin name can stay.

Fees

Fees (hosted endpoint): Swaps built through Advan include a 1.00% (100 bps) platform fee via Jupiter's referral program. Jupiter keeps 20% of that fee, so Advan nets 0.80%. The fee shows in every quote (platformFee) before you sign. token_risk and wallet_portfolio cost $0.02 USDC per call via x402 (Solana mainnet). Quotes are free. Non-custodial: you sign every transaction in your own wallet; Advan never holds keys or funds. Self-hosted copies charge nothing unless the operator sets their own fee.

Hosted endpoint

  • https://advan.fly.dev
  • Streamable HTTP MCP: https://advan.fly.dev/mcp

PUBLIC_BASE_URL is that origin. x402 resource URLs and Bazaar metadata use it, because Fly terminates TLS and the app would otherwise advertise http://.

Deploy steps are in docs/DEPLOY-FLY.md.

What you can call

ToolPriceWhat it does
get_quoteFreeJupiter GET /swap/v2/order without taker. Quote only.
build_swap_txFreeSame endpoint with taker. Unsigned transaction plus a submit hint.
token_riskX402_PRICE_USD (default $0.01)RPC mint/freeze authority, Jupiter Tokens V2, RugCheck summary, scored.
wallet_portfoliosamegetBalance + getTokenAccountsByOwner (Token and Token-2022), Jupiter Price V3.

Jupiter base URL is https://api.jup.ag (Swap API V2). lite-api.jup.ag is not used. An optional JUPITER_API_KEY is sent as x-api-key. Keyless access is about 0.5 requests per second; Jupiter returns HTTP 429 past that, and Advan retries those responses with backoff (up to three waits). Set JUPITER_API_KEY for production. A portal key is the limit you should run with once more than one agent is calling.

Fees you should expect

Jupiter referral. When JUPITER_REFERRAL_ACCOUNT is set, every order sends referralAccount and referralFee. The allowed range is 50–255 bps (default 50). Jupiter keeps 20% of that fee, so 50 bps charged to the user nets 40 bps to the referral partner, and it replaces Jupiter's usual 2–10 bps platform fee. Quotes will look more expensive than calling Jupiter with no referral.

Jupiter picks the fee mint (SOL, then stables, then LSTs, then other tokens). If the referral token account for that mint does not exist, the swap still succeeds and your fee is dropped. Advan checks every order response:

  • referralAccount matches the configured account
  • feeBps equals the configured fee when gasless is false
  • feeBps is at least the configured fee when gasless is true (gasless cost can add bps)
  • feeMint has a configured referral token account, and that account is the V2 associated token account of the referral account for the mint (allowOwnerOffCurve, under the mint's token program, Token or Token-2022). That is what initializeReferralTokenAccountV2 creates. A swapped account fails the check. A legacy referral_ata PDA is accepted only when that account already exists on-chain.
  • At startup Advan checks that each configured referral token account exists on SOLANA_RPC_URL. A missing V2 account is recorded. A wrong account, or a legacy PDA that does not exist, refuses to boot.

FEE_CHECK_MODE=fail (default) withholds the quote and the transaction when the fee itself is wrong. warn returns them with feeCheck.ok: false and logs a fee_check_failure event either way.

A token-to-token route can pick a feeMint you have not created an account for. REFERRAL_MISSING_MINT_MODE=requote (default) quotes that pair again without referralAccount / referralFee, returns the quote, and writes a referral_requote log line. fail refuses the swap. warn returns the original order with feeCheck.ok: false. Add the mint with REFERRAL_MINTS on npm run setup:referral if you want the fee on that pair.

Leave the account unset and orders are sent with no referral (a startup warning says so). JUPITER_REFERRAL_REQUIRED=true refuses to boot without the account and wSOL, USDC, and USDT token accounts.

x402. token_risk and wallet_portfolio use the exact scheme. The buyer pays USDC to X402_PAY_TO on X402_NETWORK. Default network is Solana devnet (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1) and devnet USDC 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU. Mainnet is solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp and USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. The recipient USDC token account must already exist (npm run setup:payto-ata).

@x402/evm is a dependency because @coinbase/cdp-sdk/x402 loads it. Advan registers only the Solana exact scheme.

Coinbase CDP is the primary facilitator when CDP_API_KEY_ID and CDP_API_KEY_SECRET are set. PayAI (https://facilitator.payai.network) is used when the CDP /supported probe fails, and it is the only facilitator when CDP keys are absent. Verify and settle are sent to the facilitator whose advertised extra.feePayer is on the payment requirements. An in-flight payment is not handed to the other facilitator: that fee payer would not match, and the settlement would fail. When CDP fails in a way that is safe to fail over, Advan marks it down and the next payment challenge is rebuilt with PayAI's fee payer. The next probe is scheduled for X402_CDP_RECOVERY_INTERVAL_MS after the failure (default 5 minutes), not on a timer that started at boot. A healthy /supported restores CDP as primary, reloads payment requirements, and writes a facilitator_recovered log line. If that reload fails or times out, Advan goes back to PayAI and reloads those requirements instead of leaving them empty. Every fee payer a facilitator has advertised is kept, so a rotated CDP fee payer still settles with CDP. GET /health reports cdp as primary, down, or unconfigured, and cdpNextProbeAt while it is down. A settle timeout or HTTP 5xx is not treated as a failover. Failed verifications are logged as x402_verification with the facilitator's reason. The 402 body and PAYMENT-REQUIRED error shown to the client say payment could not be verified.

MCP payment requirements, including the Solana blockhash, are built on every paid call. HTTP builds them per request. Both use X402_RPC_URL, which defaults from X402_NETWORK and is never SOLANA_RPC_URL.

CDP's published fee after the free tier is $0.001 per successful settlement. PayAI Solana mainnet exact is $0.00133. Devnet PayAI settlements are free. At startup Advan warns, or exits when X402_PRICE_GUARD=refuse, if the price is below X402_MIN_FEE_MULTIPLE (default 5) times the applicable fee. $0.01 is about 7.5× the PayAI mainnet fee. $0.005 is not.

get_quote and build_swap_tx are not gated.

Guards

Before a quote or transaction is returned:

  • requested slippageBps must be ≤ MAX_SLIPPAGE_BPS (default 300)
  • if the client omits slippage, Jupiter's RTSE value in the response must still be ≤ the max
  • amount must be ≤ MAX_INPUT_AMOUNT when that cap is set (base units). Unset prints a startup warning.
  • USD size (amount × Jupiter Price V3) must be ≤ MAX_TRADE_USD (default 1000). Set MAX_TRADE_USD=off to disable it. A missing price refuses the trade while the cap is on. Startup warns loudly if both caps are off.
  • absolute price impact must be ≤ MAX_PRICE_IMPACT_PCT (default 5). Jupiter's priceImpactPct is treated as a fraction

Swap signing

build_swap_tx defaults to the managed path (SWAP_SELF_BROADCAST_DEFAULT=false):

  • JupiterZ (RFQ) routes are allowed. They need the market maker's co-signature, which Jupiter adds during POST https://api.jup.ag/swap/v2/execute with { signedTransaction, requestId }.
  • The response includes submit.method: "jupiter", requestId, and coSignRequired when the router is jupiterz.
  • The transaction field is unsigned. Sign it with the taker wallet, then send it to /execute promptly (lastValidBlockHeight or expireAt).

Pass selfBroadcast: true (or set the env default) to send excludeRouters=jupiterz. The tool then rejects a signatureFeePayer other than the taker, and rejects a response that is still a JupiterZ route. The taker signs and broadcasts that transaction on their own RPC.

Install

Node.js 20 or newer.

npm install

npm run build cp .env.example .env

Stdio (Claude Desktop, Cursor, or npx after publish):

npm start

or, once published:

npx advan-mcp

HTTP (plain JSON and Streamable HTTP MCP on /mcp):

npm run start:http

listens on $HOST:$PORT, default 127.0.0.1:8787

Docker sets HOST=0.0.0.0. Set ADVAN_ALLOWED_HOSTS when you bind a public interface.

Docker:

docker build -t advan .

docker run --env-file .env -p 8787:8787 advan

The image default for USAGE_LOG_PATH is /data/usage.jsonl. The entrypoint starts as root, chowns /data to node (and creates /data when no volume is mounted), then su-exec runs the server as node. Mount a volume to keep the usage log:

docker run --env-file .env -p 8787:8787 -v advan-data:/data advan

A development .env copied from .env.example sets HOST=127.0.0.1, which hides the port from outside the container. For a published port, set HOST=0.0.0.0 in that env file or pass -e HOST=0.0.0.0. Fly sets HOST in fly.toml.

The image runs the HTTP server only. Referral setup scripts run from a checkout (npm install includes the Jupiter referral SDK as a dev dependency).

Claude Desktop and Cursor

Paid tools need an x402-aware client. Claude Desktop and Cursor will see a payment-required (or payments-unconfigured) error for token_risk and wallet_portfolio. Use them for get_quote and build_swap_tx, and use scripts/e2e-devnet-x402.ts or createx402MCPClient for paid tools.

Claude Desktop claude_desktop_config.json:

{

"mcpServers": { "advan": { "command": "node", "args": ["/absolute/path/to/advan/dist/index.js"], "env": { "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com", "JUPITER_API_KEY": "", "JUPITER_REFERRAL_ACCOUNT": "", "JUPITER_REFERRAL_FEE_BPS": "50", "JUPITER_REFERRAL_TOKEN_ACCOUNT_SOL": "", "JUPITER_REFERRAL_TOKEN_ACCOUNT_USDC": "", "JUPITER_REFERRAL_TOKEN_ACCOUNT_USDT": "", "MAX_SLIPPAGE_BPS": "300", "MAX_TRADE_USD": "1000", "X402_PAY_TO": "", "X402_PRICE_USD": "0.01", "X402_NETWORK": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", "CDP_API_KEY_ID": "", "CDP_API_KEY_SECRET": "" } } } }

Cursor .cursor/mcp.json uses the same mcpServers object. During development you can point command at npx with args ["tsx", "src/index.ts"] from the repo root.

HTTP API

POST bodies are JSON. Free routes return the tool result. Paid routes answer 402 with PAYMENT-REQUIRED until the client retries with PAYMENT-SIGNATURE (x402 V2). A browser without a wallet gets the facilitator paywall HTML; API clients that send Accept: application/json also get a JSON body from unpaidResponseBody.

MethodPathBody
GET/health—
GET/healthz—
GET/stats—

| POST | /v1/get_quote | `{ "inputMint",

ตัดมาแค่ช่วงต้น อ่านต่อใน repo