io.github.nedim1511/unclaimed-sol

编码与调试

by unclaimed-sol

扫描并找回你 Solana 钱包中休眠的 SOL,由 UnclaimedSOL 提供能力支持,适合清理闲置资产。

什么是 io.github.nedim1511/unclaimed-sol

扫描并找回你 Solana 钱包中休眠的 SOL,由 UnclaimedSOL 提供能力支持,适合清理闲置资产。

README

@unclaimed-sol/mcp

npm version npm downloads Node >=18 License: MIT

MCP server for UnclaimedSOL — scan and reclaim dormant SOL from Solana wallets directly from AI assistants like Claude, ChatGPT, and others that support the Model Context Protocol.

See also:

What it does

Solana wallets accumulate rent-locked SOL in dormant token accounts (zero-balance ATAs) and program buffer accounts. This MCP server lets AI assistants:

  • Scan any wallet to check for reclaimable SOL
  • Claim (Vibe Claiming) — burn worthless token balances, close dormant accounts, and reclaim the rent SOL. Signs and broadcasts transactions locally via the UnclaimedSOL on-chain program. A 5% service fee applies.
  • Claim rewards — claim uncollected DeFi rewards (cashback, creator fees, etc.). 15% fee.
  • Claim stakes — claim SOL from deactivated stake accounts. 10% fee.

Tools

scan_claimable_sol

Check how much SOL a wallet can reclaim. Read-only — no transactions, no keypair needed.

Input: wallet_address (base58 public key; optional in claim-enabled mode, defaults to configured keypair wallet)

claim_sol

Claim reclaimable SOL. Requires a configured keypair. Uses a two-step flow:

  1. Dry run (default) — shows a breakdown of reclaimable accounts, estimated SOL, fee, and transaction count. Returns a one-time execution_token valid for 60 seconds.
  2. Execute — call again with dry_run: false and the execution_token to sign and broadcast.

Inputs: wallet_address (optional in claim-enabled mode, defaults to configured keypair wallet), dry_run (default true), execution_token, max_transactions (default 10), exclude (optional token symbols/names to skip on execute)

This action is irreversible — closed accounts cannot be recovered.

claim_rewards

Claim uncollected DeFi rewards (cashback, creator fees, and more). Requires a configured keypair. Uses the same two-step dry-run/execute flow as claim_sol. A 15% service fee applies.

Inputs: wallet_address (optional in claim-enabled mode, defaults to configured keypair wallet), dry_run (default true), execution_token

claim_stakes

Claim SOL from deactivated stake accounts. Requires a configured keypair. Uses the same two-step dry-run/execute flow. Optionally pass specific stake account addresses to claim.

Inputs: wallet_address (optional in claim-enabled mode, defaults to configured keypair wallet), dry_run (default true), execution_token, stake_accounts (optional array)

Example prompts

  • "Scan my wallet for reclaimable SOL"
  • "How much SOL can I reclaim?"
  • "Do a dry run to see what I can claim"
  • "Claim my dormant token accounts"
  • "Claim rewards for my wallet"
  • "Claim my deactivated stakes"
  • "How much SOL can I reclaim from <wallet_address>?"
  • "Scan <wallet_address> for reclaimable SOL"

Setup

Prerequisites

  • Node.js 18+
  • npm

Quick install (recommended)

No clone/build required if your MCP client supports package commands:

bash
npx -y @unclaimed-sol/mcp

Install and build (alternative)

bash
git clone https://github.com/unclaimed-sol/unclaimed-sol-mcp.git && cd unclaimed-sol-mcp
npm install
npm run build

Configuration

Vibe Claiming mode (recommended)

All tools are exposed (scan_claimable_sol, claim_sol, claim_rewards, claim_stakes). Transactions are signed locally with your keypair and broadcast to the Solana network.

For Claude Desktop / Cursor / Windsurf

Using npm package (recommended):

json
{
  "mcpServers": {
    "unclaimed-sol": {
      "command": "npx",
      "args": ["-y", "@unclaimed-sol/mcp"],
      "env": {
        "SOLANA_KEYPAIR_PATH": "~/.config/solana/id.json",
        "SOLANA_RPC_URL": "https://your-rpc-provider.com"
      }
    }
  }
}

Using local build:

json
{
  "mcpServers": {
    "unclaimed-sol": {
      "command": "node",
      "args": ["/absolute/path/to/unclaimed-sol-mcp/dist/index.js"],
      "env": {
        "SOLANA_KEYPAIR_PATH": "~/.config/solana/id.json",
        "SOLANA_RPC_URL": "https://your-rpc-provider.com"
      }
    }
  }
}

For Claude Code

Using npm package (recommended):

bash
claude mcp add unclaimed-sol \
  -e SOLANA_KEYPAIR_PATH=~/.config/solana/id.json \
  -e SOLANA_RPC_URL=https://your-rpc-provider.com \
  -- npx -y @unclaimed-sol/mcp

Using local build:

bash
claude mcp add unclaimed-sol \
  -e SOLANA_KEYPAIR_PATH=~/.config/solana/id.json \
  -e SOLANA_RPC_URL=https://your-rpc-provider.com \
  -- node /absolute/path/to/unclaimed-sol-mcp/dist/index.js

For Codex CLI

Using npm package (recommended):

bash
codex mcp add unclaimed-sol \
  --env SOLANA_KEYPAIR_PATH=~/.config/solana/id.json \
  --env SOLANA_RPC_URL=https://your-rpc-provider.com \
  -- npx -y @unclaimed-sol/mcp

Using local build:

bash
codex mcp add unclaimed-sol \
  --env SOLANA_KEYPAIR_PATH=~/.config/solana/id.json \
  --env SOLANA_RPC_URL=https://your-rpc-provider.com \
  -- node /absolute/path/to/unclaimed-sol-mcp/dist/index.js

Optional scan-only mode (no keypair)

Only the scan_claimable_sol tool is exposed. No transactions are signed or sent.

Using npm package:

json
{
  "mcpServers": {
    "unclaimed-sol": {
      "command": "npx",
      "args": ["-y", "@unclaimed-sol/mcp"]
    }
  }
}

Using local build:

json
{
  "mcpServers": {
    "unclaimed-sol": {
      "command": "node",
      "args": ["/absolute/path/to/unclaimed-sol-mcp/dist/index.js"]
    }
  }
}

Verify installation

  • Claude Code: claude mcp list and confirm unclaimed-sol is present.
  • Codex CLI: codex mcp list and confirm unclaimed-sol is present.
  • Smoke test: ask your assistant to run scan wallet <your_wallet> and confirm scan_claimable_sol executes.

Troubleshooting

  • If tools do not appear, restart your MCP client after config changes.
  • If using local build, ensure dist/index.js exists (npm run build) and path is absolute.
  • If claim tools are missing, confirm SOLANA_KEYPAIR_PATH (or SOLANA_PRIVATE_KEY) is set.

Environment variables

VariableRequiredDescription
UNCLAIMED_SOL_API_URLNoBackend API URL. Defaults to https://unclaimedsol.com.
UNCLAIMED_SOL_API_KEYNoAPI key sent as Authorization: Bearer header.
SOLANA_KEYPAIR_PATHNoPath to Solana keypair JSON file. Enables Vibe Claiming.
SOLANA_PRIVATE_KEYNoPrivate key as base58 string or JSON byte array. Use SOLANA_KEYPAIR_PATH instead when possible.
SOLANA_RPC_URLNoSolana RPC endpoint. Defaults to https://api.mainnet-beta.solana.com. A dedicated RPC is recommended for claiming.
SOLANA_PRIORITY_FEENoPriority fee in microlamports per compute unit. Default: 1,000. Max: 200,000.

Security

  • HTTPS enforced — Claim mode requires HTTPS for the API URL (HTTP only allowed for localhost).
  • API URL allowlist — Claim mode only connects to unclaimedsol.com, localhost, or 127.0.0.1.
  • Pre-sign validation — Every transaction is validated before signing: program allowlist, exact instruction account layouts pinned to locally-derived PDAs, fee cap enforcement, and per-transaction claim requirement. For stakes, fee caps are derived from proven on-chain withdraw amounts. For rewards, fee caps are cross-checked against an independent scan (see trust model below).
  • Execution tokens — Claims require a dry run first. Tokens are single-use, single-wallet, and expire in 60 seconds.
  • Keypair stays local — Your private key never leaves your machine. Transactions are signed locally.
  • Safety filtering — Token accounts are filtered server-side (maxClaimMode: false) to exclude valuable tokens and NFTs. Frozen accounts are skipped.
  • Request timeouts — All API calls have a 15-second timeout.

How claiming works

Token/buffer claims (claim_sol)

  1. The MCP server calls the UnclaimedSOL backend to fetch reclaimable token and buffer accounts.
  2. Instructions are built using the @unclaimedsol/spl-burn-close-sdk — token balances are burned and accounts are closed via the UnclaimedSOL on-chain program.
  3. Transactions are signed locally with your keypair and broadcast to the Solana network.
  4. A 5% service fee is collected on-chain by the program. No funds pass through the MCP server.

Rewards claims (claim_rewards)

  1. The backend builds unsigned transactions containing DeFi reward claim instructions and a fee transfer.
  2. The MCP validates every instruction: exact account layouts, discriminators, and locally-derived PDAs. Fee is capped at 15% of an independently-scanned reward total.
  3. Transactions are signed locally and broadcast.

Stake claims (claim_stakes)

  1. The backend builds unsigned transactions containing Stake Withdraw instructions and a fee transfer.
  2. The MCP validates every instruction: withdraw-only, exact account counts, and fee capped at 10% of proven withdraw amounts extracted from instruction data.
  3. Transactions are signed locally and broadcast.

Validator trust model

The pre-sign validator (validateTransactionPrograms) provides different levels of protection depending on the claim type:

  • claim_sol — Instructions are built locally using the SDK. The validator checks program IDs and fee vault presence.
  • claim_stakesFull value-level safety. Withdraw amounts are proven from Stake instruction data. The fee cap is locally derived and does not depend on any backend-reported value.
  • claim_rewardsStructural safety. DeFi reward claim amounts are determined on-chain at execution time and are not encoded in instruction data. The fee cap is cross-checked against an independent /scan call, which protects against accidental drift between backend endpoints but not against a fully compromised backend.

In all cases: instruction shapes are pinned exactly (every account position verified against locally-derived PDAs, exact account counts, known discriminators only).

Project structure

code
src/
  index.ts              MCP server entry point (stdio transport)
  constants.ts          Program IDs, fee vault, fee caps, batching limits
  config.ts             Environment variable loading and validation
  validation.ts         Wallet address validation
  formatter.ts          SOL display formatting
  cache.ts              In-memory scan cache (60s TTL)
  execution-token-store.ts  Generic two-step dry-run/execute token management
  tools/
    scan.ts             scan_claimable_sol tool handler
    claim.ts            claim_sol tool handler (tokens + buffers)
    claim-rewards.ts    claim_rewards tool handler (DeFi rewards)
    claim-stakes.ts     claim_stakes tool handler (deactivated stakes)
  services/
    scanner.ts          Backend API client (scan, tokens, buffers, rewards, stakes)
    transaction.ts      Transaction building + pre-sign validation
    signer.ts           Batch sign, send, confirm with retry

License

MIT

常见问题

io.github.nedim1511/unclaimed-sol 是什么?

扫描并找回你 Solana 钱包中休眠的 SOL,由 UnclaimedSOL 提供能力支持,适合清理闲置资产。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描114.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描114.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描114.1k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.4k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.3k

评论