Starknet MCP Server is a comprehensive Model Context Protocol (MCP) server for the Starknet blockchain. It provides blockchain services to AI agents through MCP, enabling AI assistants to read and write Starknet blockchain data and perform operations using natural language.
In terms of purpose, the server is designed to enable AI agents to interact with the Starknet network, query blockchain data, manage wallets, and interact with smart contracts. All services are exposed through consistent MCP tools and resource interfaces, making it easy for AI agents to discover and use Starknet blockchain functionality. Any tool that accepts a Starknet address supports StarknetID, automatically resolving human-readable identities to addresses in the background.
Main capabilities include: reading blockchain state (balances, transactions, blocks); interacting with Cairo smart contracts; transferring tokens (ETH, STRK, and other ERC20 tokens); handling NFT and token metadata; resolving StarknetID domains (similar to Ethereum ENS); performing read and write operations with appropriate transaction handling. Specific features include: blockchain information queries (chain ID, latest block, block details and transactions, transaction receipts and status, address information and contract data); native token operations (querying ETH and STRK balances of any address, transferring ETH and STRK between accounts, viewing combined native token balances); token operations (querying ERC20 token balances and information, transferring ERC20 tokens, viewing token supply and metadata, checking token ownership, checking NFT ownership by token ID, getting NFT collection information, viewing an address's NFT balance); smart contract interaction (calling read-only contract functions, executing contract writes and confirming transactions, getting contract storage information, viewing ABI and contract class information); StarknetID (resolving Starknet addresses to Starknet IDs, resolving Starknet IDs to addresses, getting a complete Starknet ID profile with verification data, verifying Starknet domains).
Network support includes Mainnet and Sepolia (the Starknet testnet on Ethereum Sepolia).
In terms of usage, the prerequisites are Bun 1.0.0 or higher (recommended) or Node.js 18.0.0 or higher. It can be automatically installed to Claude Desktop via Smithery. Installation options include: running directly with npx without installation; global installation; local project installation and adding it to package.json scripts; running from source or local development (including automatic reload). Default server configuration: default network Mainnet, server port 3000 (HTTP mode), server host 0.0.0.0; these values are hardcoded, and if changes are needed, you can edit src/core/chains.ts (network configuration) and src/server/http-server.ts (server configuration). The server has two running modes. The HTTP server runs on port 3000 by default and provides a REST API and Server-Sent Events (SSE) for real-time communication.
For AI assistant connection, you can connect from Cursor: open Cursor settings, click "Features" on the left, scroll to the "MCP Servers" section, click "Add new MCP server", and enter the server name starknet-mcp-server, type command, and command npx @mcpdotdirect/starknet-mcp-server. You can also create .cursor/mcp.json in the project root for team sharing or reuse within the project. HTTP mode with SSE can be used for web applications. When using Claude CLI, you can connect to the MCP server with two commands. You can use it directly in Cursor, for example by asking "Check the ETH balance of vitalik.stark", "Get information about the latest block on Starknet", "Look up the owner of NFT #123 in collection 0x...". You can also programmatically use the MCP server in a Node.js project, or create a wrapper class around the HTTP API and use libraries such as Axios.
The MCP tools in the API reference include: get_starknet_chain_info, get_supported_starknet_networks, get_starknet_eth_balance, get_starknet_token_balance, get_starknet_strk_balance, get_starknet_native_balances, resolve_starknet_name, resolve_starknet_address, get_starknet_profile, validate_starknet_domain, get_starknet_block, get_starknet_block_transactions, get_starknet_transaction, get_starknet_transaction_receipt, check_starknet_transaction_status, call_starknet_contract, get_starknet_contract_class, execute_starknet_contract, get_starknet_token_info, get_starknet_token_supply, check_starknet_nft_ownership, get_starknet_nft_balance, transfer_starknet_eth, transfer_starknet_strk, transfer_starknet_token. MCP resources include starknet://{network}/chain, starknet://networks, starknet://{network}/block/{blockIdentifier}, starknet://{network}/block/latest, starknet://{network}/address/{address}, starknet://{network}/tx/{txHash}, starknet://{network}/id/address/{address}, starknet://{network}/id/name/{name}, starknet://{network}/id/profile/{address}. MCP prompts include: explore_starknet_block, explore_starknet_address, explore_starknet_transaction, lookup_starknet_id, explore_starknet_id_profile.
Example queries used include: "What's the ETH balance of address 0x04d07e40e93398ed3c76981e449d3446f7c4e52aac5b3e8a37d7b0ca30845a5d?", "Look up the Starknet ID for address 0x04d07e40e93398ed3c76981e449d3446f7c4e52aac5b3e8a37d7b0ca30845a5d", "What's in the latest block on Starknet mainnet?", "Get information about transaction 0x7e3a33ab42f2e24184763563b7b8482b53e3b89831ebc3eacf29d4d11f5198", "Resolve the Starknet ID vitalik.stark to an address".
Regarding limitations and security considerations, private keys are used only for transaction signing, and the server never stores private keys; all token amounts are specified in human-readable format (such as ETH, STRK, token units), not wei or the smallest unit; input parameters should always be validated and sanitized before executing operations; for production environments, consider implementing additional authentication mechanisms, using HTTPS, implementing rate limiting, and considering adding confirmation steps for high-value services. In development conventions, when adding custom tools, resources, or prompts, all resource, tool, and prompt names should use underscores (_) instead of hyphens (-) to ensure compatibility with Cursor and other AI tools.
Other materials include project structure and documentation links (Model Context Protocol, Starknet.js documentation, Starknet documentation, StarknetID documentation); the project uses the MIT License.