Alchemy MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Alchemy MCP or direct API to fetch blockchain data, send Ethereum transactions, query smart contracts, and monitor on-chain analytics through natural language.

Alchemy logoAlchemy
Api Key

Alchemy is a blockchain development platform offering APIs and tools for Ethereum apps. It simplifies building and scaling Web3 projects with robust infrastructure.

36 Tools

Try Alchemy now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Alchemy
Try asking
TOOLS

Supported Tools

Every Alchemy action and event your agent gets out of the box.

Compute NFT Rarity

Tool to compute the rarity of each attribute for a specific NFT based on its collection.

Get NFT Collection Metadata

Tool to get metadata for an NFT collection using its marketplace slug (OpenSea, LooksRare, etc).

Get Collections for Owner

Tool to retrieve all NFT collections held by a specified owner address.

Get Contract Metadata Batch V3

Tool to retrieve metadata for multiple NFT contracts in a single batch request.

Get Contract Metadata V3

Tool to get the metadata for an NFT contract including name, symbol, total supply, and token type (ERC721/ERC1155).

Get Contracts for Owner (NFT API v3)

Tool to get all NFT contracts owned by an address with contract metadata.

Get NFT Floor Price

Tool to get the floor price for an NFT collection across multiple marketplaces (OpenSea, LooksRare, etc).

Get Historical Token Prices

Retrieves historical price data for a token over a specified time range with configurable intervals.

Get NFT Contracts By Address

Tool to retrieve NFT contracts associated with one or more wallet addresses across multiple blockchain networks.

Get NFT Metadata

Tool to retrieve comprehensive metadata for a specific NFT, including contract details, media URLs, attributes, ownership info, and OpenSea data.

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.

Get NFT Sales V3

Retrieves NFT sales that have occurred through on-chain marketplaces using Alchemy's v3 API.

Get NFTs for Collection V3

Retrieves all NFTs in a collection using OpenSea collection slug or contract address.

Get NFTs for Contract

Retrieves all NFTs for a given NFT contract address.

Get NFTs for Owner

Tool to get all NFTs currently owned by a given address.

Get Owners for Collection

Tool to retrieve all owner addresses for a given NFT collection contract.

Get Owners for Contract

Tool to get all owners of NFTs in a contract with optional token balances.

Get NFT Owners (v3)

Tool to retrieve all owners for a specific NFT using Alchemy's v3 API.

Get Portfolio NFTs By Address

Tool to fetch NFTs owned by multiple wallet addresses across different blockchain networks.

Get Token Prices By Symbol

Tool to get current token prices by symbol (e.

Get Token Balances

This tool retrieves ERC20 token balances for a specified Ethereum address.

Get Token Balances By Address

Tool to get token balances for wallet addresses across multiple networks using Alchemy's Portfolio API.

Get Token Metadata

Retrieves metadata for an ERC-20 token on Ethereum mainnet, including its name, symbol, decimals, and logo URL.

Get Token Prices By Address

Retrieves current token prices by contract address and network from decentralized exchanges (DEXes).

Get Tokens By Address

Tool to fetch fungible tokens (native, ERC-20, SPL) for multiple wallet addresses across networks.

Get Transaction Count

This tool retrieves the number of transactions sent from a specific address (also known as the nonce).

Get Transactions History By Address

Tool to get transaction history for wallet addresses across multiple networks using Alchemy's Data API.

Invalidate NFT Contract Cache

Tool to invalidate the cached metadata for an NFT contract.

Check If NFT Is Airdrop

Tool to check if a specific NFT token is marked as an airdrop.

Check If NFT Is Airdrop

Tool to determine whether an NFT was airdropped to the owner address.

Check Collection Ownership

Tool to check if a wallet address owns any token from a specific NFT collection.

Check NFT Holder Status

Tool to check if a wallet address holds any NFTs from a specific contract.

Check if Contract is Spam

Tool to check if an NFT contract is marked as spam by Alchemy.

Check if Contract is Spam (V3)

Tool to determine if a specific NFT contract is marked as spam by Alchemy.

Search NFT Contract Metadata

Tool to search for keywords across metadata of all ERC-721 and ERC-1155 smart contracts.

Summarize NFT Attributes

Retrieves a comprehensive summary of all attributes and traits for NFTs in a collection, including trait counts and distribution statistics.

SETUP GUIDE

Connect Alchemy MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Install the Composio SDK and Claude Agent SDK
2

Create Tool Router Session

typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
Initialize the Composio client and create a Tool Router session
3

Connect to AI Agent

typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Get NFT contract metadata for 0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85' }],
  stopWhen: stepCountIs( 5 )
});

console.log(`Agent: ${text}`);
Use the MCP server with your AI agent
SETUP GUIDE

Connect Alchemy API Tool with your Agent

1

Install Composio

typescript
npm install @composio/openai
Install the Composio SDK
2

Initialize Composio and Create Tool Router Session

typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
Import and initialize Composio client, then create a Tool Router session
3

Execute Alchemy Tools via Tool Router with Your Agent

typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Show all ERC20 token balances for this wallet address'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
Get tools from Tool Router session and execute Alchemy actions with your Agent

Why Use Composio?

AI Native Alchemy Integration

  • Supports both Alchemy MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Alchemy data

Managed Auth

  • Built-in API Key handling for Alchemy
  • Central place to manage, scope, and revoke Alchemy access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Alchemy
  • Scoped, least privilege access to Alchemy resources
  • Full audit trail of agent actions to support review and compliance
FAQ

Frequently asked questions

Yes, Alchemy requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Start with Alchemy.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Alchemy tool your agent needs.Free to start.

Start building