alchemy-api
Integrates Alchemy blockchain APIs using an API key. Requires $ALCHEMY_API_KEY to be set; if unavailable, use the…
Use when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features. Also use when the user mentions "SIWE", "SIWS", "x402", "MPP", "mppx", or "agentic gateway" — this skill covers wallet-based auth
$ npx -y skills add moonpay/skills --skill alchemy-agentic-gateway --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/alchemy-agentic-gatewayContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features. Also use when the user mentions "SIWE", "SIWS", "x402", "MPP", "mppx", or "agentic gateway" — this skill covers wallet-based auth
name: alchemy-agentic-gateway description: Use when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features. Also use when the user mentions "SIWE", "SIWS", "x402", "MPP", "mppx", or "agentic gateway" — this skill covers wallet-based auth flows for Alchemy's x402 and MPP protocols on EVM (Ethereum, Base, Polygon) and SVM (Solana). tags: [alchemy, blockchain, evm, solana, rpc, x402, mpp, defi] license: MIT compatibility: Requires network access. If $ALCHEMY_API_KEY is set, no additional setup needed. Otherwise requires Node.js (npx) and a wallet funded with USDC. Works across Claude.ai, Claude Code, and API. metadata: author: alchemyplatform version: "2.0"
> **Notice:** This repository is experimental and subject to change without notice. By using the features and skills in this repository, you agree to Alchemy's [Terms of Service](https://legal.alchemy.com/) and [Privacy Policy](https://legal.alchemy.com/#contract-sblyf8eub).
A skill that lets agents easily access Alchemy's developer platform. Supports three access methods with different authentication and payment protocols.
**API Key path** (simplest):
**x402 path** (no API key):
**MPP path** (Merchant Payment Protocol):
**BEFORE doing anything else**, you MUST determine which access method to use. Follow this decision tree:
1. **Is `ALCHEMY_API_KEY` set in the environment?**
2. **Ask the user which payment protocol they prefer.** Present this prompt exactly:
> Which payment protocol would you like to use for the Alchemy Gateway? > > 1. **x402** — USDC payments via the x402 protocol (uses `Payment-Signature` header, `@alchemy/x402` + `@x402/fetch` libraries) > 2. **MPP** — Payments via the Merchant Payment Protocol using Tempo (on-chain USDC, EVM only) or Stripe (credit card), via the `mppx` library
**Do NOT skip this prompt. Do NOT pick a protocol on behalf of the user.** Wait for their explicit choice before proceeding.
3. **Based on the user's choice**, follow the corresponding protocol rules:
---
If `ALCHEMY_API_KEY` is set in the environment, use standard Alchemy endpoints directly:
No wallet setup, auth tokens, or payment is needed. Just make requests with the API key in the URL.
curl -s -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber"}'---
| Aspect | x402 | MPP | |--------|------|-----| | Gateway URL | `https://x402.alchemy.com` | `https://mpp.alchemy.com` | | SIWE/SIWS domain | `x402.alchemy.com` | `mpp.alchemy.com` | | Payment header (client→server) | `Payment-Signature: <base64>` | `Authorization: Payment <credential>` | | Challenge header (server→client) | `PAYMENT-REQUIRED` | `WWW-Authenticate` | | Protocol version | `x402/2.0` | `mpp/1.0` | | Auth | SIWE (EVM) or SIWS (Solana) | SIWE only (EVM) | | Payment methods | USDC via EIP-3009 (EVM) or SVM x402 (Solana) | Tempo (on-chain USDC) + Stripe (card) | | Client library | `@alchemy/x402`, `@x402/fetch`, `@x402/axios` | `mppx`, `viem` |
Full protocol documentation: https://www.alchemy.com/docs
---
1. **Bootstrap wallet** — create a wallet and fund it with USDC 2. **Generate SIWE/SIWS auth token** — sign a message proving wallet ownership 3. **Make a request** — send to `https://x402.alchemy.com/{chainNetwork}/v2` with `Authorization: SIWE <token>` 4. **Handle 402** — if server returns 402 with `PAYMENT-REQUIRED` header, run `npx @alchemy/x402 pay` and extract the `Payment-Signature` 5. **Retry** — resend the original request adding `Payment-Signature: <base64>` header
# Install x402 client
npm install -g @alchemy/x402 @x402/fetch
# Step 1: Generate a SIWE auth token for your EVM wallet
SIWE_TOKEN=$(npx @alchemy/x402 sign-siwe --private-key <key-or-path>)
# Step 2: Make a request (will return 402 on first call)
curl -s -X POST "https://x402.alchemy.com/eth-mainnet/v2" \
-H "Authorization: SIWE $SIWE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
# Step 3: If 402 received, pay the challenge and retry with Payment-Signature
# npx @alchemy/x402 pay (pass the PAYMENT-REQUIRED header value)---
1. **Bootstrap wallet** — create an account and fund it with USDC or link a Stripe card 2. **Make a request** — `mppx` handles SIWE auth and MPP payment automatically 3. **Handle 402** — `mppx` intercepts 402 responses and pays the challenge transparently
# Install mppx
npm install -g mppx
# Create an account (one-time setup)
mppx account create
# Fund the account
mppx account fund
# Make an authenticated + paid request (mppx handles auth and payment)
mppx "https://mpp.alchemy.com/eth-mainnet/v2" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
# View account details
mppx account view---
Whenever the user asks ANY question related to
Agent Skills for crypto infrastructure — wallet management, token trading, cross-chain bridges, fiat on/off ramp, prediction markets, and more. Skills are instructional folders that AI agents load dynamically to perform specialized tasks.
Integrates Alchemy blockchain APIs using an API key. Requires $ALCHEMY_API_KEY to be set; if unavailable, use the…
Query blockchain data via Allium APIs. Token prices, wallet balances, transactions, historical data. Use when user asks about…
Query blockchain data via Allium APIs. Supports API key, x402 micropayments, and Tempo auth. Covers prices, wallets, tokens, and…
Paid API marketplace for AI agents via Corbits. Search hundreds of premium API proxies, call them with automatic USDC…
Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables,…
Check if an ERC-20 token is safe before swapping. Detects honeypots, high-tax tokens, and rug pulls. Use before any token swap.