alchemy-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Alchemy MCP

Alchemy MCP

Use the hosted Alchemy MCP server for live blockchain data, transaction simulation, tracing, NFT/portfolio queries, and Alchemy app administration from inside your AI client.
使用托管的Alchemy MCP服务器,在AI客户端内获取实时区块链数据、进行交易模拟、追踪、NFT/投资组合查询以及Alchemy应用管理。

When to use this skill

何时使用此技能

Use
alchemy-mcp
when all of the following are true:
  • The user wants live agent work — live querying, analysis, admin work, or on-machine automation that the agent runs now in this session
  • An MCP-compatible client (Claude Code, Codex, Cursor, Claude Desktop, VS Code Copilot, etc.) is already wired against
    https://mcp.alchemy.com/mcp
    , OR the user is willing to add it
  • The Alchemy CLI (
    @alchemy/cli
    ) is not installed locally
If the CLI is installed locally — or if both CLI and MCP are available — prefer the
alchemy-cli
skill instead. The CLI is the preferred local fallback runtime path.
所有以下条件都满足时,使用
alchemy-mcp
  • 用户需要实时代理任务——包括实时查询、分析、管理操作,或者代理在本次会话中立即执行的本地自动化任务
  • 已将兼容MCP的客户端(Claude Code、Codex、Cursor、Claude Desktop、VS Code Copilot等)对接至
    https://mcp.alchemy.com/mcp
    ,或者用户愿意进行对接
  • 本地安装Alchemy CLI(
    @alchemy/cli
如果本地已安装CLI——或者同时可用CLI和MCP——则优先使用
alchemy-cli
技能。CLI是首选的本地备用运行时方案。

When to use a different skill

何时使用其他技能

SituationUse this skill instead
@alchemy/cli
is installed locally, or both CLI and MCP are available
alchemy-cli
Neither CLI nor MCP is availableinstall
alchemy-cli
(
npm i -g @alchemy/cli
), then use
alchemy-cli
Building application code that runs outside this agent session, with an Alchemy API key
alchemy-api
Building application code without an API key, or as an autonomous agent that needs to pay for itself, or you explicitly want x402/MPP
agentic-gateway
Do not use this skill to write production application code — MCP tools are for live agent work, not for embedding into shipped software.
场景替代技能
本地已安装
@alchemy/cli
,或同时可用CLI和MCP
alchemy-cli
CLI和MCP均不可用安装
alchemy-cli
npm i -g @alchemy/cli
),然后使用
alchemy-cli
编写在代理会话外运行的应用代码,且拥有Alchemy API密钥
alchemy-api
编写无需API密钥的应用代码,或构建能够自行支付费用的自治代理,或明确需要x402/MPP
agentic-gateway
不要使用此技能编写生产应用代码——MCP工具仅用于实时代理任务,不可嵌入到交付的软件中。

Connect your client

连接您的客户端

The server runs at
https://mcp.alchemy.com/mcp
and authenticates via OAuth — your client opens a browser to sign in with your Alchemy account on first use. No API key or local install required.
服务器运行地址为
https://mcp.alchemy.com/mcp
,通过OAuth进行身份验证——首次使用时,您的客户端会打开浏览器,让您使用Alchemy账户登录。无需API密钥或本地安装。

Claude Code

Claude Code

bash
claude mcp add alchemy --transport http https://mcp.alchemy.com/mcp
Restart Claude Code, then run
/mcp
and select
alchemy
to authenticate.
bash
claude mcp add alchemy --transport http https://mcp.alchemy.com/mcp
重启Claude Code,然后运行
/mcp
并选择
alchemy
进行身份验证。

Codex

Codex

bash
codex mcp add alchemy --url https://mcp.alchemy.com/mcp
Verify with
codex mcp list
.
bash
codex mcp add alchemy --url https://mcp.alchemy.com/mcp
使用
codex mcp list
验证。

Cursor

Cursor

Add to
~/.cursor/mcp.json
(global) or
.cursor/mcp.json
(project):
json
{
  "mcpServers": {
    "alchemy": {
      "type": "streamable-http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}
Restart Cursor and verify via Cursor Settings > MCP.
添加至全局配置文件
~/.cursor/mcp.json
或项目配置文件
.cursor/mcp.json
json
{
  "mcpServers": {
    "alchemy": {
      "type": "streamable-http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}
重启Cursor,通过Cursor设置 > MCP验证。

Claude Desktop

Claude Desktop

Add to
~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or
%APPDATA%\Claude\claude_desktop_config.json
(Windows):
json
{
  "mcpServers": {
    "alchemy": {
      "type": "streamable-http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}
添加至macOS的
~/Library/Application Support/Claude/claude_desktop_config.json
或Windows的
%APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "alchemy": {
      "type": "streamable-http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}

VS Code Copilot

VS Code Copilot

Add to
.vscode/mcp.json
in your project:
json
{
  "servers": {
    "alchemy": {
      "type": "http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}
添加至项目中的
.vscode/mcp.json
json
{
  "servers": {
    "alchemy": {
      "type": "http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}

Any other MCP client

其他MCP客户端

Point it at
https://mcp.alchemy.com/mcp
using Streamable HTTP transport. The server supports OAuth 2.1 with PKCE; the client handles the authorization flow automatically.
使用Streamable HTTP传输将其指向
https://mcp.alchemy.com/mcp
。服务器支持带PKCE的OAuth 2.1,客户端会自动处理授权流程。

Bootstrap workflow

引导工作流

Once the server is connected and you've signed in via OAuth:
  1. List apps
    list_apps
    to see your Alchemy apps.
  2. Select an app
    select_app
    with the app ID. This caches the API key the server uses for RPC and Data tools. Required before any RPC or Data tool call.
  3. Run tools — call any of the 159 tools (e.g.
    getTokenPricesBySymbol
    ,
    getNFTsForOwner
    ,
    simulateAssetChanges
    ,
    solana_getBalance
    ).
If you need to create an app first:
text
create_app(name="My App", networks=["eth-mainnet", "base-mainnet"])
Then
select_app
against the new app.
服务器连接完成并通过OAuth登录后:
  1. 列出应用——调用
    list_apps
    查看您的Alchemy应用。
  2. 选择应用——使用应用ID调用
    select_app
    。这会缓存服务器用于RPC和数据工具的API密钥。调用任何RPC或数据工具前必须执行此步骤。
  3. 运行工具——调用159种工具中的任意一种(例如
    getTokenPricesBySymbol
    getNFTsForOwner
    simulateAssetChanges
    solana_getBalance
    )。
如果需要先创建应用:
text
create_app(name="My App", networks=["eth-mainnet", "base-mainnet"])
然后针对新应用调用
select_app

Tool catalog

工具目录

The server exposes 159 tools across three categories.
服务器提供三类共159种工具

Admin (8 tools) — Account & app management

管理类(8种)——账户与应用管理

ToolPurpose
ping
Health check
list_apps
List your Alchemy apps
get_app
Get app details
select_app
Select an app and cache its API key for RPC/Data tools
create_app
Create a new app
update_app
Update app name or description
list_chains
List all 100+ supported networks
update_allowlist
Update app allowlists (network, address, origin, IP)
工具用途
ping
健康检查
list_apps
列出您的Alchemy应用
get_app
获取应用详情
select_app
选择应用并缓存其API密钥,供RPC/数据工具使用
create_app
创建新应用
update_app
更新应用名称或描述
list_chains
列出所有100+支持的网络
update_allowlist
更新应用白名单(网络、地址、来源、IP)

RPC (123 tools) — On-chain JSON-RPC

RPC类(123种)——链上JSON-RPC

Standard EVM RPC, Token API, Transfers & Receipts, Transaction Simulation, Trace API, Debug API, ERC-4337 Account Abstraction, Solana standard RPC, and Solana Enhanced & DAS.
ClusterCountExamples
Standard EVM RPC31
ethBlockNumber
,
ethGetBalance
,
ethCall
,
ethGetLogs
,
ethCallBundle
Token API3
getTokenBalances
,
getTokenMetadata
,
getTokenAllowance
Transfers & Receipts2
getAssetTransfers
,
getTransactionReceipts
Transaction Simulation5
simulateAssetChanges
,
simulateExecution
,
simulateUserOperationAssetChanges
Trace API6
traceCall
,
traceTransaction
,
traceBlock
,
traceFilter
Debug API6
debugTraceTransaction
,
debugTraceCall
,
debugTraceBlockByNumber
ERC-4337 Account Abstraction7
estimateUserOperationGas
,
getUserOperationReceipt
,
requestGasAndPaymasterAndData
Solana Standard RPC50
solana_getBalance
,
solana_getTokenAccountsByOwner
,
solana_getBlock
,
solana_simulateTransaction
Solana Enhanced & DAS13
solana_getAsset
,
solana_getAssetsByOwner
,
solana_searchAssets
,
solana_getPriorityFeeEstimate
标准EVM RPC、代币API、转账与收据、交易模拟、Trace API、Debug API、ERC-4337账户抽象、Solana标准RPC以及Solana增强版与DAS。
集群数量示例
标准EVM RPC31
ethBlockNumber
,
ethGetBalance
,
ethCall
,
ethGetLogs
,
ethCallBundle
代币API3
getTokenBalances
,
getTokenMetadata
,
getTokenAllowance
转账与收据2
getAssetTransfers
,
getTransactionReceipts
交易模拟5
simulateAssetChanges
,
simulateExecution
,
simulateUserOperationAssetChanges
Trace API6
traceCall
,
traceTransaction
,
traceBlock
,
traceFilter
Debug API6
debugTraceTransaction
,
debugTraceCall
,
debugTraceBlockByNumber
ERC-4337账户抽象7
estimateUserOperationGas
,
getUserOperationReceipt
,
requestGasAndPaymasterAndData
Solana标准RPC50
solana_getBalance
,
solana_getTokenAccountsByOwner
,
solana_getBlock
,
solana_simulateTransaction
Solana增强版与DAS13
solana_getAsset
,
solana_getAssetsByOwner
,
solana_searchAssets
,
solana_getPriorityFeeEstimate

Data (28 tools) — REST APIs

数据类(28种)——REST API

ClusterCountExamples
NFT API21
getNFTsForOwner
,
getNFTMetadata
,
getOwnersForNFT
,
getFloorPrice
,
getNFTSales
Prices API3
getTokenPricesBySymbol
,
getTokenPricesByAddress
,
getHistoricalTokenPrices
Portfolio (multi-chain)4
getTokensByAddress
,
getTokenBalancesByAddress
,
getNFTsByAddress
,
getNFTContractsByAddress
集群数量示例
NFT API21
getNFTsForOwner
,
getNFTMetadata
,
getOwnersForNFT
,
getFloorPrice
,
getNFTSales
价格API3
getTokenPricesBySymbol
,
getTokenPricesByAddress
,
getHistoricalTokenPrices
投资组合(多链)4
getTokensByAddress
,
getTokenBalancesByAddress
,
getNFTsByAddress
,
getNFTContractsByAddress

Common task → tool map

常见任务→工具映射

TaskToolNotes
Latest ETH block number
ethBlockNumber
Pass
network: "eth-mainnet"
ETH balance for an address
ethGetBalance
Returns hex wei
ERC-20 balances
getTokenBalances
Use
getTokenMetadata
to resolve symbol/decimals
ERC-20 metadata
getTokenMetadata
name, symbol, decimals, logo
Asset transfers (history)
getAssetTransfers
Filter by
category
(
erc20
,
erc721
,
erc1155
,
external
,
internal
)
Simulate a tx
simulateAssetChanges
Pre-flight asset deltas
Trace a tx
traceTransaction
Internal call tree
Debug-trace a tx
debugTraceTransaction
Geth-style structured trace
List owned NFTs
getNFTsForOwner
Across one chain
Multi-chain NFTs
getNFTsByAddress
Across many chains
NFT metadata
getNFTMetadata
Per token id
NFT floor price
getFloorPrice
From major marketplaces
Token prices (spot)
getTokenPricesBySymbol
e.g.
["ETH","USDC"]
Token prices (historical)
getHistoricalTokenPrices
Time range queries
Multi-chain portfolio
getTokenBalancesByAddress
With USD values
Solana balance
solana_getBalance
Lamports
Solana token accounts
solana_getTokenAccountsByOwner
SPL tokens
Compressed NFT lookup
solana_getAsset
DAS standard
Owner's compressed NFTs
solana_getAssetsByOwner
DAS standard
Solana priority fees
solana_getPriorityFeeEstimate
Recent samples
User operation receipt
getUserOperationReceipt
ERC-4337
任务工具说明
获取最新ETH区块号
ethBlockNumber
传入
network: "eth-mainnet"
查询地址的ETH余额
ethGetBalance
返回十六进制wei值
查询ERC-20余额
getTokenBalances
使用
getTokenMetadata
解析符号/小数位数
获取ERC-20元数据
getTokenMetadata
名称、符号、小数位数、Logo
查询资产转账历史
getAssetTransfers
category
过滤(
erc20
,
erc721
,
erc1155
,
external
,
internal
模拟交易
simulateAssetChanges
预演资产变化
追踪交易
traceTransaction
内部调用树
调试追踪交易
debugTraceTransaction
Geth风格的结构化追踪
列出持有的NFT
getNFTsForOwner
单链范围
查询多链NFT
getNFTsByAddress
多链范围
获取NFT元数据
getNFTMetadata
按代币ID查询
获取NFT地板价
getFloorPrice
来自主流市场
查询代币现货价格
getTokenPricesBySymbol
例如
["ETH","USDC"]
查询代币历史价格
getHistoricalTokenPrices
时间范围查询
查询多链投资组合
getTokenBalancesByAddress
包含USD估值
查询Solana余额
solana_getBalance
单位为Lamports
查询Solana代币账户
solana_getTokenAccountsByOwner
SPL代币
查询压缩NFT
solana_getAsset
符合DAS标准
查询持有者的压缩NFT
solana_getAssetsByOwner
符合DAS标准
查询Solana优先费用
solana_getPriorityFeeEstimate
近期样本
获取用户操作收据
getUserOperationReceipt
ERC-4337

Operating rules

操作规则

  • Always call
    select_app
    first
    before any RPC or Data tool. Tools error out with a clear message if no app is selected.
  • Use the canonical chain slugs returned by
    list_chains
    (e.g.
    eth-mainnet
    ,
    base-mainnet
    ,
    solana-mainnet
    ). Tool error messages will guide you if you guess wrong.
  • Don't bypass the MCP server with raw curl/HTTP from inside the agent — that's the API-key path covered by
    alchemy-api
    . MCP tools are the canonical interface for this skill.
  • Don't use MCP tools to generate production application code. When the user wants to ship code, hand off to
    alchemy-api
    (with API key) or
    agentic-gateway
    (without).
  • 调用任何RPC或数据工具前,务必先调用
    select_app
    。如果未选择应用,工具会返回明确的错误提示。
  • 使用
    list_chains
    返回的规范链别名
    (例如
    eth-mainnet
    ,
    base-mainnet
    ,
    solana-mainnet
    )。如果别名错误,工具错误提示会引导您修正。
  • 不要在代理内通过原始curl/HTTP绕过MCP服务器——这属于
    alchemy-api
    覆盖的API密钥路径。MCP工具是此技能的标准接口。
  • 不要使用MCP工具生成生产应用代码。当用户需要交付代码时,切换至
    alchemy-api
    (需API密钥)或
    agentic-gateway
    (无需API密钥)。

Supported chains

支持的链

100+ chains including Ethereum, Base, Polygon, Arbitrum, Optimism, BNB, Solana, Starknet, zkSync, Scroll, Linea, Mantle, Blast, World Chain, and many more. Use
list_chains
to fetch the full list.
支持100+条链,包括Ethereum、Base、Polygon、Arbitrum、Optimism、BNB、Solana、Starknet、zkSync、Scroll、Linea、Mantle、Blast、World Chain等。使用
list_chains
获取完整列表。

Troubleshooting

故障排除

"No app selected"

"未选择应用"

Call
select_app
with the desired app ID. If you don't have an app yet, run
create_app
first.
使用目标应用ID调用
select_app
。如果还没有应用,先运行
create_app

OAuth flow doesn't open

OAuth流程无法打开

Restart your MCP client after adding the server. For Claude Code, run
/mcp
and select
alchemy
to trigger the sign-in flow manually.
添加服务器后重启MCP客户端。对于Claude Code,运行
/mcp
并选择
alchemy
手动触发登录流程。

Tool not found

工具未找到

Some tools are namespaced (e.g.
solana_*
for Solana). Use
list_chains
to confirm the chain slug and check the tool catalog above for the exact name.
部分工具带有命名空间(例如Solana工具前缀为
solana_*
)。使用
list_chains
确认链别名,并查看上方工具目录获取准确名称。

Rate limits / compute units

速率限制/计算单元

The MCP server inherits the rate limits of the selected app. Check usage in the Alchemy dashboard.
MCP服务器继承所选应用的速率限制。在Alchemy控制台查看使用情况。

Official links

官方链接