Starknet

Model context protocol server for Starknet RPC
  • typescript

9

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You have a Starknet MCP Server that exposes Starknet RPC methods through the MCP protocol. It runs locally and lets you query Starknet data via a centralized MCP client, making it easier to build conversational or automation flows around Starknet data without calling the RPC directly from your code.

How to use

You connect to the Starknet MCP Server from your MCP client (for example, Claude Desktop) using the MCP configuration you provide. When you ask questions about Starknet, the client can route questions to the MCP server to fetch data such as blocks, transactions, state updates, storage values, and more. The server lists all Starknet RPC methods it exposes; you’ll see the method name, input, and output for any method your client uses. If the client needs to call an MCP method to answer your question, it will prompt you for permission and then execute the method on the server.

You can use it to obtain data like the latest block, block transactions, account state, or transaction receipts. The server provides the following Starknet RPC methods, which you can request through your MCP client as you query Starknet state and history.

How to install

# Prerequisites
- Node.js or Bun (as required by the MCP server build)
- A machine with internet access to install dependencies

# Quick install flow (example)
# 1. Install Bun (or Node.js if you prefer npm-based flow)
# Follow Bun installation instructions suitable for your OS

# 2. Clone the MCP server repository
# (Replace with the actual path to the Starknet MCP server you plan to run)
# git clone https://example.com/your/starknet-mcp.git

# 3. Install dependencies
bun install

# 4. Update the MCP client configuration to point to this server (see below)

# 5. Start using it with your MCP client

Configuration is provided to run the MCP server locally as a stdio server using Bun. You will reference the local Starknet MCP server script from your MCP client configuration. The example below shows how Claude Desktop could load this server into its MCP config. Replace the path with the actual location of the Starknet MCP server entry point on your system.

Configuration example

{
  "mcpServers": {
    "starknet": {
      "command": "bun",
      "args": ["/PATH/TO/THIS/REPO/starknet-mcp/index.ts"],
      "env": {
        "STARKNET_RPC_URL": "https://starknet-mainnet.public.blastapi.io/rpc/v0_7"
      }
    }
  }
}

What you’ll see in the client

After you configure the MCP client, you will be able to ask questions that require Starknet data. The client will show you which MCP method is used, along with the input provided and the output returned by the server. If a request requires an unsupported method, you’ll know it because the client will indicate that the method is not yet supported.

Notes and caveats

Methods starknet_estimateFee and starknet_estimateMessageFee are not yet supported by this server. If you encounter tool input issues, you can adjust your requests to use supported methods first.

Security considerations

Keep the Starknet RPC URL used by the server secure. Only expose the MCP endpoint to trusted clients, and rotate credentials or endpoints if you notice unusual activity.

Troubleshooting

If you run into permission prompts or input schema mismatches from your MCP client, ensure you are using a compatible MCP client version and that the server is reachable at the configured environment URL. If errors persist, verify that STARKNET_RPC_URL is set correctly and that Bun can execute the entry script without permission issues.

Examples and tips

Ask questions like: “What is the latest block hash and number on Starknet?” or “Show me the receipt for a specific transaction,” and the MCP client will route those queries to the STARKNET MCP server to fetch the data.

Supported methods

The MCP server exposes a broad set of Starknet RPC methods. These are the methods you can call through the MCP client to retrieve data such as blocks, transactions, receipts, class information, and chain metadata.

Available tools

starknet_getBlockWithTxHashes

Fetch a block with transaction hashes for a given block identifier.

starknet_getBlockWithTxs

Fetch a block with full transaction objects for a given block identifier.

starknet_getBlockWithReceipts

Fetch a block including receipts for each transaction in the block.

starknet_getStateUpdate

Retrieve a state update for a given Starknet state change.

starknet_getStorageAt

Get storage value at a specific contract storage slot.

starknet_getTransactionStatus

Query the status of a transaction by hash.

starknet_getTransactionByHash

Retrieve a transaction by its hash.

starknet_getTransactionByBlockIdAndIndex

Get a transaction by its position in a block.

starknet_getTransactionReceipt

Fetch the receipt for a transaction by hash.

starknet_getClass

Retrieve class information by class hash.

starknet_getClassHashAt

Get the class hash at a specific contract address and block.

starknet_getClassAt

Fetch the class (contract interface) at a specific address.

starknet_getBlockTransactionCount

Get number of transactions in a block.

starknet_call

Simulate a contract call without modifying state.

starknet_getEvents

Query events emitted by transactions.

starknet_getNonce

Get the nonce for an address.

starknet_blockNumber

Get the current block number.

starknet_blockHashAndNumber

Fetch the latest block hash and number.

starknet_chainId

Get the chain ID of the Starknet network.

starknet_syncing

Check if the node is syncing.

starknet_specVersion

Retrieve the current Starknet protocol spec version.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational