mcpField
R
RugShield 402

RugShield 402

远程服务
rugshield-402.onrender.com安全2今天更新

关于 RugShield 402

RugShield 402 是用于筛查 Base 和 EVM 网络代币及 DEX 风险的开源 MCP 服务,提供交换模拟、蜜罐检测、流动性锁定分析和持有者集群识别。

主要功能

  1. 01模拟交易前交换
  2. 02检测蜜罐与转账限制
  3. 03计算精确转账税率
  4. 04分析池流动性与锁定状态
  5. 05检测持有者集群

适用场景

  1. 01交换前筛查代币
  2. 02检查买入与卖出税率
  3. 03评估 DEX 流动性和 LP 锁定
  4. 04审查持有者集中风险

MCP 相关

该服务通过 stdio 或 streamable HTTP 向 MCP 客户端提供四种代币安全工具:交易前扫描、蜜罐检查、流动性验证和持有者集群检测。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://rugshield-402.onrender.com/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

工具

6
参数类型必填说明
token_addressstring是Base 上目标 ERC-20 合约地址(0x...)

详细介绍

RugShield 402 🛡️ — 面向 DEX 安全与蜜罐检测的开源 MCP 服务

许可证:MIT MCP 标准 TypeScript Base 主网 x402 协议 Glama

此代码库包含 RugShield 402 的完整开源模型上下文协议(MCP)服务实现。它为大模型、自主交易 Agent 和 IDE(Claude Desktop、Cursor、Windsurf)提供工具,用于模拟代币买卖、分析蜜罐陷阱、计算精确的转账税率,以及验证 Base 和 EVM 网络上的 DEX 流动性深度。


🛠️ 已实现的 MCP 工具

此 MCP 服务通过标准的 stdio 和可流式传输的 HTTP 传输提供以下工具:

工具名称描述关键参数
rugshield_pre_swap_scan全面的交易前兑换模拟:检测蜜罐、恶意转账限额和流动性抽离陷阱。token_address(字符串,42 位十六进制),simulate_sell(布尔值,默认值:true)
check_honeypot反编译代币字节码,并通过 Base RPC 执行买入/卖出测试。返回精确的买入/卖出税率(以基点表示,bps)、黑名单检查结果和风险评分。token_address(字符串,42 位十六进制)
verify_liquidity_lock分析 DEX 池储备(Uniswap v3、Aerodrome)、LP 代币锁定状态、联合曲线状态以及总 USD 流动性深度。token_address(字符串,42 位十六进制)
detect_holder_clusters映射代币最大持有者的分布,检测 Sybil 钱包集群,并计算开发者持仓集中度风险。token_address(字符串,42 位十六进制)

🚀 从源代码运行(本地 Stdio 传输)

你可以使用 Node.js 和模型上下文协议 SDK,在本机从源代码运行此 MCP 服务。

1. 安装与构建
# Clone the open-source repository
git clone https://github.com/ak10082247-max/rugshield-402.git
cd rugshield-402

# Install dependencies
npm install

# Build the TypeScript source code
npm run build
2. 配置 Claude Desktop

将此服务添加到你的 claude_desktop_config.json:

  • macOS:~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows:%APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "rugshield-402": {
      "command": "node",
      "args": [
        "/absolute/path/to/rugshield-402/dist/mcp/server.js"
      ]
    }
  }
}

或者在开发期间使用 tsx 直接运行,无需构建:

{
  "mcpServers": {
    "rugshield-402": {
      "command": "npx",
      "args": [
        "-y",
        "tsx",
        "/absolute/path/to/rugshield-402/src/mcp/server.ts"
      ]
    }
  }
}
3. 配置 Cursor 或 Windsurf

将其添加到工作区的 .cursor/mcp.json 或 Windsurf MCP 设置中:

{
  "mcpServers": {
    "rugshield-402": {
      "command": "node",
      "args": ["dist/mcp/server.js"]
    }
  }
}

🌐 连接托管的远程 MCP 端点

如果你希望连接托管的云实例,无需本地依赖,RugShield 已部署在高可用云基础设施上,可全天候运行:

  • 远程 MCP URL:https://rugshield-402.onrender.com/mcp
  • 协议:模型上下文协议(可流式传输的 HTTP/SSE JSON-RPC 2.0)
  • 发现清单:https://rugshield-402.onrender.com/.well-known/mcp/server-card.json
  • x402 清单:https://rugshield-402.onrender.com/.well-known/x402.json

🏛️ 模拟引擎架构

sequenceDiagram
    autonumber
    actor LLM as Claude / Agent / Cursor
    participant MCP as RugShield MCP Server (Local / Remote)
    participant Simulator as EVM Bytecode Simulator
    participant Base as Base Mainnet RPC
    participant DEX as Aerodrome / Uniswap v3

    LLM->>MCP: tools/call ("rugshield_pre_swap_scan", { token_address })
    MCP->>Simulator: Fork State & Simulate Buy/Sell
    Simulator->>Base: Fetch Bytecode, Balances & Storage Slots
    Simulator->>DEX: Simulate Swap on Liquidity Pool
    Simulator-->>MCP: Honeypot Verdict, Tax Rates, Risk Score
    MCP-->>LLM: Structured JSON Analysis & Safety Attestation

📦 开发者 SDK 与框架集成

RugShield 已为自动化多 Agent 框架打包,支持 100% 免 Gas 的自主支付结算(无需 $0 ETH / $0 SOL):

1. 自主 Agent 自动支付快速入门(TypeScript)

使用 @x402/fetch 封装标准的 fetch,自动处理 HTTP 402 挑战,在 Base 上签署 EIP-712 转账授权,并在 15ms 内重试:

npm install @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:8453", new ExactEvmScheme(account));

// 1-line wrapper automatically signs & unlocks full 100% honeypot simulation
const xFetch = wrapFetchWithPayment(fetch, client);
const res = await xFetch("https://rugshield-402.onrender.com/v1/scan", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ token_address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", simulate_sell: true }),
});
const report = await res.json();
console.log("Full Verified Analysis:", report);
2. 自主 Agent 自动付款快速入门(Python)

使用内置的 Python 客户端(sdk/python/rugshield.py):

from rugshield import RugShieldClient

# Pass your agent wallet private key - automatically handles 402 challenges & EIP-712 signing
client = RugShieldClient(private_key="0xYOUR_AGENT_PRIVATE_KEY")
report = client.scan_token("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913")

print(f"Honeypot: {report.get('is_honeypot')}")
print(f"Exact Sell Tax: {report.get('sell_tax_bps')} bps")
3. ElizaOS 自主 Agent 插件
npm install @kurox_real/plugin-rugshield-402
import { rugshieldPlugin } from "@kurox_real/plugin-rugshield-402";

export const character = {
  name: "AutonomousDeFiTrader",
  plugins: [rugshieldPlugin],
};
4. Coinbase AgentKit(LangChain / Python / TS)
npm install @kurox_real/agentkit-rugshield-402
import { rugshieldActionProvider } from "@kurox_real/agentkit-rugshield-402";
import { AgentKit } from "@coinbase/agentkit";

const agentKit = await AgentKit.from({
  actionProviders: [rugshieldActionProvider()],
});
5. 直接 REST API(cURL)
# Returns 402 with structured 50% free preview + unlock instructions:
curl -X POST https://rugshield-402.onrender.com/v1/scan \
  -H "Content-Type: application/json" \
  -d '{"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "simulate_sell": true}'

💳 可选云订阅(MCPize / Apify)

对于希望使用开箱即用的托管基础设施,并按月通过信用卡支付固定费用,而非自行托管的团队:


📄 许可证

这个开源项目采用 MIT 许可证授权,详情请参阅 LICENSE 文件。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。