python_thirdweb_mcp

python_thirdweb_mcp

by thirdweb-dev
A Model Context Protocol (MCP) server for integrating thirdweb's blockchain tools and services.

Thirdweb MCP Server: Blockchain Integration for Model Context Protocol

The Thirdweb MCP Server is a powerful implementation of the Model Context Protocol (MCP) designed to integrate thirdweb's blockchain tools and services with MCP-compatible clients. This server provides a unified interface for accessing thirdweb's suite of services, including Nebula, Insight, and Engine, enabling seamless blockchain interactions.


Overview

The Thirdweb MCP Server offers a standardized way to connect to thirdweb's blockchain services through the Model Context Protocol. It supports multiple communication transports and integrates with the following thirdweb services:

  • Nebula: Autonomous on-chain execution, including real-time analysis, code generation, and contract interactions.
  • Insight: Blockchain data analysis capabilities for querying and monitoring on-chain data.
  • Engine: Integration with thirdweb's backend infrastructure for smart contract deployments and interactions.

Installation

Prerequisites

  • Python 3.10 or higher
  • uv

Run with uvx

THIRDWEB_SECRET_KEY=... \
    uvx thirdweb-mcp

Install and Run with pipx

pipx install thirdweb-mcp

THIRDWEB_SECRET_KEY=... \
    thirdweb-mcp

Install from Source

git clone https://github.com/thirdweb-dev/ai.git thirdweb-ai
cd thirdweb-ai/python/thirdweb-mcp
uv sync

Configuration

The Thirdweb MCP Server requires the following configurations:

  1. Thirdweb Secret Key: Required for Nebula and Insight services. Obtain it from the thirdweb dashboard.
  2. Chain IDs: Specify blockchain network IDs (e.g., 1 for Ethereum mainnet, 137 for Polygon).
  3. Engine Configuration: If using the Engine service, provide the Engine URL, authentication JWT, and backend wallet address.

These configurations can be provided via command-line options or environment variables.


Usage

Command-Line Options

# Basic usage with default settings
THIRDWEB_SECRET_KEY=... thirdweb-mcp 

# Using SSE transport on a custom port
THIRDWEB_SECRET_KEY=... thirdweb-mcp --transport sse --port 8080

# Enabling all services with specific chain IDs
THIRDWEB_SECRET_KEY=... thirdweb-mcp --chain-id 1 --chain-id 137 \
    --engine-url YOUR_ENGINE_URL \
    --engine-auth-jwt YOUR_ENGINE_JWT \ 
    --engine-backend-wallet-address YOUR_ENGINE_BACKEND_WALLET_ADDRESS

Environment Variables

  • THIRDWEB_SECRET_KEY: Your thirdweb API secret key.
  • THIRDWEB_ENGINE_URL: URL endpoint for thirdweb Engine service.
  • THIRDWEB_ENGINE_AUTH_JWT: Authentication JWT token for Engine.
  • THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS: Wallet address for Engine backend.

Integration with Claude Desktop

  1. Install the MCP:
    shell pipx install thirdweb-mcp
  2. Edit the Claude Desktop configuration file:
  3. macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  4. Windows: %APPDATA%\Claude\claude_desktop_config.json
  5. Linux: ~/.config/Claude/claude_desktop_config.json
  6. Add the following configuration:
    json { "mcpServers": { "thirdweb-mcp": { "command": "thirdweb-mcp", "args": [], // add `--chain-id` optionally "env": { "THIRDWEB_SECRET_KEY": "your thirdweb secret key from dashboard", "THIRDWEB_ENGINE_URL": "(OPTIONAL) your engine url", "THIRDWEB_ENGINE_AUTH_JWT": "(OPTIONAL) your engine auth jwt", "THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS": "(OPTIONAL) your engine backend wallet address", }, } } }
  7. Restart Claude Desktop.

Integration with MCP Clients

  1. Run the MCP server with the appropriate configuration.
  2. Connect your MCP client to the server using the selected transport (stdio or SSE).
  3. Access thirdweb services through the exposed MCP tools.

Available Services

Nebula

  • Analyze smart contract code.
  • Execute contract interactions and deployments.
  • Perform autonomous on-chain tasks.

Insight

  • Query on-chain data across multiple networks.
  • Analyze transactions, blocks, and smart contract events.
  • Monitor wallet activities and token movements.

Engine

  • Deploy smart contracts.
  • Interact with deployed contracts.
  • Manage wallet connections and transactions.

License

This project is licensed under the Apache-2.0 License.


Support

For questions or support, contact [email protected] or visit thirdweb.com.

Features & Capabilities

Categories
mcp_server model_context_protocol python blockchain api_integration nebula insight engine

Implementation Details

Stats

0 Views
7 GitHub Stars

Repository Info

thirdweb-dev Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300