starknet
Starknet MCP server.
claude mcp add --transport stdio abdelstark-starknet-mcp node path/to/server.js \ --env PORT="9000 (for SSE mode)" \ --env NODE_ENV="development or production" \ --env LOG_LEVEL="Logs at level (debug, info, warn, error)" \ --env SERVER_MODE="stdio or sse" \ --env STAKNET_RPC_URL="https://..."
How to use
This MCP server enables AI models to interact with Starknet by exposing a simple toolset that fetches data from the Starknet blockchain. The server primarily provides the get_block tool, which retrieves the latest block information from Starknet using a configured RPC endpoint. You can customize the behavior through environment variables such as the log level, server mode, and RPC URL. Start the server in development or production mode and use the provided tool interface to request the latest block data, then integrate that data into your prompts or workflows. The server is designed to be lightweight and easily pluggable into MCP client workflows, allowing you to wire it into downstream AI applications that need real-time blockchain context.
How to install
Prerequisites:
- Node.js 18+ installed on your system
- Git for cloning the repository (optional if you install via Smithery)
- Access to the internet to install dependencies
Manual installation steps:
- Clone the repository:
git clone https://github.com/AbdelStark/starknet-mcp
cd starknet-mcp
- Install dependencies:
npm install
- Create and configure environment variables:
- Copy the example env file (if provided) or create a new .env with the required vars:
cp .env.example .env # if available
- Run in development mode (with hot reload if configured):
npm run dev
- Run in production mode:
npm start
- If you prefer Smithery installation (recommended for one-click setup):
npx -y @smithery/cli install @AbdelStark/starknet-mcp --client claude
Note: Ensure you set the necessary environment variables in your deployment environment, such as LOG_LEVEL, NODE_ENV, SERVER_MODE, PORT (for SSE), and STAKNET_RPC_URL (the Starknet RPC endpoint).
Additional notes
Tips and common considerations:
- The server exposes at least the get_block tool to fetch the latest Starknet block. If you plan to extend with more Starknet interactions (e.g., contract calls), you may need to add additional tools or endpoints.
- Verify that STAKNET_RPC_URL points to a valid Starknet RPC endpoint and is reachable from your hosting environment.
- SERVER_MODE should be sse for streaming-style interactions or stdio for standard input/output; pick the mode that matches your MCP client.
- If you encounter port binding issues, ensure PORT is not in use and that your environment allows binding to that port.
- Use LOG_LEVEL=debug during troubleshooting to get more verbose logs.
- The npm package name for this server is @AbdelStark/starknet-mcp, which you can reference in your MCP client configurations or Smithery deployments.
Related MCP Servers
gemini-cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
mcp-memory-keeper
MCP server for persistent context management in AI coding assistants
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.
Model Context Protocol (MCP) server for LinkedIn API integration
mcpresso
TypeScript framework to build robust, agent-ready MCP servers around your APIs.
mcp -amazon
🛍📦 Unofficial Amazon Model Context Protocol Server (MCP) - Search products and purchase directly from Claude AI! ✨