# Web3 Transaction & Multichain Address Guard MCP (`shulang-chen/web3-tx-guard-mcp`) Actor

Deterministic MCP server for 8-chain crypto address checksum verification, EVM calldata & Permit2 drain detection, and EIP-712 blind-signature auditing.

- **URL**: https://apify.com/shulang-chen/web3-tx-guard-mcp.md
- **Developed by:** [Shulang Chen](https://apify.com/shulang-chen) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Web3 Tx Guard MCP (`web3-tx-guard-mcp`)

> **CI: Passing (Ubuntu + Windows)** · **Node.js >= 20** · **MCP: stdio | Streamable HTTP | SSE** · **x402: Base USDC (`$0.01`/call)** · **License: MIT**

**Deterministic Pre-Flight Transaction, Calldata & EIP-712 Signature Security Guard for Web3, DeFi & Treasury AI Agents**

AI agents holding `USDC`, `ETH`, `SOL`, `BTC`, `USDT`, or `TON` wallets face irreversible loss from a single corrupted checksum character, TON `EQ` vs `UQ` bounce trap, off-curve Solana PDA confusion, `MAX_UINT256` / `Permit2` unlimited token approval, `amountOutMin == 0` MEV sandwich swap, or `Seaport` zero-consideration blind signature. **`web3-tx-guard-mcp`** provides sub-5ms, 100% deterministic cryptographic verification with **zero external RPC or LLM API dependencies**:

### Tools

- `validate_multichain_address` (`$0.01 USDC` / call): Cryptographically validates and normalizes addresses across **8 ecosystems**:
  - **EVM** (`Ethereum`, `Base`, `Arbitrum`, `Polygon`, `Optimism`, `BNB`, `Avalanche`): Pure Keccak-256 **EIP-55** mixed-case checksum verification (blocks character typos, normalizes unchecksummed lowercase/uppercase, flags `0x000...000` / `0x...dEaD` / `0x01..0x0f` precompile burn traps).
  - **Tron** (`TRC-20`): `T...` SHA-256d Base58Check (`0x41` mainnet / `0xa0` testnet), outputs equivalent `0x...` EVM address, blocks `T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb` burn address.
  - **Bitcoin**: BIP-173 **Bech32** (`bc1q` SegWit v0 `P2WPKH`/`P2WSH`), BIP-350 **Bech32m** (`bc1p` Taproot v1 `P2TR`), and Legacy/P2SH Base58Check (`1...`, `3...`) with strict witness-version encoding enforcement.
  - **Solana**: Base58 32-byte decode + mathematical **Ed25519 Twisted Edwards curve check** ($p = 2^{255}-19$) distinguishing user wallet public keys (`isOnEd25519Curve: true`) from off-curve **Program Derived Addresses (`PDA`)** and System/Incinerator burn IDs.
  - **TON**: Friendly `EQ...` / `UQ...` / `kQ...` / `0Q...` **CRC16-XMODEM** verification + raw `0:<hex>` conversion, warning when bounceable `EQ...` risks bouncing transfers to uninitialized wallets.
  - **XRP Ledger**: Classic `r...` Ripple-alphabet Base58Check + **XLS-5d `X...` / `T...` X-Address** decoder extracting the underlying classic `r...` account and `destinationTag`.
  - **Cosmos SDK** (`cosmos1`, `noble1`, `osmo1`, `celestia1`, `inj1`, `sei1`, `dydx1`, `thor1`) & **Stacks** (`SP`/`SM`/`ST`/`SN` c32check).
- `decode_and_audit_evm_calldata` (`$0.01 USDC` / call): Decodes raw hex EVM calldata (`to`, `value`, `data`, `chainId`) across `ERC-20`, `ERC-721/1155`, `Permit2`, `Uniswap V2/V3/UniversalRouter`, `1inch`, **recursive `Multicall`**, and **Gnosis Safe `execTransaction`** — blocking `CRITICAL` unlimited approvals (`>= 2^255` / `MAX_UINT160`), `setApprovalForAll(true)`, `amountOutMin == 0` MEV sandwich exposure, payable-approval ETH traps, expired deadlines, and `operation=1` `DELEGATECALL` takeovers.
- `audit_eip712_signature_payload` (`$0.01 USDC` / call): Audits off-chain `eth_signTypedData_v4` payloads (`EIP-2612 Permit`, `DAI Permit`, `Permit2` `PermitSingle`/`PermitBatch`, `Seaport OrderComponents`, `EIP-3009` `x402` `TransferWithAuthorization`, `ForwardRequest`, `SafeTx`), computing the exact EIP-712 `domainSeparator` and catching zero-consideration NFT/token drains, unlimited gasless permits, multi-month signature expirations, and cross-chain `chainId` / `verifyingContract` spoofing.

***

### Quick Connect

#### 1. Hosted `x402` Streamable HTTP MCP (MCPize / Base `USDC`)

```json
{
  "mcpServers": {
    "web3-tx-guard": {
      "type": "streamable-http",
      "url": "https://web3-tx-guard-mcp.mcpize.run/mcp"
    }
  }
}
```

#### 2. Zero-Install Local `stdio` Mode (`npx` / Node 20+)

```json
{
  "mcpServers": {
    "web3-tx-guard": {
      "command": "npx",
      "args": ["-y", "github:2848823170/web3-tx-guard-mcp"]
    }
  }
}
```

<a href="https://glama.ai/mcp/servers/2848823170/web3-tx-guard-mcp">Glama MCP Directory — web3-tx-guard-mcp</a>

***

### 中文快速上手（Web3 交易预检与防钓鱼签名卫士）

**`web3-tx-guard-mcp`** 为 AI Agent、量化脚本与多链金库提供零外部 API 依赖的确定性链上交易安全预检：

1. **`validate_multichain_address`**：支持 **EVM / Tron (`TRC-20`) / Bitcoin (`Taproot` & `SegWit`) / Solana (自动区分钱包公钥与链下 `PDA`) / TON (`EQ`/`UQ` 退回陷阱预警) / XRP (`X-Address` 标签解析) / Cosmos / Stacks** 八大生态地址密码学校验与黑洞地址拦截。
2. **`decode_and_audit_evm_calldata`**：离线解码原始十六进制 `calldata`（含嵌套 `Multicall` 与 `Safe` 多签），精准拦截无限授权（`MAX_UINT256` / `Permit2`）、`setApprovalForAll(true)`、`amountOutMin == 0` 三明治夹子风险与恶意 `DELEGATECALL`。
3. **`audit_eip712_signature_payload`**：在调用 `eth_signTypedData_v4` 前审计 `Permit` / `Permit2` / `Seaport` / `x402 EIP-3009` 离线签名，防止零对价钓鱼盗币与跨链重放攻击。

***

### Local Verification

```bash
npm ci
npm test
```

# Actor input Schema

## `tool` (type: `string`):

Select which Web3 pre-flight guard tool to execute in batch mode. In Standby mode, MCP clients call tools directly via /mcp.

## `address` (type: `string`):

Address string to validate across EVM, Tron, Bitcoin, Solana, TON, XRPL, Cosmos, or Stacks.

## `chain` (type: `string`):

Optional chain constraint: auto, evm, tron, bitcoin, solana, ton, xrpl, cosmos, or stacks.

## `expectedNetwork` (type: `string`):

Expected network environment (mainnet or testnet) to catch testnet-vs-mainnet mixups.

## `to` (type: `string`):

Target 0x address for EVM transaction pre-flight analysis.

## `value` (type: `string`):

Transaction value in wei (e.g. '0' or '0x0').

## `data` (type: `string`):

Hex-encoded EVM transaction calldata starting with 0x.

## `chainId` (type: `integer`):

EVM Chain ID (e.g. 1 = Ethereum, 8453 = Base, 42161 = Arbitrum, 137 = Polygon).

## `typedData` (type: `object`):

Full eth_signTypedData_v4 JSON object containing domain, types, primaryType, and message.

## Actor input object example

```json
{
  "tool": "validate_multichain_address",
  "address": "",
  "chain": "auto",
  "expectedNetwork": "mainnet",
  "to": "",
  "value": "0",
  "data": "0x",
  "chainId": 8453,
  "typedData": {}
}
```

# Actor output Schema

## `datasetResults` (type: `string`):

No description

## `auditReportJson` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("shulang-chen/web3-tx-guard-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("shulang-chen/web3-tx-guard-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call shulang-chen/web3-tx-guard-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shulang-chen/web3-tx-guard-mcp"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dvZZaHWDwweCbifPZ/builds/vjqwBb9mw1I6hlyEu/openapi.json
