Logo Alchemy MCP Server

Alchemy MCP Server

Tổ chức
alchemyplatform

Alchemy's official MCP Server. Allow AI agents to interact with Alchemy's blockchain APIs.

Nhà phát hànhalchemyplatform
Kho mãalchemy-mcp-server
Ngôn ngữTypeScript
Bản fork
32
Sao
88
Công cụ có sẵn
97
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Alchemy MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 97 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    88 sao và 32 bản fork từ kho mã được liên kết.

Alchemy MCP Server (Legacy — Not Actively Maintained)

This open-source Model Context Protocol (MCP) server runs Alchemy's blockchain APIs locally via STDIO. New users should use the hosted Alchemy MCP Server instead.

Remote MCP Server (Recommended)

The fastest way to get started is to connect to the hosted remote server at https://mcp.alchemy.com/mcp. It authenticates via OAuth — just sign in with your Alchemy account when prompted. No API key or local install required.

Full documentation: alchemy.com/docs/alchemy-mcp-server

Legacy notice: The hosted Alchemy MCP Server at https://mcp.alchemy.com/mcp is the recommended and actively maintained MCP server. This repository contains the legacy local STDIO server, is not actively maintained, and may lag behind the hosted server's tool coverage and behavior. Alchemy plans to sunset this repository; new users should connect to the hosted server instead.

ClientSetup
Claude Codeclaude mcp add alchemy --transport http https://mcp.alchemy.com/mcp
Codexcodex mcp add alchemy --url https://mcp.alchemy.com/mcp
CursorAdd to ~/.cursor/mcp.json or .cursor/mcp.json — see JSON config below
WindsurfAdd to ~/.codeium/windsurf/mcp_config.json — see JSON config below
VS Code CopilotAdd to .vscode/mcp.json — see JSON config below
Claude DesktopAdd to claude_desktop_config.json — see JSON config below
ClineOpen Cline: MCP Servers from the VS Code command palette — see JSON config below
json
{
  "mcpServers": {
    "alchemy": {
      "type": "streamable-http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}
json
{
  "servers": {
    "alchemy": {
      "type": "http",
      "url": "https://mcp.alchemy.com/mcp"
    }
  }
}

For any other MCP-compatible client, point it at https://mcp.alchemy.com/mcp using Streamable HTTP transport.

Local STDIO Server

Legacy: This section documents the open-source local STDIO server. It is not actively maintained. Use the hosted server unless you specifically need the @alchemy/mcp-server npm package or local development workflow.

This MCP server creates a bridge between AI agents and Alchemy's blockchain APIs, allowing agents to:

  • Query token prices and price history (including flexible time frame queries)
  • Get NFT ownership information and contract data
  • View transaction history across multiple networks
  • Check token balances across multiple blockchain networks
  • Retrieve detailed asset transfers with filtering
  • Send transactions via Smart Contract Accounts (requires configured wallet agent server)
  • Execute token swaps via DEX protocols (requires configured wallet agent server)
  • And more!

Quick Setup

To quickly set up the MCP server, use the following configuration in your MCP config file (typically in Claude Desktop or Cursor settings):

json
{
  "mcpServers": {
    "alchemy": {
      "command": "npx",
      "args": ["-y", "@alchemy/mcp-server"],
      "env": {
        "ALCHEMY_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

This configuration allows you to use the server without manually cloning the repository.

Environment Variables

The MCP server requires the following environment variable:

  • ALCHEMY_API_KEY - Your Alchemy API key (required for all blockchain data queries)

For transaction and swap functionality, you must also configure:

  • AGENT_WALLET_SERVER - URL of a configured wallet agent server that handles Smart Contract Account operations

⚠️ Important: The sendTransaction and swap methods will not function without a properly configured wallet agent server. These methods require external wallet infrastructure to handle signing and broadcasting transactions.

Available Methods

You can prompt your AI agent to use the following methods:

Token Price Methods

  1. fetchTokenPriceBySymbol

    • Gets current price data for tokens by symbol
    • Example: "What's the current price of ETH and BTC?"
  2. fetchTokenPriceByAddress

    • Gets current price data for tokens by contract address
    • Example: "What's the price of the token at address 0x1234...5678 on Ethereum mainnet?"
  3. fetchTokenPriceHistoryBySymbol

    • Gets historical price data for tokens with specific date ranges
    • Example: "Show me BTC price history from Jan 1 to Feb 1, 2023, with daily intervals"
  4. fetchTokenPriceHistoryByTimeFrame

    • Gets historical price data using flexible time frames or natural language
    • Example: "Show me ETH price for the last week" or "Get BTC price for the past 30 days"

Multichain Token Methods

  1. fetchTokensOwnedByMultichainAddresses
    • Gets token balances for addresses across multiple networks
    • Example: "What tokens does 0xabc...123 hold on Ethereum and Base?"

Transaction History Methods

  1. fetchAddressTransactionHistory

    • Gets transaction history for addresses across multiple networks
    • Example: "Show recent transactions for wallet 0xdef...456 on Ethereum"
  2. fetchTransfers

    • Gets detailed asset transfer data with advanced filtering options
    • Example: "Show me all ERC-20 transfers to or from 0xghi...789"

NFT Methods

  1. fetchNftsOwnedByMultichainAddresses

    • Gets all NFTs owned by addresses with spam filtering
    • Example: "What NFTs does 0xjkl...012 own?"
  2. fetchNftContractDataByMultichainAddress

    • Gets NFT contract data for addresses
    • Example: "What NFT collections does 0xmno...345 have tokens from?"

Transaction Methods

  1. sendTransaction
    • Sends transactions via Smart Contract Accounts
    • ⚠️ Important: Requires a configured wallet agent server with AGENT_WALLET_SERVER environment variable
    • Example: "Send 0.1 ETH to 0xpqr...678"

Swap Methods

  1. swap
    • Executes token swaps via DEX protocols (Uniswap)
    • ⚠️ Important: Requires a configured wallet agent server with AGENT_WALLET_SERVER environment variable
    • Example: "Swap 100 USDC for ETH"

Local Development

This repository remains available for reference and migration, but is not actively maintained. For new features and the latest tool coverage, use the hosted Alchemy MCP Server.

Installation

  1. Clone the repository
bash
git clone https://github.com/alchemyplatform/alchemy-mcp.git
cd alchemy-mcp
  1. Install dependencies
bash
pnpm install

Development

bash
pnpm watch

Building for Production

bash
pnpm build

Using the MCP Inspector for Debugging

The MCP Inspector helps you debug your MCP server by providing a visual interface to test your methods:

bash
pnpm inspector

This will start the MCP Inspector which you can access in your browser. It allows you to:

  • See all available methods
  • Test methods with different parameters
  • View the response data
  • Debug issues with your MCP server

Contributing

This repository is not actively maintained. Pull requests for security fixes or migration-related improvements may be considered, but new features should target the hosted server instead. For major changes, please open an issue first.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

Example Prompts

Here are some example prompts you can use with your AI agent:

What's the current price of Bitcoin and Ethereum?

Show me the NFTs owned by the wallet 0x1234...5678 on Ethereum.

What tokens does wallet 0xabcd...6789 hold across Ethereum and Base?

Get me the transaction history for 0x9876...5432.

Show me the price history of Ethereum from January 1st to today with daily intervals.

Get me Bitcoin price data for the last week with hourly intervals.

Show me ETH price performance for the past month.

What ERC-20 transfers happened to address 0x1234...5678 in the last 100 blocks?

API Reference

For more information about Alchemy's APIs, refer to:

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "alchemyplatform-alchemy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@alchemy/mcp-server"
      ]
    }
  }
}

Công cụ có sẵn

  • listSupportedNetworks

    List all blockchain networks supported by Alchemy, including EVM and Solana chains

  • fetchTokenPriceBySymbol

    Get current USD prices for tokens by their ticker symbol (e.g. BTC, ETH)

  • fetchTokenPriceByAddress

    Get current USD prices for tokens by their contract address and network

  • fetchTokenPriceHistoryBySymbol

    Get historical token price data over a date range with configurable interval

  • fetchTokenPriceHistoryByTimeFrame

    Get historical token prices using natural language time frames like "last week" or "past 7 days"

  • fetchTokensOwnedByMultichainAddresses

    Get all ERC-20 tokens owned by wallet addresses across multiple chains

  • fetchAddressTransactionHistory

    Get transaction history for wallet addresses across multiple chains, with human-readable dates and ETH values

  • fetchTransfers

    Get token and ETH transfers filtered by address, block range, or contract

  • fetchNftsOwnedByMultichainAddresses

    Get NFTs owned by wallet addresses across multiple chains, with spam filtering

  • fetchNftContractDataByMultichainAddress

    Get NFT contract data for wallet addresses across multiple chains

  • sendTransaction

    Send a transaction from a smart contract account (SCA) via the Alchemy wallet API. Requires AGENT_WALLET_SERVER

  • swap

    Initiate a token swap from a smart contract account (SCA) via the Alchemy wallet API. Requires AGENT_WALLET_SERVER

  • getNFTsForOwner

    Get all NFTs owned by an address on a single network, with metadata and spam filtering options

  • getNFTsForContract

    Get all NFTs in a specific contract or collection with optional metadata

  • getNFTsForCollection

    Get all NFTs in a collection by contract address or OpenSea slug

  • getNFTMetadata

    Get metadata for a specific NFT by contract address and token ID

  • getContractMetadata

    Get metadata for an NFT contract (name, symbol, total supply, etc.)

  • getCollectionMetadata

    Get metadata for an NFT collection by its OpenSea slug

  • invalidateNFTContractCache

    Invalidate cached metadata for an NFT contract to force a refresh on next query

  • getOwnersForNFT

    Get all owner addresses for a specific NFT token

  • getOwnersForContract

    Get all owner addresses for an NFT contract, optionally with token balances

  • getSpamContracts

    Get a list of all known spam NFT contract addresses on a network

  • isSpamContract

    Check if a specific contract address is flagged as spam

  • isAirdropNFT

    Check if a specific NFT is flagged as an airdrop

  • summarizeNFTAttributes

    Get a summary of trait/attribute distribution for an NFT collection

  • getFloorPrice

    Get the marketplace floor price for an NFT collection

  • searchContractMetadata

    Search for NFT contracts by keyword in their metadata

  • isHolderOfContract

    Check if a wallet address owns any NFTs from a specific contract

  • computeRarity

    Compute the rarity score for a specific NFT within its collection

  • getNFTSales

    Get historical NFT sales data, filterable by marketplace, contract, buyer, or seller

  • getContractsForOwner

    Get all NFT contracts that an address owns tokens in

  • getCollectionsForOwner

    Get all NFT collections that an address owns tokens in

  • reportSpam

    Report an NFT contract address as spam or not spam

  • getTokenAllowance

    Get the ERC-20 token allowance a spender has been granted by an owner

  • getTokenBalances

    Get ERC-20 token balances for a wallet address on a single network

  • getTokenMetadata

    Get metadata (name, symbol, decimals, logo) for an ERC-20 token contract

  • getTransactionReceipts

    Get all transaction receipts for a given block by number or hash

  • debugGetRawBlock

    Get the raw RLP-encoded block data for a given block number or tag

  • debugGetRawHeader

    Get the raw RLP-encoded block header for a given block number or tag

  • debugGetRawReceipts

    Get the raw receipt data for all transactions in a block

  • debugTraceBlockByHash

    Replay and trace all transactions in a block identified by its hash

  • debugTraceBlockByNumber

    Replay and trace all transactions in a block identified by its number

  • debugTraceCall

    Trace a call without executing it on-chain — useful for debugging contract interactions

  • debugTraceTransaction

    Get a detailed execution trace of an already-mined transaction

  • traceBlock

    Get Parity-style execution traces for all transactions in a block

  • traceCall

    Execute and trace a call without broadcasting it (Parity-style tracing)

  • traceGet

    Get a specific sub-trace within a transaction by index position

  • traceRawTransaction

    Trace a raw signed transaction without broadcasting it to the network

  • traceReplayBlockTransactions

    Replay all transactions in a block and return traces with optional state diffs

  • traceReplayTransaction

    Replay a specific transaction and return its trace with optional state diffs

  • traceTransaction

    Get the Parity-style execution trace of an already-mined transaction

  • traceFilter

    Search for traces matching criteria like sender, recipient, and block range

  • simulateAssetChanges

    Simulate a transaction and preview what asset changes (token transfers, ETH movements) would occur

  • simulateAssetChangesBundle

    Simulate a bundle of 1-2 transactions and preview the combined asset changes

  • simulateExecution

    Simulate full transaction execution and get detailed call traces, logs, and return data

  • simulateExecutionBundle

    Simulate execution of a bundle of 1-2 transactions with full call traces

  • getMaxPriorityFeePerGas

    Get the recommended max priority fee per gas for EIP-1559 transactions

  • getUserOperationReceipt

    Get the receipt for an ERC-4337 user operation by its hash

  • getSupportedEntryPoints

    Get the entry point contract addresses supported for ERC-4337 account abstraction

  • getUserOperationByHash

    Get details of an ERC-4337 user operation by its hash

  • estimateUserOperationGas

    Estimate gas costs for an ERC-4337 user operation against an entry point

  • simulateUserOperationAssetChanges

    Simulate an ERC-4337 user operation and preview the predicted asset changes

  • getBeaconGenesis

    Get Ethereum Beacon Chain genesis information (time, validator root, fork version)

  • getBeaconBlock

    Get a Beacon Chain block by slot number, root, or keyword (head, finalized, genesis)

  • getBeaconBlockAttestations

    Get attestations included in a specific Beacon Chain block

  • getBeaconBlockRoot

    Get the root hash of a specific Beacon Chain block

  • getBeaconBlobSidecars

    Get blob sidecars for a Beacon Chain block (EIP-4844 blob data)

  • getBeaconHeaders

    Get Beacon Chain block headers, optionally filtered by slot or parent root

  • getBeaconHeaderByBlockId

    Get a specific Beacon Chain block header by its block ID

  • getBeaconPoolVoluntaryExits

    Get voluntary validator exit messages currently in the Beacon Chain mempool

  • getBeaconPoolAttestations

    Get attestations currently pending in the Beacon Chain mempool

  • getBeaconStateCommittees

    Get beacon committee assignments for a given state, optionally filtered by epoch/slot

  • getBeaconStateFinalityCheckpoints

    Get finality checkpoints (justified and finalized epochs) for a given state

  • getBeaconStateFork

    Get the fork version information for a given Beacon Chain state

  • getBeaconStatePendingConsolidations

    Get pending validator consolidation requests for a given state

  • getBeaconStateRoot

    Get the state root hash for a given Beacon Chain state

  • getBeaconStateSyncCommittees

    Get sync committee assignments for a given state and optional epoch

  • getBeaconStateRandao

    Get the RANDAO mix value for a given Beacon Chain state and optional epoch

  • getBeaconStateValidatorBalances

    Get validator ETH balances for a given state, optionally filtered by validator ID

  • getBeaconStateValidators

    Get validator details for a given state, optionally filtered by ID or status

  • getBeaconStateValidatorById

    Get full details for a specific Beacon Chain validator by index or public key

  • getBeaconBlockRewards

    Get the block rewards breakdown (proposer, attestation, sync committee) for a Beacon block

  • getBeaconConfigSpec

    Get the full Beacon Chain configuration specification and protocol constants

  • getBeaconNodeSyncing

    Check whether a Beacon Chain node is currently syncing and its sync progress

  • getBeaconNodeVersion

    Get the software version string of the Beacon Chain node

  • solanaGetAsset

    Get detailed information about a Solana asset (token, NFT, or compressed NFT) by its mint ID

  • solanaGetAssets

    Get detailed information about multiple Solana assets by their mint IDs in a single request

  • solanaGetAssetProof

    Get the Merkle proof for a compressed Solana asset, needed for on-chain verification

  • solanaGetAssetProofs

    Get Merkle proofs for multiple compressed Solana assets in a single request

  • solanaGetAssetsByAuthority

    Get all Solana assets managed by a specific authority address

  • solanaGetAssetsByCreator

    Get all Solana assets created by a specific address, with optional verification filter

  • solanaGetAssetsByGroup

    Get all Solana assets in a specific group (e.g. an NFT collection)

  • solanaGetAssetsByOwner

    Get all Solana assets (tokens, NFTs) owned by a specific wallet address

  • solanaGetAssetSignatures

    Get transaction signatures associated with a specific Solana asset

  • solanaGetNftEditions

    Get edition information (master/print editions) for a Solana NFT

  • solanaGetTokenAccounts

    Get Solana SPL token accounts filtered by mint address or owner

  • solanaSearchAssets

    Search for Solana assets with flexible filters (owner, creator, authority, burnt, frozen status)

Dùng MCP Alchemy MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Alchemy MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Alchemy MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Alchemy MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "alchemyplatform-alchemy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@alchemy/mcp-server"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Alchemy MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Alchemy MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Alchemy MCP Server giúp tôi làm việc này không?
Alchemy MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Alchemy MCP Server.

Câu hỏi thường gặp

Máy chủ MCP Alchemy MCP Server dùng để làm gì?

Alchemy MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Alchemy MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Alchemy MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Alchemy MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Alchemy MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Alchemy MCP Server với TypingMind?

Alchemy MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Alchemy MCP Server cung cấp những công cụ nào trong TypingMind?

Alchemy MCP Server cung cấp 97 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Alchemy MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Alchemy MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇