Skip to main content
Glama
Starknet MCP Server

Starknet MCP Server

by milancermak

starknet-mcp

Starknet 的MCP服务器。通过 MCP 提供以下 Starknet RPC 方法:

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

尚不支持写入方法。

安装

安装Bun 。克隆此仓库。使用bun install安装依赖项。更新 Claude 的 MCP 配置 - 请参阅特定操作系统的说明。您需要在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"
      }
    }
  }
}

Related MCP server: Geth MCP Proxy

用法

正确配置 Claude Desktop 后,它将可以访问所有可用的方法。您可以开始向 Claude 询问有关链状态的问题,例如“Starknet 上最新的区块哈希值和区块编号是多少?”。如果 Claude 确定必须使用 MCP 方法来回答您的问题,它会向您请求权限:

您将在聊天中看到所使用的方法及其输入和输出。

怪癖

starknet_estimateFee和starknet_estimateMessageFee方法尚不受支持。

Claude 并非 100% 遵循工具的 inputSchema。它更倾向于发送字符串。部分代码中已阻止此类操作,但如果您遇到任何错误,请提交问题。

Available Tools

1 tool
get_blockC

Get a block from the Starknet blockchain

Inputs: blockNumber.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility for ambiguity or overlap in purpose. The tool 'get_block' has a single, clearly defined function, so an agent cannot misselect between tools.

    Naming Consistency5/5

    The naming follows a consistent verb_noun pattern ('get_block'), and with only one tool, there is no inconsistency to evaluate. The pattern is clear and predictable.

    Tool Count2/5

    A single tool for a blockchain server is too few for the apparent scope of interacting with Starknet. This severely limits functionality, as typical blockchain operations would include querying transactions, accounts, contracts, or writing data, not just getting blocks.

    Completeness1/5

    The tool surface is severely incomplete for a Starknet blockchain server. It lacks basic operations like getting transactions, accounts, contract states, or writing data, which are essential for blockchain interactions, leaving significant gaps that will cause agent failures.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Bridges Ethereum JSON-RPC queries from Geth nodes to the Model Context Protocol ecosystem, exposing blockchain operations as MCP tools. Enables AI models and applications to securely interact with Ethereum data including blocks, transactions, balances, and advanced debug functions through schema-validated access.
      52 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that bridges AI models with Ethereum blockchains via all JSON-RPC calls, enabling natural language queries for block numbers, balances, transactions, and smart contract data.
      21
      MIT