Cairo Coder
STDIOMCP server for Cairo and Starknet development assistance via Cairo Coder API.
MCP server for Cairo and Starknet development assistance via Cairo Coder API.
A Model Context Protocol (MCP) server for Cairo and Starknet development assistance via the Cairo Coder API.
This project now lives in the Ask Starknet monorepo
The npm package remains published here
This repo will not receive further updates.
# 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
Use this MCP server directly with npx:
npx -y @kasarlabs/cairo-coder-mcp
The server supports two modes of operation:
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" } } } }
Use a local or custom Cairo Coder API endpoint (no API key required).
Environment Variables:
CAIRO_CODER_API_ENDPOINT: Your local endpoint URL (e.g., "http://localhost:8000")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.
Get help with Cairo and Starknet development tasks.
Parameters:
query (string, required): Your Cairo/Starknet development questioncontext (string, optional): Additional context or code snippetsExamples:
// 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}" }
git clone <repository-url> cd cairo-coder-mcp npm install
npm run build # Build the project npm run dev # Start in development mode npm start # Start in production mode
MIT
For issues and questions:
Contributions are welcome! Please check the contribution guidelines before submitting a PR.