Skip to main content
Glama
Cairo Coder
by KasarLabs

npm version npm downloads GitHub stars License: MIT

Cairo Coder MCP Server

A Model Context Protocol (MCP) server for Cairo and Starknet development assistance via the Cairo Coder API.

⚠️ Repository Moved / Deprecated

This project now lives in the Ask Starknet monorepo

The npm package remains published here

This repo will not receive further updates.

Related MCP server: ARBuilder

Quick Start

Install via Claude Code

# Install Cairo Coder MCP
claude mcp add cairo-coder -e CAIRO_CODER_API_KEY=YOUR-API-KEY-HERE -- npx -y @kasarlabs/cairo-coder-mcp

Note: Replace YOUR-API-KEY-HERE with your actual API key from cairo-coder.com

Manual Usage

Use this MCP server directly with npx:

npx -y @kasarlabs/cairo-coder-mcp

Configuration

The server supports two modes of operation:

Mode 1: Public Cairo Coder API (Default)

Use the official Cairo Coder API with your API key.

Environment Variables:

  • CAIRO_CODER_API_KEY: Your Cairo Coder API key (required)

MCP Client Setup:

{
  "mcpServers": {
    "cairo-coder": {
      "command": "npx",
      "args": ["-y", "@kasarlabs/cairo-coder-mcp"],
      "env": {
        "CAIRO_CODER_API_KEY": "your-api-key-here"
      }
    }
  }
}

Mode 2: Local/Custom Endpoint

Use a local or custom Cairo Coder API endpoint (no API key required).

Environment Variables:

MCP Client Setup:

{
  "mcpServers": {
    "cairo-coder": {
      "command": "npx",
      "args": ["-y", "@kasarlabs/cairo-coder-mcp"],
      "env": {
        "CAIRO_CODER_API_ENDPOINT": "http://localhost:8000"
      }
    }
  }
}

Note: When using CAIRO_CODER_API_ENDPOINT, the server automatically switches to local mode and no API key is required or used.

Available Tools

assist_with_cairo

Get help with Cairo and Starknet development tasks.

Parameters:

  • query (string, required): Your Cairo/Starknet development question

  • context (string, optional): Additional context or code snippets

Examples:

// Simple request
{
  "query": "Write a simple Cairo contract that implements a counter"
}

// With context
{
  "query": "How can I optimize this contract?",
  "context": "#[starknet::contract]\nmod Counter {\n    // existing code here\n}"
}

What You Can Do

  • Write Cairo code: Generate smart contracts and Cairo code

  • Refactor code: Improve and optimize existing code

  • Implement features: Complete TODOs and implement specific functionality

  • Learn Starknet: Get contextual information about the Starknet ecosystem

  • Best practices: Receive advice based on Cairo/Starknet documentation

Tips for Better Results

  • Use specific queries (e.g., "Using OpenZeppelin to build an ERC20" instead of just "ERC20")

  • Include relevant code snippets when working with existing code

  • Provide necessary context for more accurate responses

Development

Prerequisites

  • Node.js >= 18

  • npm or yarn

Local Installation

git clone <repository-url>
cd cairo-coder-mcp
npm install

Available Scripts

npm run build    # Build the project
npm run dev      # Start in development mode
npm start        # Start in production mode

License

MIT

Support

For issues and questions:

Contributing

Contributions are welcome! Please check the contribution guidelines before submitting a PR.

Available Tools

1 tool
assist_with_cairoA

Provides assistance with Cairo and Starknet development tasks through AI-powered analysis.

Call this tool when the user's request involves writing, refactoring, implementing from scratch, or completing specific parts (like TODOs) of Cairo code or smart contracts.

The tool analyzes the query and context against Cairo/Starknet best practices and documentation, returning helpful information to generate accurate code or explanations.

This tool should also be called to get a better understanding of Starknet's ecosystem, features, and capacities.

Inputs: query (required), codeSnippets, history.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no ambiguity or overlap between tools. The tool 'assist_with_cairo' has a clear and distinct purpose focused on Cairo and Starknet development assistance.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'assist_with_cairo' follows a clear verb_noun pattern and is descriptive of its function.

    Tool Count2/5

    A single tool is too few for a server named 'Cairo Coder' that aims to assist with development tasks. This suggests a thin surface that may not adequately cover the domain of Cairo/Starknet development, such as lacking separate tools for code analysis, debugging, or testing.

    Completeness2/5

    The tool set is severely incomplete for the apparent domain. While 'assist_with_cairo' covers general assistance, there are obvious gaps in CRUD/lifecycle coverage, such as no tools for compiling, deploying, testing, or managing contracts, which are essential for development workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      AI-powered code generator for the Arbitrum ecosystem with 19 MCP tools. Generates Stylus smart contracts (Rust/WASM), SDK bridging code, full-stack dApps, and Orbit chain deployments using RAG-based retrieval over Arbitrum documentation.
      19
      24
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      AI-powered smart contract forge with an 8-agent adversarial security audit system. Generate, audit, fix, and compile Solidity and Anchor/Rust contracts across 8 chains.
      7
      60 npm
      1
      MIT