Sensei MCP
Expert guidance for Dojo and Cairo development on Starknet, specializing in the Dojo ECS framework for building onchain worlds.
Sensei MCP
Sensei MCP is a Model Context Protocol (MCP) server that provides expert guidance for Dojo and Cairo development on Starknet. It serves as your personal Dojo Sensei, offering specialized knowledge and assistance for building onchain worlds using the Dojo Entity Component System (ECS) framework.
Features
- Expert Cairo Guidance: Get help with Cairo's unique ownership, memory, and type systems
- Dojo ECS Architecture: Learn about Models, Systems, and World patterns
- Smart Contract Development: Best practices for Starknet smart contracts
- Specialized Tools: Access topic-specific tools for models, systems, testing, and more
Using with Cursor
Installation
See the official Cursor docs for more information on installing and using MCP servers.
To add Sensei to your Cursor IDE:
- Open Cursor command palette (⌘+Shift+P)
- Type in "Cursor Settings" to open up the settings menu
- Navigate to "MCP Tools" and click "New MCP Server"
- Add the following configuration to
mcp.json:
{
"mcpServers": {
"sensei": {
"type": "command",
"command": "npx github:dojoengine/sensei-mcp",
"enabled": true
}
}
}
- Save the file
Cursor will attempt to initialise the server. Once initialised, the menu should look like this:
Note: you may need to install the server manually by running
npx github:dojoengine/sensei-mcpin your terminal before Cursor will pick it up.
Use
Once installed, Cursor Agent will automatically query Sensei when appropriate. Follow these best practices for optimal results:
-
Always mention the specialized tools: Explicitly ask the agent to use Sensei's specialized tools (e.g., "Please use the dojo_model tool to help me create a model").
-
Follow the incremental development approach:
- Start with project setup using
dojo_101 - Define models first using
dojo_model - Implement systems next using
dojo_logic - Configure the project last using
dojo_config - Add tests using
dojo_test
- Start with project setup using
-
Be specific in your requests: For example, instead of asking "Help me with my Dojo game," say "Please use the dojo_model tool to help me create a Position model for my game."
-
Break down complex tasks: Ask for help with one component at a time rather than requesting an entire game implementation at once.
Example prompt:
I'm building a Dojo game. First, please use the dojo_101 tool to help me set up the project structure.
After that, I'll need help creating the models using the dojo_model tool.
Using with Claude Code
To add Sensei MCP to Claude Code, run the following command:
claude mcp add sensei-mcp npx github:dojoengine/sensei-mcp
Running Directly
You can also run Sensei MCP directly in the terminal:
npx github:dojoengine/sensei-mcp
Available Tools
Sensei provides specialized tools for different aspects of Dojo development:
- dojo_101: Beginner-friendly introduction to Dojo development
- dojo_config: Essential guidance for configuring Dojo projects
- dojo_logic: Expert guidance on implementing Dojo systems and game logic
- dojo_model: Specialized guidance for creating and working with Dojo models
- dojo_test: Comprehensive guide for writing tests for Dojo applications
- dojo_token: Detailed guidance on implementing token standards in Dojo
How to Use Tools
When chatting with Sensei, you can ask for specific guidance by mentioning the tool name:
Can you help me understand how to create a model in Dojo?
Sensei will automatically use the appropriate tool (in this case, dojo_model) to provide specialized guidance.
Recommended Development Workflow
For the best results, follow this incremental development approach:
-
Project Setup (use
dojo_101)- Initialize your project with
sozo init - Understand the project structure
- Remove or replace boilerplate code
- Initialize your project with
-
Define Models (use
dojo_model)- Create your game state models
- Ensure proper trait derivation
- Set up key fields correctly
-
Implement Systems (use
dojo_logic)- Create system contracts
- Implement game mechanics
- Handle state changes
-
Project Configuration (use
dojo_config)- Set up Scarb.toml
- Configure Dojo profiles
- Manage dependencies
-
Testing (use
dojo_test)- Write comprehensive tests
- Verify game logic
This workflow ensures you build your Dojo application in a structured, methodical way, leveraging the specialized knowledge of each tool at the appropriate stage of development.
Core Expertise
Sensei has deep expertise in:
- Cairo programming language (including its unique ownership, memory, and type system)
- Dojo ECS architecture (Models, Systems, and World)
- Smart contract development on Starknet
- Best practices for onchain game development
Development
Project Structure
bin/: Contains the executable scriptsrc/: Source code for the MCP serverprompts/: Text prompts for different aspects of Dojo developmentresources/: Additional resources used by the prompts
Building from Source
# Clone the repository
git clone https://github.com/dojoengine/sensei-mcp.git
cd sensei-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm start
関連サーバー
Scout Monitoring MCP
スポンサーPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
スポンサーAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Blockchain MCP Server
A server for blockchain interactions, offering Ethereum vanity address generation, 4byte lookup, ABI encoding, and multi-chain RPC calls.
XcodeBuildMCP
Popular MCP server that enables AI agents to scaffold, build, run and test iOS, macOS, visionOS and watchOS apps or simulators and wired and wireless devices. It has powerful UI-automation capabilities like controlling the simulator, capturing run-time logs, as well as taking screenshots and viewing the accessibility hierarchy.
mcp-rubber-duck
Query multiple LLMs in parallel from AI coding tools — rubber duck debugging, but the ducks talk back.
Code Assistant
A server for code modification and generation using Large Language Models.
Tripwire
Context injection for AI agents via MCP. Define path-based policies in YAML — when an agent reads a matching file, relevant knowledge is auto-injected. Prevents mistakes before they happen. Works with Claude Code, Cursor, and any MCP client.
Azure MCP Server
All Azure MCP tools in a single server. The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and Azure services. Azure MCP Server can be used alone or with the GitHub Copilot for Azure extension in VS Code.
MCP Framework Starter
A starter project for building Model Context Protocol (MCP) servers with the mcp-framework.
Figma Context MCP
Extract code, assets, and component structures from Figma designs to use within AI workflows.
My MCP Server
A remote MCP server example deployable on Cloudflare Workers without authentication.
iOS Simulator MCP Server
A Model Context Protocol (MCP) server for interacting with iOS simulators. This server allows you to interact with iOS simulators by getting information about them, controlling UI interactions, and inspecting UI elements.