Get the FREE Ultimate OpenClaw Setup Guide →

ask-starknet

zed extension for starknet's official mcp server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 0xpantera-ask-starknet-mcp-server node path/to/ask-starknet/server.js \
  --env GEMINI_API_KEY="Your Google Gemini API key (optional)" \
  --env OPENAI_API_KEY="Your OpenAI API key (optional if using other providers)" \
  --env STARKNET_RPC_URL="Starknet RPC endpoint (optional, defaults may apply)" \
  --env ANTHROPIC_API_KEY="Your Anthropic API key (optional if using Claude)" \
  --env ASK_STARKNET_PATH="Absolute path to your built ask-starknet repository" \
  --env STARKNET_PRIVATE_KEY="Your Starknet private key (optional for transactions)" \
  --env STARKNET_ACCOUNT_ADDRESS="Your Starknet account address (optional)"

How to use

This MCP server exposes the ask-starknet MCP tools as a context server within Zed, allowing your AI assistant to interact with the Starknet blockchain directly. Once enabled in the Agent Panel, you can ask the assistant to query blockchain data such as blocks and transactions, check account balances, deploy and interact with smart contracts, and use all the capabilities provided by the ask-starknet MCP tools. The integration also supports configurable LLM providers, enabling Claude, OpenAI, or Google Gemini, so you can tailor the assistant's behavior and access patterns when performing on-chain operations. To get started, ensure the extension is enabled in Zed and that you have provided valid API keys for your preferred LLM providers.

How to install

Prerequisites:

  • Zed Editor installed
  • Node.js v18 or newer
  • Build of the ask-starknet repository completed locally

Installation steps:

  1. Build ask-starknet locally:
    git clone https://github.com/KasarLabs/ask-starknet
    cd ask-starknet
    pnpm install
    pnpm -w build
    
  2. Install the extension in Zed:
    • Clone this MCP extension repository
    • In Zed: Extensions → Ask Starknet MCP → Install
  3. Configure settings in Zed:
    • Open Settings (Cmd/Ctrl + ,)
    • Add or edit the context_servers entry to enable the Ask Starknet MCP and point to the built ask-starknet path, e.g.:
    {
      "context_servers": {
        "ask-starknet-mcp": {
          "enabled": true,
          "settings": {
            "ask_starknet_path": "/absolute/path/to/ask-starknet",
            "anthropic_api_key": "sk-...",
            "starknet_rpc_url": "https://starknet-mainnet.public.blastapi.io",
            "starknet_account_address": "0x...",
            "starknet_private_key": "0x..."
          }
        }
      }
    }
    
  4. Start or reload Zed to apply changes. If you encounter startup issues, ensure the absolute path to ask-starknet is correct and that the built server.js exists at the specified location.

Additional notes

Tips and common topics:

  • Ensure you have an absolute path to the built ask-starknet repository and point the mcp config to the correct server.js entry.
  • If you see errors about missing API keys, provide at least one valid LLM API key (Anthropic, OpenAI, or Gemini) in the Zed settings.
  • For on-chain operations (like deploying contracts), securely manage private keys and consider using a dedicated testnet RPC URL for development.
  • If the MCP server fails to start, run Zed in foreground mode (zed --foreground) to view logs and diagnose issues related to path resolution or environment variables.

Related MCP Servers

Sponsor this space

Reach thousands of developers