starknet-mcp-server
Starknet MCP Server: AI-powered access to Starknet blockchain. Interact with contracts, query data, and manage assets using natural language.

starknet-mcp-server Solution Overview
The starknet-mcp-server
is a Model Context Protocol (MCP) server designed to provide AI agents with seamless access to the Starknet blockchain. It empowers AI models to interact with Starknet networks, query blockchain data, manage wallets, and engage with smart contracts using natural language.
This server offers a comprehensive suite of tools and resources for reading blockchain state, transferring tokens (ETH, STRK, and ERC20), working with NFTs, and resolving StarknetID domains. It supports both Mainnet and Sepolia testnet, ensuring flexibility for development and deployment. By exposing Starknet functionality through a consistent MCP interface, it simplifies integration for AI agents, enabling them to discover and utilize blockchain capabilities effortlessly.
Developers benefit from its dual transport capability, running as a stdio or HTTP server to suit different integration needs. The server leverages Starknet.js for robust blockchain interaction and supports both read and write operations with proper transaction handling, making it an invaluable asset for AI-driven blockchain applications.
starknet-mcp-server Key Capabilities
Starknet Blockchain Interaction
The starknet-mcp-server
provides a comprehensive interface for AI agents to interact with the Starknet blockchain. It allows AI models to query blockchain data, manage wallets, and interact with smart contracts using natural language. This is achieved through a consistent set of MCP tools and resources, making it easy for AI agents to discover and utilize Starknet blockchain functionality. The server supports 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, and making both read and write operations with proper transaction handling.
For example, an AI agent can use this server to check the ETH balance of a specific Starknet address or initiate a token transfer between two accounts, all through simple, natural language commands. This feature simplifies blockchain interaction for AI models, enabling them to leverage the power of Starknet without requiring deep technical knowledge of blockchain protocols. The server uses starknet.js
for Starknet integration.
StarknetID Resolution
This feature enables AI agents to seamlessly resolve Starknet IDs to their corresponding addresses and vice versa. StarknetID is a human-readable identifier similar to ENS on Ethereum, making it easier to interact with blockchain accounts. The starknet-mcp-server
automatically resolves Starknet IDs to addresses behind the scenes for any tool that accepts Starknet addresses. This eliminates the need for AI models to handle complex address conversions, allowing them to work with more intuitive and user-friendly identifiers.
For instance, an AI agent can be instructed to "transfer 10 ETH to vitalik.stark" without needing to know the recipient's actual Starknet address. The server will automatically resolve the Starknet ID to the correct address and execute the transaction. This feature enhances the usability of Starknet for AI agents, making it easier to interact with accounts and perform transactions. The server uses the starknetid.js
library for StarknetID resolution.
Dual Transport Support
The starknet-mcp-server
offers flexibility in deployment and integration through its dual transport support, allowing it to run as either a standard input/output (stdio) server or an HTTP server. The stdio mode is ideal for integration with CLI tools and AI assistants that communicate through command-line interfaces. The HTTP mode, on the other hand, is suitable for web applications that require a REST API or Server-Sent Events (SSE) for real-time communication.
For example, an AI assistant like Cursor can connect to the server in stdio mode, while a web application can connect via HTTP to display real-time blockchain data. This dual transport capability ensures that the starknet-mcp-server
can be seamlessly integrated into a wide range of environments and applications, providing developers with the flexibility to choose the most appropriate communication method for their specific needs. The HTTP server is built using Node.js and exposes both a REST API and SSE endpoints.