Universal Gas Framework MCP Server

Universal Gas Framework MCP Server

Enables AI agents to perform gasless cross-chain transactions by paying with supported tokens on one chain and executing on another, all without exposing private keys.

Category
访问服务器

README

Universal Gas Framework MCP Server

npm license

MCP server for Universal Gas Framework. Plug into any MCP-compatible AI host (Claude Desktop, Claude Code, Codex CLI, Gemini CLI, Cursor) and your agent gets typed tools for gasless cross-chain transactions.

What this unlocks

Your agent wants to send tokens on a chain where it has no native gas. Normally that's a dead end — you'd have to bridge or buy gas first. UGF removes that step.

Pay with what you already hold, route the transaction anywhere:

  • Stablecoins as gas — USDC, EURC, $U (United Stables), USDT
  • Native EVM coins as gas — ETH (on Ethereum / Base / Optimism / Arbitrum), BNB, MATIC, AVAX
  • Send to any supported destination — EVM chains, Solana (SOL + SPL), Sui (native + custom coins)
  • Cross-chain by default — pay USDC on Base, transaction executes on Sui. Pay $U on BNB, transaction executes on Solana.

The agent only needs balance on one supported chain. UGF prices the route, collects payment, and executes the destination action.

Custody

Private keys never reach this MCP server. The agent signs every payload locally (EIP-712 for x402, EIP-1559 for vault, ed25519 for Solana, Sui Ed25519 for Sui). The server only:

  1. Builds unsigned payloads
  2. Submits the agent's signed proofs
  3. Polls UGF gateway for route status

Verified by CI — private_key, mnemonic, secretKey, Keypair.fromSecretKey, new ethers.Wallet return zero hits in src/.

For UGF protocol details, gateway endpoints, and the value-to-action model, see universalgasframework.com. This README only covers the MCP server.


Install

The MCP server runs via npx. No global install needed.

npx -y @tychilabs/ugf-mcp@beta

That command launches it in stdio mode for an AI host. To inspect tools from a terminal:

npx -y @tychilabs/ugf-mcp@beta --tools
npx -y @tychilabs/ugf-mcp@beta --version
npx -y @tychilabs/ugf-mcp@beta --help

Requires Node 18+.


Wire into your MCP host

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "ugf": {
      "command": "npx",
      "args": ["-y", "@tychilabs/ugf-mcp@beta"]
    }
  }
}

Restart Claude Desktop. The 19 UGF tools become available to Claude.

Claude Code

claude mcp add ugf -- npx -y @tychilabs/ugf-mcp@beta

Codex CLI

~/.config/codex/config.json:

{
  "mcpServers": {
    "ugf": {
      "command": "npx",
      "args": ["-y", "@tychilabs/ugf-mcp@beta"]
    }
  }
}

Gemini CLI

~/.config/gemini-cli/settings.json → same shape under mcpServers.

Cursor / Windsurf / any stdio-MCP host

Use the same command: "npx", args: ["-y", "@tychilabs/ugf-mcp@beta"] pattern in whatever config file the host expects.


How this MCP works

┌──────────────────┐        stdio JSON-RPC        ┌──────────────────┐
│  YOUR AI HOST    │ ◄──────────────────────────► │  @tychilabs/     │
│  (Claude / etc.) │     tools/list, tools/call   │  ugf-mcp         │
└──────────────────┘                              └────────┬─────────┘
                                                           │ HTTPS
                                                           ▼
                                                  UGF gateway
                                                  RPC nodes (EVM/Sol/Sui)

The server is stateless and keyless. It:

  • discovers what coins/chains are payable (ugf_get_registry)
  • reads on-chain balances (ugf_check_balance)
  • prices a destination action as a UGF route (ugf_quote, ugf_smart_quote)
  • returns unsigned payment payloads or destination-prepared bytes
  • accepts your locally-produced signatures and submits proofs to UGF
  • polls route status

Signing happens in your agent, not here. This MCP never sees a private key, mnemonic, or password. That's the whole point.

Typical flow (3 steps)

1. quote      → ugf_smart_quote { payer_address, dest_chain_id, dest_chain_type, tx_object }
                returns ranked routes with digest + payment_amount

2. pay        → ugf_x402_build_typed_data  OR  ugf_vault_build_tx
                returns payload your agent signs LOCALLY
                then: ugf_x402_submit_signed  OR  ugf_vault_submit_signed

3. execute    → destination-side helpers for the chain family
                EVM: ugf_evm_wait_sponsorship → broadcast locally → ugf_evm_confirm_user_tx
                Sol: ugf_sol_wait_user_sig_message → sign locally → ugf_sol_submit_user_sig
                Sui: ugf_sui_wait_sponsor_bytes → sign locally → ugf_sui_execute_signed_block

Your agent's LLM orchestrates these calls. The MCP just executes each.


Tools (19)

Run npx -y @tychilabs/ugf-mcp@beta --tools for the live list. Summary:

Discovery

Tool Purpose
ugf_get_registry List every supported payment coin + chains + token/vault addresses.
ugf_check_balance Read on-chain balance for any EVM wallet/token/chain.

Auth

Tool Purpose
ugf_get_nonce Get the login nonce for a wallet address.
ugf_authenticate Submit address + nonce + locally-produced signature → JWT.
ugf_set_token Restore a cached JWT on a fresh session.

Quote

Tool Purpose
ugf_quote Explicit route — pick exact payment coin + chain.
ugf_smart_quote Auto-discover the cheapest viable route across the agent's balances.

Pay (self-custody — no signer required)

Tool Purpose
ugf_x402_build_typed_data Return ERC-3009 typed-data for x402 payment. Agent signs locally.
ugf_x402_submit_signed Submit the agent-produced x402 signature.
ugf_vault_build_tx Return unsigned EIP-1559 vault payment tx. Agent signs + broadcasts locally.
ugf_vault_submit_signed Submit the on-chain vault tx hash after the agent broadcasts.

Execute — EVM destination

Tool Purpose
ugf_evm_wait_sponsorship Wait until UGF has sponsored the destination side.
ugf_evm_confirm_user_tx Confirm the agent-broadcast destination tx hash back to UGF.

Execute — Solana destination

Tool Purpose
ugf_sol_wait_user_sig_message Wait for UGF's prepared Solana message bytes.
ugf_sol_submit_user_sig Submit the agent-produced ed25519 user signature.

Execute — Sui destination

Tool Purpose
ugf_sui_wait_sponsor_bytes Wait until UGF returns tx_bytes + sponsor_sig.
ugf_sui_execute_signed_block Broadcast the dual-signed (user + sponsor) Sui block via Sui RPC.

Status

Tool Purpose
ugf_check_status Single-shot status check for a route digest.
ugf_poll_status Poll until the route reaches a terminal state.

Environment variables

All optional. Public RPCs are used when not set.

Var Default Purpose
RPC_ETH https://eth.llamarpc.com Ethereum mainnet
RPC_OP https://mainnet.optimism.io Optimism
RPC_BNB https://bsc-dataseed.binance.org BNB chain
RPC_POLYGON https://polygon-rpc.com Polygon
RPC_OPBNB https://opbnb-mainnet-rpc.bnbchain.org opBNB
RPC_ARB https://arb1.arbitrum.io/rpc Arbitrum
RPC_AVAX https://api.avax.network/ext/bc/C/rpc Avalanche C-chain
RPC_BASE https://mainnet.base.org Base
SUI_RPC_URL https://fullnode.mainnet.sui.io:443 Sui mainnet

Where to set them

Per MCP host config (preferred) — pass through to the spawned process:

{
  "mcpServers": {
    "ugf": {
      "command": "npx",
      "args": ["-y", "@tychilabs/ugf-mcp@beta"],
      "env": {
        "RPC_BASE": "https://base-mainnet.g.alchemy.com/v2/<your-key>",
        "RPC_ETH": "https://eth-mainnet.g.alchemy.com/v2/<your-key>"
      }
    }
  }
}

Local .env.mcp — useful for development. Copy .env.example.env.mcp, fill in your keys, run the server in the same directory.


Security model

Layer What's here What's NOT here
MCP source reads + RPC calls + UGF SDK glue no key material, no ethers.Wallet, no Keypair.fromSecretKey, no mnemonic, no password
Wire protocol JSON-RPC over stdio no remote network listener — the host process pipes stdin/stdout
External calls UGF gateway + public RPCs no telemetry, no analytics, no third-party reporting

Verified by a CI grep guard — private_key, mnemonic, secretKey, Keypair.fromSecretKey, new ethers.Wallet must return zero hits in src/.

If you need a host-side wallet that signs for the agent automatically, that's a separate concern. This MCP server is the bridge — it expects a signing-capable client on the host.


Examples

List supported coins from your terminal

echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ugf_get_registry","arguments":{}}}' \
  | npx -y @tychilabs/ugf-mcp@beta

Inside Claude Desktop (after wiring config above)

Ask:

What UGF payment coins are available on Base?

Claude will call ugf_get_registry and answer.

What's my USDC balance on Base for address 0x...?

Claude calls ugf_check_balance.

Quote a payment of 0.01 USDC on BNB paying gas from my Base USDC. My payer address is 0x...

Claude calls ugf_smart_quote, returns ranked routes. To actually execute, your agent needs to sign — see "How this MCP works" above.


Troubleshooting

symptom likely cause fix
Provider did not return EIP-1559 fee data Payment chain is legacy gas (BNB, opBNB). Pay from an EIP-1559 chain (Base, Ethereum, etc.) until the upstream SDK ships legacy-tx support.
Payment chain X temporarily disabled BNB / opBNB blocked client-side for the same reason. Same workaround as above.
Authentication required from gateway Missing JWT. Call ugf_get_nonce → sign locally → ugf_authenticate. Cache the returned JWT.
got 0 after a vault broadcast Gateway indexer lag — the broadcast succeeded but gateway hadn't seen the block yet. Wait 5–10 seconds and resubmit. The agent orchestrator that ships in our binary product already retries with backoff.
Unsupported payment chain The chain ID you passed isn't in the registry. Call ugf_get_registry first to see what's supported.
MCP host can't see the tools npx didn't run / wrong path. Test in a terminal with npx -y @tychilabs/ugf-mcp@beta --tools.

Versioning

Follows semver. 1.0.0-beta.1 is the first publicly published version. Breaking changes during beta will bump to -beta.N+1. After ~1 week of stable mainnet usage with no incidents, promotes to 1.0.0.


License

MIT — see LICENSE.

Links

  • npm: https://www.npmjs.com/package/@tychilabs/ugf-mcp
  • repo: https://github.com/TychiWallet/ugf-mcp
  • issues: https://github.com/TychiWallet/ugf-mcp/issues
  • UGF docs (protocol, not this MCP): https://universalgasframework.com
  • UGF SDK: https://www.npmjs.com/package/@tychilabs/ugf-sdk
  • Anthropic MCP spec: https://modelcontextprotocol.io

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选