# Alchemy — how to use (mcp.ai)

Connect your Alchemy account and use 36 tools for developer tools straight from your AI agent. Connect with your own API key. Alchemy is a blockchain development platform that provides powerful APIs and developer tools for building and scaling Ethereum applications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_alchemy?ms=1787293380000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `alchemy_compute_rarity_v3`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/alchemy`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/alchemy/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/alchemy/compute/rarity/v3` — Tool to compute the rarity of each attribute for a specific NFT based on its collection. Returns prevalence data for each trait, indicating how common or rare each attribute is compared to other NFTs 
  - body: { tokenId: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/get/collection/metadata` — Tool to get metadata for an NFT collection using its marketplace slug (OpenSea, LooksRare, etc). Use when you need collection-level information such as name, description, social links, and floor price
  - body: { collectionSlug: string }
- `POST https://api.mcp.ai/api/alchemy/get/collections/for/owner` — Tool to retrieve all NFT collections held by a specified owner address. Use when you need to get a comprehensive view of what NFT collections a wallet owns, including collection metadata, ownership co
  - body: { owner: string, pageKey?: string, pageSize?: integer, withMetadata?: boolean, excludeFilters?: string[], includeFilters?: string[] }
- `POST https://api.mcp.ai/api/alchemy/get/contract/metadata/batch/v3` — Tool to retrieve metadata for multiple NFT contracts in a single batch request. Use when you need to fetch contract information for several NFT collections at once to improve efficiency and reduce API
  - body: { contractAddresses: string[] }
- `POST https://api.mcp.ai/api/alchemy/get/contract/metadata/v3` — Tool to get the metadata for an NFT contract including name, symbol, total supply, and token type (ERC721/ERC1155). Use when you need to retrieve comprehensive contract information such as deployer ad
  - body: { contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/get/contracts/for/owner/v3` — Tool to get all NFT contracts owned by an address with contract metadata. Use when you need to retrieve a comprehensive list of NFT collections held by a specific wallet address, including detailed co
  - body: { owner: string, orderBy?: string, pageKey?: string, pageSize?: integer, withMetadata?: boolean, excludeFilters?: string[], includeFilters?: string[], spamConfidenceLevel?: string }
- `POST https://api.mcp.ai/api/alchemy/get/floor/price/v3` — Tool to get the floor price for an NFT collection across multiple marketplaces (OpenSea, LooksRare, etc). Use when you need to check the current floor price of an NFT collection or compare prices acro
  - body: { collectionSlug?: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/get/historical/prices` — Retrieves historical price data for a token over a specified time range with configurable intervals. Identify the token either by symbol (e.g., ETH, BTC) or by network and contract address. Use this t
  - body: { symbol?: string, address?: string, network?: string, end_time: integer|string, interval?: string, start_time: integer|string, with_market_data?: boolean }
- `POST https://api.mcp.ai/api/alchemy/get/nf/ts/for/collection/v3` — Retrieves all NFTs in a collection using OpenSea collection slug or contract address. Use when you need to fetch NFTs by collection name rather than contract address. Similar to getNFTsForContract but
  - body: { limit?: integer, start_token?: string, with_metadata?: boolean, collection_slug?: string, contract_address?: string, token_uri_timeout_ms?: integer }
- `POST https://api.mcp.ai/api/alchemy/get/nf/ts/for/contract` — Retrieves all NFTs for a given NFT contract address. Supports both ERC721 and ERC1155 token standards. Returns detailed NFT data including token IDs, metadata, images, and attributes. Use this to anal
  - body: { limit?: integer, start_token?: string, with_metadata?: boolean, contract_address: string, token_uri_timeout_ms?: integer }
- `POST https://api.mcp.ai/api/alchemy/get/nf/ts/for/owner` — Tool to get all NFTs currently owned by a given address. Supports ERC721 and ERC1155 tokens on Ethereum and L2s including Polygon, Arbitrum, Optimism, Base. Use when you need to retrieve NFT holdings 
  - body: { owner: string, orderBy?: string, pageKey?: string, pageSize?: integer, withMetadata?: boolean, excludeFilters?: string[], includeFilters?: string[], contractAddresses?: string[], spamConfidenceLevel?: string, tokenUriTimeoutInMs?: integer }
- `POST https://api.mcp.ai/api/alchemy/get/nft/contracts/by/address` — Tool to retrieve NFT contracts associated with one or more wallet addresses across multiple blockchain networks. Use when you need to discover which NFT collections a wallet owns tokens from, across n
  - body: { pageKey?: string, pageSize?: integer, addresses: object[], withMetadata?: boolean, excludeFilters?: string[], includeFilters?: string[], spamConfidenceLevel?: string }
- `POST https://api.mcp.ai/api/alchemy/get/nft/metadata` — Tool to retrieve comprehensive metadata for a specific NFT, including contract details, media URLs, attributes, ownership info, and OpenSea data. Use when you need detailed information about a particu
  - body: { tokenId: string, tokenType?: string, refreshCache?: boolean, contractAddress: string, tokenUriTimeoutInMs?: integer }
- `POST https://api.mcp.ai/api/alchemy/get/nft/metadata/batch` — Tool to retrieve metadata for multiple NFTs in a single request (up to 100 NFTs), including contract details, media URLs, attributes, and collection data. Use when you need detailed information about 
  - body: { tokens: object[], refreshCache?: boolean, tokenUriTimeoutInMs?: integer }
- `POST https://api.mcp.ai/api/alchemy/get/nft/sales/v3` — Retrieves NFT sales that have occurred through on-chain marketplaces using Alchemy's v3 API. Supports Ethereum (Seaport, Wyvern, X2Y2, Blur, LooksRare, Cryptopunks), Polygon (Seaport), and Optimism (S
  - body: { limit?: integer, order?: string, taker?: string, page_key?: string, to_block?: string, token_id?: string, from_block?: string, marketplace?: string, buyer_address?: string, seller_address?: string, contract_address?: string }
- `POST https://api.mcp.ai/api/alchemy/get/owners/for/collection` — Tool to retrieve all owner addresses for a given NFT collection contract. Use when you need to analyze NFT ownership distribution, find all holders of a collection, or build ownership analytics for ER
  - body: { pageKey?: string, contractAddress: string, withTokenBalances?: boolean }
- `POST https://api.mcp.ai/api/alchemy/get/owners/for/contract` — Tool to get all owners of NFTs in a contract with optional token balances. Use when you need to analyze NFT holder distribution, prepare airdrops, or identify token owners for specific collections.
  - body: { pageKey?: string, contractAddress: string, withTokenBalances?: boolean }
- `POST https://api.mcp.ai/api/alchemy/get/owners/for/nftv3` — Tool to retrieve all owners for a specific NFT using Alchemy's v3 API. For ERC-721 tokens returns single owner, for ERC-1155 tokens returns all owners with quantities. Use when you need to identify cu
  - body: { tokenId: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/get/portfolio/nf/ts/by/address` — Tool to fetch NFTs owned by multiple wallet addresses across different blockchain networks. Returns comprehensive NFT metadata including contract details, images, attributes, and ownership information
  - body: { orderBy?: string, pageKey?: string, pageSize?: integer, addresses: object[], sortOrder?: string, withMetadata?: boolean, excludeFilters?: string[], includeFilters?: string[], spamConfidenceLevel?: string }
- `POST https://api.mcp.ai/api/alchemy/get/prices/by/symbol` — Tool to get current token prices by symbol (e.g., ETH, USDC, BTC) using aggregated CEX and DEX data. Use when you need real-time cryptocurrency prices in USD or other currencies. Supports up to 25 sym
  - body: { symbols: string[] }
- `POST https://api.mcp.ai/api/alchemy/get/token/balances` — This tool retrieves ERC20 token balances for a specified Ethereum address. It can either return balances for all tokens an address has ever interacted with or for a specific set of token contract addr
  - body: { address: string, page_key?: string, max_count?: integer, contract_addresses?: string[] }
- `POST https://api.mcp.ai/api/alchemy/get/token/balances/by/address` — Tool to get token balances for wallet addresses across multiple networks using Alchemy's Portfolio API. Use when you need lightweight balance checks for one or more addresses without full token metada
  - body: { pageKey?: string, addresses: object[], includeErc20Tokens?: boolean, includeNativeTokens?: boolean }
- `POST https://api.mcp.ai/api/alchemy/get/token/metadata` — Retrieves metadata for an ERC-20 token on Ethereum mainnet, including its name, symbol, decimals, and logo URL. This information is essential for displaying token details in user interfaces, calculati
  - body: { contract_address: string }
- `POST https://api.mcp.ai/api/alchemy/get/token/prices/by/address` — Retrieves current token prices by contract address and network from decentralized exchanges (DEXes). Use when you need real-time token price data for specific contract addresses across multiple networ
  - body: { addresses: object[] }
- `POST https://api.mcp.ai/api/alchemy/get/tokens/by/address` — Tool to fetch fungible tokens (native, ERC-20, SPL) for multiple wallet addresses across networks. Returns comprehensive token information including balances, metadata (name, symbol, decimals, logo), 
  - body: { pageKey?: string, addresses: object[], withPrices?: boolean, withMetadata?: boolean, includeErc20Tokens?: boolean, includeNativeTokens?: boolean }
- `POST https://api.mcp.ai/api/alchemy/get/transaction/count` — This tool retrieves the number of transactions sent from a specific address (also known as the nonce). It uses the eth_getTransactionCount endpoint to return the transaction count for an address at a 
  - body: { address: string, block_tag?: string }
- `POST https://api.mcp.ai/api/alchemy/get/transactions/history/by/address` — Tool to get transaction history for wallet addresses across multiple networks using Alchemy's Data API. Use when you need to retrieve historical transactions with detailed metadata including logs and 
  - body: { after?: string, limit?: integer, before?: string, pageKey?: string, addresses: object[] }
- `POST https://api.mcp.ai/api/alchemy/invalidate/contract/v3` — Tool to invalidate the cached metadata for an NFT contract. Use when you need to force a refresh of stale or outdated NFT metadata on the next request. This is useful after contract updates or when me
  - body: { network?: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/is/airdrop` — Tool to check if a specific NFT token is marked as an airdrop. Use when you need to determine whether an NFT was distributed via airdrop mechanism. Returns true if the token is identified as an airdro
  - body: { tokenId: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/is/airdrop/nft` — Tool to determine whether an NFT was airdropped to the owner address. Use when you need to identify if a specific token was received as an airdrop rather than through a purchase or mint.
  - body: { tokenId: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/is/holder/of/collection` — Tool to check if a wallet address owns any token from a specific NFT collection. Use this when you need to verify collection ownership without retrieving full NFT details, supporting both ERC721 and E
  - body: { wallet: string, contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/is/holder/of/contract` — Tool to check if a wallet address holds any NFTs from a specific contract. Use when you need to verify NFT ownership for access control, membership verification, or token-gating features. Supports bot
  - body: { wallet: string, contract_address: string }
- `POST https://api.mcp.ai/api/alchemy/is/spam/contract` — Tool to check if an NFT contract is marked as spam by Alchemy. Use when you need to verify the legitimacy of an NFT contract before interacting with it or displaying its assets. Returns true if the co
  - body: { contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/is/spam/contract/v3` — Tool to determine if a specific NFT contract is marked as spam by Alchemy. Use when you need to verify the legitimacy of an NFT contract address before interacting with it. Available on paid Alchemy t
  - body: { contractAddress: string }
- `POST https://api.mcp.ai/api/alchemy/search/contract/metadata/v3` — Tool to search for keywords across metadata of all ERC-721 and ERC-1155 smart contracts. Use when you need to find NFT collections by name, symbol, or description keywords. Returns contract addresses,
  - body: { query: string }
- `POST https://api.mcp.ai/api/alchemy/summarize/nft/attributes` — Retrieves a comprehensive summary of all attributes and traits for NFTs in a collection, including trait counts and distribution statistics. Use this to analyze rarity, understand collection compositi
  - body: { contract_address: string }

## Example prompts
- "What can I do in Alchemy?"
- "Show me a summary of my Alchemy account"

## More
- Page: https://mcp.ai/alchemy
- Agent spec (llms.txt): https://mcp.ai/alchemy/llms.txt
- Postman collection: https://mcp.ai/alchemy/postman.json
