Install Starknet MCP
Agent Buildinginstall-starknet-mcpInstall Starknet MCP is an Agent Skill for agent building published in the starkware-libs/starknet-specs repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Install and configure the Starknet MCP server for Claude Code
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/starkware-libs/starknet-specs/blob/HEAD/.claude/skills/install-starknet-mcp/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/install-starknet-mcp, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Install Starknet MCP Server
Set up the Starknet MCP server so Claude can query a live Starknet node.
Steps
-
The user should provide their Starknet JSON-RPC endpoint URL as
$ARGUMENTS. If no argument was given, ask the user for their RPC URL. It must be a v0.10.2+ endpoint. -
Install the Python dependencies:
pip install -r mcp/requirements.txt -
Ask the user which scope they want:
- Global (
--scope user) — available in all projects. Best if they work with Starknet across multiple repos. Requires using the absolute path tomcp/server.py. - Project (default) — available only in this repo. Uses a relative path.
- Global (
-
Register the MCP server with Claude Code using the chosen scope. Note that
--envmust come before--so Claude sets it in the server's environment (anything after--is passed as argv to the server itself):- Global:
claude mcp add --scope user --env STARKNET_RPC_URL=<the-url> starknet -- python <absolute-path-to-server.py> - Project:
claude mcp add --env STARKNET_RPC_URL=<the-url> starknet -- python mcp/server.py
- Global:
-
Verify the server is registered by running:
claude mcp list -
Tell the user the installation is complete and they should restart Claude Code for the new MCP server to take effect. List a few example prompts they can try:
- "What's the latest block number on Starknet?"
- "Get me the transaction receipt for 0x..."
- "What's the ETH token total supply on Starknet?"