AI

MCP server

You can use the thirdweb MCP server to interact with the thirdweb API from your agents or LLM client.

Remote MCP endpoint

You can access the MCP server at the following url, with your project secret key.

https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>

Make sure to keep your secret key safe and never share it with anyone.

By default, all tools are available. You can filter the tools available by passing a comma-separated list of tools as a query parameter.

https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>&tools=fetchWithPayment,getWalletBalance

You can find all available tools at the bottom of this page.

Usage with agents

Use your favorite agent framework to plug in the MCP server as a collection of tools for your agent. Refer to your agent framework's documentation for more information.

Example usage with langchain:

import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
const mcpServers = {
thirdweb: {
url: `https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>`,
},
};
// Connect to MCP servers and get tools
const client = new MultiServerMCPClient(mcpServers);
const tools = await client.getTools();
const agent = createReactAgent({
llm: model,
tools: tools,
});
await agent.invoke({
messages: [
{
role: "user",
content: "create a server wallet called 'my-wallet'",
},
],
});

Once installed, you can use the entire thirdweb API with natural language.

Usage with LLM clients

You can also use the MCP server on your own LLM client, like cursor, claude code and more. Refer to your LLM client's documentation for more information.

Install into Cursor

Add the following to your .cursor/mcp.json file (replace YOUR_SECRET_KEY_HERE with your thirdweb secret key):

{
"mcpServers": {
"thirdweb-api": {
"url": "https://api.thirdweb.com/mcp?secretKey=YOUR_SECRET_KEY_HERE"
}
}
}

Example prompts

Managing server wallets

List my server wallets
Create a server wallet called treasury
What's the balance of treasury wallet?

Managing contracts

List my contracts

Executing transactions

approve 100 USDC from treasury wallet to executor wallet

Available tools

Currently, the following tools are available:

  • initiateAuthentication
  • completeAuthentication
  • linkAuthentication
  • unlinkAuthentication
  • getMyWallet
  • listUserWallets
  • createUserWallet
  • listServerWallets
  • createServerWallet
  • getWalletBalance
  • getWalletTransactions
  • getWalletTokens
  • getWalletNFTs
  • signMessage
  • signTypedData
  • sendTokens
  • listContracts
  • deployContract
  • readContract
  • writeContract
  • getContractTransactions
  • getContractEvents
  • getContractMetadata
  • getContractSignatures
  • getTransactionById
  • listTransactions
  • sendTransactions
  • createPayment
  • paymentsPurchase
  • getPaymentHistory
  • fetchWithPayment
  • createToken
  • listTokens
  • getTokenOwners
  • getBridgeChains
  • convertFiatToCrypto
  • bridgeSwap
  • chat