npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gate-plugin-wallet-mcp

v1.0.1

Published

Gate Wallet MCP Relay Server - Connect AI tools (Cursor, Claude) to Gate Wallet browser extension for Web3 signing, supporting EVM and Solana chains.

Readme

Gate Wallet MCP Relay Server

将 AI 工具(Cursor、Claude 等)连接到 Gate Wallet 浏览器扩展,支持 EVM 和 Solana 链上签名与交互。

架构

AI 工具 (Cursor / Claude)
    ↕  MCP Streamable HTTP
Gate Wallet MCP Relay Server(本项目)
    ↕  WebSocket 长连接
Gate Wallet 浏览器扩展

Relay Server 通过 MCP 协议对外暴露工具,内部通过 WebSocket 将请求转发给 Gate Wallet 扩展完成签名。

支持的工具

EVM

| 工具 | 说明 | |------|------| | connect_wallet | 连接 Gate Wallet,获取用户授权和账户地址 | | get_accounts | 获取已连接的钱包账户地址列表 | | get_chain_id | 获取当前连接的区块链网络 Chain ID | | get_balance | 查询指定地址的原生代币余额(wei) | | sign_message | 使用钱包对消息进行签名(personal_sign) | | send_transaction | 构造并发送一笔交易 | | estimate_gas | 估算交易所需 Gas | | erc20_transfer | 发送 ERC-20 代币转账(如 USDT、USDC) | | switch_chain | 切换钱包当前连接的区块链网络 | | get_transaction_receipt | 查询交易的执行结果和状态 | | wallet_status | 检查 Gate Wallet 扩展的连接状态 |

Solana

| 工具 | 说明 | |------|------| | sol_connect_wallet | 连接 Gate Wallet 的 Solana 账户 | | sol_get_accounts | 获取已连接的 Solana 钱包地址 | | sol_get_balance | 查询 SOL 余额 | | sol_sign_message | 使用 Solana 钱包对消息进行签名 | | sol_sign_transaction | 对 Solana 交易进行签名(不发送) | | sol_sign_and_send_transaction | 签名并广播 Solana 交易 | | sol_transfer | 发送 SOL 转账 | | sol_spl_transfer | 发送 SPL 代币转账(如 USDT、USDC) |

快速开始

前置要求

安装与运行

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 构建
pnpm build

# 生产模式
pnpm start

Docker

docker build -t gate-wallet-mcp .
docker run -p 3282:3282 gate-wallet-mcp

配置

环境变量

| 变量 | 默认值 | 说明 | |------|--------|------| | PORT | 3282 | HTTP 服务监听端口 |

端点

| 端点 | 方法 | 说明 | |------|------|------| | /mcp | ALL | MCP Streamable HTTP(AI 工具连接) | | /bridge | WebSocket | 浏览器扩展 WebSocket 连接 | | /health | GET | 健康检查 |

在 Cursor 中使用

在 Cursor 的 MCP 配置中添加:

{
  "mcpServers": {
    "gate-wallet-plugin": {
      "url": "http://localhost:3282/mcp?token=<your-token>"
    }
  }
}

Gate Wallet 扩展需连接到:

ws://localhost:3282/bridge?token=<your-token>

token 用于关联 AI 工具与浏览器扩展的会话,两端需使用相同的 token。

认证

  • MCP 端:通过 URL 参数 ?token=<your-token>Authorization: Bearer <token> 请求头传递
  • WebSocket 端:通过 URL 参数 ?token=<your-token> 传递

项目结构

src/
├── index.ts              # 入口:Express HTTP + WebSocket 服务
├── relay-bridge.ts       # WebSocket 桥接层,管理扩展连接与消息转发
└── relay-mcp-server.ts   # MCP Server 实现,注册工具并转发至桥接层

技术栈

License

MIT