📇 ☁️ - Starknet blockchain integration: native tokens (ETH, STRK), smart contracts, StarknetID resolution and…
Starknet MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A comprehensive Model Context Protocol (MCP) server for the Starknet blockchain. This server provides AI agents with the ability to interact with Starknet networks, query blockchain data, manage wallets, and interact with smart contracts.
📋 Contents
- Overview
- Features
- Supported Networks
- Prerequisites
- Installation
- Server Configuration
- Usage
- API Reference
- Tools
- Resources
- Prompts
- Usage with AI Assistants
- Security Considerations
- Project Structure
- Development Conventions
- Documentation
- License
🔭 Overview
The Starknet MCP Server leverages the Model Context Protocol to provide blockchain services to AI agents. It offers a comprehensive interface to the Starknet ecosystem, powering AI assistants with the ability to interact with Starknet blockchain data and operations through natural language.
Key capabilities include:
- Reading blockchain state (balances, transactions, blocks)
- Interacting with Cairo smart contracts
- Transferring tokens (ETH, STRK, and other ERC20 tokens)
- Working with NFTs and token metadata
- Resolving StarknetID domains (similar to ENS for Ethereum)
- Making both read and write operations with proper transaction handling
All services are exposed through a consistent interface of MCP tools and resources, making it easy for AI agents to discover and use Starknet blockchain functionality. **Every tool that accepts Starknet addresses also supports StarknetID**, automatically resolving human-readable identities to addresses behind the scenes.
✨ Features
- **Starknet Integration**: Full Starknet blockchain integration using Starknet.js
- **Network Support**: Supports both Mainnet and Sepolia testnet
- **StarknetID Integration**: Resolution of Starknet IDs to addresses and vice versa
- **Native Token Support**: Support for both ETH and STRK native tokens
- **Smart Contract Interaction**: Call and query Starknet smart contracts
- **Dual Transport**: Run as stdio server or HTTP server for different integration needs
- **AI-Ready**: Designed to be used with Claude, GPT, and other AI assistants
Blockchain Information
- Query chain information (chain ID, latest block)
- Explore block details and transactions
- View transaction receipts and status
- Get address information and contract data
Native Token Operations
- Get ETH and STRK balances for any address
- Transfer ETH and STRK between accounts
- View combined native token balances
Token Operations
- Get ERC20 token balances and information
- Transfer ERC20 tokens
- View token supply and metadata
- Check token ownership
NFT Operations
- Check NFT ownership by token ID
- Get NFT collection information
- View NFT balances for addresses
Smart Contract Interaction
- Call read-only contract functions
- Execute contract writes with transaction confirmation
- Get contract storage information
- View ABIs and contract class information
StarknetID
- Resolve Starknet addresses to Starknet IDs
- Resolve Starknet IDs to addresses
- Get complete Starknet ID profiles with verification data
- Validate Starknet domains
🔧 Networks Supported
The server supports the following Starknet networks:
- **Mainnet**: The primary Starknet production network
- **Sepolia**: Starknet's testnet on Ethereum's Sepolia
🛠️ Prerequisites
- Bun 1.0.0 or higher (recommended)
- Node.js 18.0.0 or higher
📦 Installation
Installing via Smithery
To install starknet-mcp-server for Claude Desktop automatically via Smithery:
Option 1: Use without installation (npx)
The easiest way to get started is to use npx to run the package directly:
This will automatically download and run the latest version without needing to install it first.
Option 2: Global installation
If you plan to use it frequently, you can install it globally:
Option 3: Local project installation
Then add to your package.json scripts:
Option 4: Running from source
If you want to run from source or develop locally: