thirdweb MCP Server
A Model Context Protocol (MCP) server implementation for thirdweb services integration. This server allows you to integrate thirdweb's tools with any MCP-compatible client.
Overview
thirdweb MCP provides a unified interface to access thirdweb's suite of blockchain tools and services through the standardized Model Context Protocol. It supports multiple communication transports and can be integrated with various thirdweb services:
- Nebula: Autonomous onchain execution - real-time on-chain analysis, code generation and contract interactions
- Insight: Blockchain data analysis capabilities for real-time on-chain data
- Engine: Integration with thirdweb's backend infrastructure for contract deployments and interactions
Installation
Prerequisites
- Python 3.10 or higher
- uv
Run with uvx
1THIRDWEB_SECRET_KEY=... \ 2 uvx thirdweb-mcp
Install and run with pipx
1pipx install thirdweb-mcp 2 3THIRDWEB_SECRET_KEY=... \ 4 thirdweb-mcp
Install from source
1git clone https://github.com/thirdweb-dev/ai.git thirdweb-ai 2cd thirdweb-ai/python/thirdweb-mcp 3uv sync
Configuration
The thirdweb MCP server requires configuration based on which services you want to enable:
- thirdweb Secret Key: Required for Nebula and Insight services. Obtain from the thirdweb dashboard.
- Chain IDs: Blockchain network IDs to connect to (e.g., 1 for Ethereum mainnet, 137 for Polygon).
- Engine Configuration: If using the Engine service, you'll need the Engine URL and authentication JWT.
You can provide these through command-line options or environment variables.
Usage
Command-line options
1# Basic usage with default settings (stdio transport with Nebula and Insight) 2THIRDWEB_SECRET_KEY=... thirdweb-mcp 3 4# Using SSE transport on a custom port 5THIRDWEB_SECRET_KEY=... thirdweb-mcp --transport sse --port 8080 6 7# Enabling all services with specific chain IDs 8THIRDWEB_SECRET_KEY=... thirdweb-mcp --chain-id 1 --chain-id 137 \ 9 --engine-url YOUR_ENGINE_URL \ 10 --engine-auth-jwt YOUR_ENGINE_JWT \ 11 --engine-backend-wallet-address YOUR_ENGINE_BACKEND_WALLET_ADDRESS
Environment variables
You can also configure the MCP server using environment variables:
THIRDWEB_SECRET_KEY
: Your thirdweb API secret keyTHIRDWEB_ENGINE_URL
: URL endpoint for thirdweb Engine serviceTHIRDWEB_ENGINE_AUTH_JWT
: Authentication JWT token for EngineTHIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS
: Wallet address for Engine backend
Integration with Claude Desktop
To add this MCP server to Claude Desktop:
-
Install the MCP:
pipx install thirdweb-mcp
-
Create or edit the Claude Desktop configuration file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the following configuration:
1{ 2 "mcpServers": { 3 "thirdweb-mcp": { 4 "command": "thirdweb-mcp", 5 "args": [], // add `--chain-id` optionally 6 "env": { 7 "THIRDWEB_SECRET_KEY": "your thirdweb secret key from dashboard", 8 "THIRDWEB_ENGINE_URL": "(OPTIONAL) your engine url", 9 "THIRDWEB_ENGINE_AUTH_JWT": "(OPTIONAL) your engine auth jwt", 10 "THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS": "(OPTIONAL) your engine backend wallet address", 11 }, 12 } 13 } 14}
-
Restart Claude Desktop for the changes to take effect.
Read more on MCP Quickstart
Integration with MCP clients
This server can be integrated with any client that supports the Model Context Protocol:
- Run the MCP server with the appropriate configuration
- Connect your MCP client to the server using the selected transport (stdio or SSE)
- Access thirdweb services through the exposed MCP tools
Available Services
Nebula
Autonomous onchain execution and analysis:
- Analyze smart contract code
- Contract interactions and deployments
- Autonomous onchain tasks execution
Insight
Offers blockchain data analysis capabilities:
- Query on-chain data across multiple networks
- Analyze transactions, blocks, and smart contract events
- Monitor wallet activities and token movements
Engine
Integrates with thirdweb's backend infrastructure:
- Deploy smart contracts
- Interact with deployed contracts
- Manage wallet connections and transactions
License
Support
For questions or support, please contact [email protected] or visit thirdweb.com.