starknet
MCP server that provides LLM with tools for interacting with Starknet
claude mcp add --transport stdio mcpdotdirect-starknet-mcp-server npx -y @mcpdotdirect/starknet-mcp-server
How to use
The Starknet MCP Server provides AI-ready access to Starknet blockchain data and operations through the MCP (Model Context Protocol) interface. It exposes tools for querying blockchain state, interacting with Cairo smart contracts, transferring native tokens (ETH and STRK), handling NFTs and token metadata, resolving StarknetIDs, and performing both read and write operations with proper transaction handling. The server can run in stdio mode for CLI and AI assistant integrations or in HTTP mode for web applications, with a consistent tool and resource interface that makes it easy for agents to discover and compose tasks against Starknet. Every tool that accepts Starknet addresses automatically resolves StarknetID to addresses behind the scenes, simplifying interactions for agents and users alike.
To use the server from your environment, you can run it via npx or install globally and call it from your terminal or integrate it into your applications. In stdio mode, you can issue commands and receive structured MCP responses suitable for conversational agents. In HTTP mode, the server exposes REST endpoints and Server-Sent Events (SSE) for real-time updates, enabling easy integration with web apps, dashboards, or automation scripts.
How to install
Prerequisites:
- Node.js 18.0.0 or higher
- (Optional) Bun is recommended but not required
Installation options:
-
Quick run with npx (no install required)
- Command: npx @mcpdotdirect/starknet-mcp-server
- To run the HTTP interface: npx @mcpdotdirect/starknet-mcp-server http
-
Global installation for frequent use
- Command: npm install -g @mcpdotdirect/starknet-mcp-server
- Run from anywhere: starknet-mcp-server starknet-mcp-server http
-
Local project installation
- Command: npm install @mcpdotdirect/starknet-mcp-server
- Using yarn: yarn add @mcpdotdirect/starknet-mcp-server
- Using pnpm: pnpm add @mcpdotdirect/starknet-mcp-server
- Add scripts to package.json: "scripts": { "starknet-mcp": "starknet-mcp-server", "starknet-mcp-http": "starknet-mcp-server http" }
-
Running from source (development)
- Clone the repo: git clone https://github.com/mcpdotdirect/starknet-mcp-server.git cd starknet-mcp-server
- Install dependencies: npm install
- Start the stdio server: npm start
- Start the HTTP server: npm run start:http
- For development with auto-reload: npm run dev npm run dev:http
Additional notes
Notes and tips:
- The default HTTP server runs on port 3000 and uses 0.0.0.0 as the host; modify configuration in src/core/chains.ts and src/server/http-server.ts if needed.
- You can run the server in two modes: stdio (CLI/AI assistants) and HTTP (web apps); use the appropriate command variant when starting the server.
- If you plan to integrate with Cursor or other clients, you can configure mcp.json files or Cursor’s MCP server settings to reference the npx command or a local installation path.
- When using StarknetID, the server will automatically resolve human-readable identities to addresses behind the scenes for tools that accept Starknet addresses.
- Ensure network access and required prerequisites are met (Node.js, Bun if used) to avoid environment-related startup issues.
Related MCP Servers
evm
MCP server that provides LLMs with tools for interacting with EVM networks
mcp-use-ts
mcp-use is the framework for MCP with the best DX - Build AI agents, create MCP servers with UI widgets, and debug with built-in inspector. Includes client SDK, server SDK, React hooks, and powerful dev tools.
marinade-finance
Marinade Finance MCP Server is an MCP server specifically designed for the Marinade Finance.
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.
mcp-klever-vm
MCP server for Klever blockchain smart contract development
mcp-web-search-tool
A MCP server providing real-time web search capabilities to any AI model.