This MCP server for Starknet allows access to Starknet blockchain data directly from Claude. It implements various read methods from the Starknet JSON-RPC API, enabling you to query blockchain state, transactions, blocks, and other on-chain information through the Model Context Protocol.
To get started with the Starknet MCP server:
bun install
claude_desktop_config.json
):
{
"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"
}
}
}
}
Once properly configured, Claude will be able to access Starknet blockchain data through the MCP server. You can interact with the Starknet blockchain by asking Claude questions about:
Simply ask Claude questions like:
When Claude needs to access blockchain data, it will request your permission to use the appropriate MCP method. The request will display:
The server supports the following read methods:
starknet_getBlockWithTxHashes
starknet_getBlockWithTxs
starknet_getBlockWithReceipts
starknet_getStateUpdate
starknet_getStorageAt
starknet_getTransactionStatus
starknet_getTransactionByHash
starknet_getTransactionByBlockIdAndIndex
starknet_getTransactionReceipt
starknet_getClass
starknet_getClassHashAt
starknet_getClassAt
starknet_getBlockTransactionCount
starknet_call
starknet_getEvents
starknet_getNonce
starknet_blockNumber
starknet_blockHashAndNumber
starknet_chainId
starknet_syncing
starknet_specVersion
starknet_estimateFee
and starknet_estimateMessageFee
methods are not yet implementedThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.