---
title: "Alchemy plugin for Claude Code 現已上線"
description: "安裝一次 Alchemy plugin for Claude Code，即可查詢 100+ 條鏈的區塊鏈資料、執行 slash commands，並在對話中直接管理 Alchemy apps。"
---

# Alchemy plugin for Claude Code 現已上線

<ImageBlock
  src="https://media.alchemy.com/claude-plugin.png"
  alt="Alchemy Claude Plugin"
  width={1920}
  height={900}
  priority
/>

傳統的開發流程正在改變。過去的情況是這樣的：你正在寫程式，需要某個東西——錢包餘額、ETH 目前的價格、確認某筆交易是否已經上鏈。於是你停下來，打開 dashboard，翻文件，拼湊出一段 SDK 呼叫，切換鏈，最後才拿到答案。

我們打造了 Claude Code 的 Alchemy plugin，為的就是消除這段來回。安裝一次之後，你的 coding agent 就能查詢 100 多條鏈上的區塊鏈資料、管理你的 Alchemy apps，完全不需要離開對話。問「ETH 目前的價格是多少？」或是「show me the NFTs owned by vitalik.eth」，你就能得到即時資料回覆的真實答案，而且就在你正在工作的地方。

<ExternalVideo
  url="https://www.youtube.com/watch?v=_9EK9tInVDo"
  provider="youtube"
  providerUid="_9EK9tInVDo"
/>

這個 plugin 是開源的，現在就能在 [alchemyplatform/alchemy-claude-plugin](https://github.com/alchemyplatform/alchemy-claude-plugin) 取得。

## **安裝一次，你會得到什麼**

安裝一次，Claude Code 就同時擁有三樣東西。它會連接託管的 Alchemy MCP Server，讓 Claude 能以工具的形式呼叫即時區塊鏈資料。它會加入你最常用查詢的 slash commands，讓常見的工作只需一個指令。它也會附上 Agent Skills，教 Claude 如何正確使用 Alchemy——無論是在對話中回答問題，還是針對我們的 APIs 撰寫應用程式碼。

這些都不需要你手動設定。安裝、登入，就能開始提問。

## **開始使用**

在 Claude Code 中，加入 marketplace 並安裝 plugin：

<CodeSnippet
  language="bash"
  code={`/plugin marketplace add alchemyplatform/alchemy-claude-plugin
/plugin install alchemy@alchemy`}
/>

Claude 第一次呼叫 Alchemy 工具時，會開啟一個瀏覽器視窗，讓你透過 OAuth 登入 Alchemy 帳號。不需要複製 API key，也不需要執行本地伺服器。如果你還沒有帳號，可以到 [Alchemy Dashboard](https://dashboard.alchemy.com/) 免費建立一個。

接著執行一次 setup，選擇要使用的 app：

`/alchemy:setup`

這會將該 app 的 API key 快取起來，供這次 session 使用，而這正是大多數資料工具所需要的。之後你可以用一般的英文提問，也可以直接使用指令。

## **你會實際用到的指令**

這些 slash commands 涵蓋了最常打斷你工作的查詢。每個指令都能選填網路，預設為 Ethereum mainnet。

<EmbeddedTable
  table={{
    columns: [
      { key: "command", width: 200, title: "Command", dataType: "object" },
      { key: "description", width: 420, title: "What it does", dataType: "object" },
    ],
    data: [
      {
        command: { title: "/alchemy:setup", tooltip: "", icon: "" },
        description: {
          title: "Connect and select an Alchemy app for the session",
          tooltip: "",
          icon: "",
        },
        id: 0,
      },
      {
        command: { title: "/alchemy:balance [network]", tooltip: "", icon: "" },
        description: {
          title: "Native and ERC-20 balances with USD values",
          tooltip: "",
          icon: "",
        },
        id: 1,
      },
      {
        command: { title: "/alchemy:nfts [network]", tooltip: "", icon: "" },
        description: { title: "NFTs owned by a wallet", tooltip: "", icon: "" },
        id: 2,
      },
      {
        command: { title: "/alchemy:token [network]", tooltip: "", icon: "" },
        description: {
          title: "Token price and metadata",
          tooltip: "",
          icon: "",
        },
        id: 3,
      },
      {
        command: { title: "/alchemy:tx [network]", tooltip: "", icon: "" },
        description: {
          title: "Transaction details and receipt",
          tooltip: "",
          icon: "",
        },
        id: 4,
      },
      {
        command: { title: "/alchemy:portfolio [networks]", tooltip: "", icon: "" },
        description: {
          title: "Multi-chain tokens and NFTs",
          tooltip: "",
          icon: "",
        },
        id: 5,
      },
      {
        command: { title: "/alchemy:gas [network]", tooltip: "", icon: "" },
        description: {
          title: "Current gas and fee estimates",
          tooltip: "",
          icon: "",
        },
        id: 6,
      },
      {
        command: { title: "/alchemy:solana", tooltip: "", icon: "" },
        description: {
          title: "SOL balance and SPL token accounts",
          tooltip: "",
          icon: "",
        },
        id: 7,
      },
      {
        command: { title: "/alchemy:create-app", tooltip: "", icon: "" },
        description: { title: "Create a new Alchemy app", tooltip: "", icon: "" },
        id: 8,
      },
    ],
  }}
/>

用 `portfolio` 跨鏈讀取資料。不用接 price feed 也能查到以 USD 計算的餘額。查詢一筆交易及其 receipt 來確認是否已結算。用同一套操作流程切換到 Solana，查詢 SOL 與 SPL token accounts，就跟處理 EVM 一樣。準備好要上線時，`create-app` 可以直接在終端機內建立一個新的 Alchemy app。

每個指令背後，是託管的 Alchemy MCP Server 提供的 160 多個工具：EVM JSON-RPC、我們的 Token、NFT、Prices 和 Portfolio APIs、交易模擬與追蹤、gasless transactions，以及透過 RPC 和 Digital Asset Standard 存取 Solana。而且不用記指令——直接問 Claude，它會自己找到對的工具。

## **這為什麼重要**

重點不在於你能查詢餘額——這件事你本來就做得到。重點是這個查詢現在發生在工作內部，而不是在工作之外。

當你的 agent 能夠在情境中讀取鏈上資料時，問題本身就變了。你不再把「這個地址持有什麼」當成一件獨立的雜事去問，而是把它當成偵錯某個失敗流程的一部分。你可以讓 Claude 檢查一筆交易的 receipt，推論為什麼會 revert，並提出修正方案，完全不需要離開檔案。模擬與追蹤功能就在手邊，讓你在送出交易之前就能理解它會做什麼。這個 agent 不只是在寫關於鏈的程式碼，它能看見這條鏈。

這也是為什麼我們把 Agent Skills 和工具一起提供的原因。即時資料回答當下的問題。這些 skills 則教 Claude 我們 APIs 背後的模式，讓它在針對 Alchemy 寫程式碼時，寫出我們自己也會寫的那種程式碼。你在對話中得到正確的協助，在你的 repo 中得到正確的程式碼。

## **如果你不使用 Claude Code**

對 Claude Code 使用者來說，這個 plugin 是最簡單的路徑，但它只是透過 agent 使用 Alchemy 的三種方式之一。選擇符合你開發方式的那一種。

<EmbeddedTable
  table={{
    columns: [
      { key: "option", width: 180, title: "", dataType: "object" },
      { key: "bestFor", width: 440, title: "Best for", dataType: "object" },
    ],
    data: [
      {
        option: { title: "Claude plugin", tooltip: "", icon: "" },
        bestFor: {
          title:
            "Claude Code, where one install bundles the MCP server, slash commands, and skills",
          tooltip: "",
          icon: "",
        },
        id: 0,
      },
      {
        option: {
          title:
            '<a href="https://www.alchemy.com/docs/alchemy-cli">Alchemy CLI</a>',
          tooltip: "",
          icon: "",
        },
        bestFor: {
          title:
            "The terminal directly, for live queries, transactions, and admin tasks in shell scripts, cron jobs, and CI pipelines",
          tooltip: "",
          icon: "",
        },
        id: 1,
      },
      {
        option: {
          title:
            '<a href="https://www.alchemy.com/docs/alchemy-mcp-server">MCP server</a>',
          tooltip: "",
          icon: "",
        },
        bestFor: {
          title:
            "Any MCP-compatible client such as Cursor, Codex, Claude Desktop, or VS Code Copilot, for live blockchain data as tool calls",
          tooltip: "",
          icon: "",
        },
        id: 2,
      },
      {
        option: {
          title:
            '<a href="https://www.alchemy.com/docs/alchemy-agent-skills">Agent Skills</a>',
          tooltip: "",
          icon: "",
        },
        bestFor: {
          title:
            "Any agent that writes code against Alchemy APIs, for endpoint knowledge without tool calls",
          tooltip: "",
          icon: "",
        },
        id: 3,
      },
    ],
  }}
/>

如果你使用 Claude Code，安裝 plugin 之後，MCP server、slash commands 和 skills 就會一併到位。

## **試試看**

加入 marketplace、安裝、執行 `/alchemy:setup`，然後問 Claude 一個鏈上問題。整個過程大約一分鐘，帳號免費，而且這個 plugin 是開源的，你可以看看它如何運作，也歡迎貢獻。

到 [alchemyplatform/alchemy-claude-plugin](https://github.com/alchemyplatform/alchemy-claude-plugin) 取得，或閱讀[文件](https://www.alchemy.com/docs/alchemy-claude-plugin)。
