Sensei MCP is a specialized server offering expert guidance for Dojo and Cairo development on Starknet, focusing on the Dojo ECS (Entity Component System) framework.
Key capabilities:
Provide beginner introductions and high-level overviews via
dojo_101
Assist with project configuration (dependencies, profiles, permissions) using
dojo_config
Guide implementation of Dojo systems and game logic through
dojo_logic
Help create and manage Dojo models and data structures with
dojo_model
Support test writing for Dojo applications using
dojo_test
Detail token standard implementations (ERC20, ERC721, ERC1155) with
dojo_token
Offer comprehensive guidance across all development aspects via
dojo_sensei
Technical expertise includes:
Cairo's unique language features (ownership, memory, types)
Dojo ECS architecture (Models, Systems, World patterns)
Best practices for Starknet smart contract and onchain game development
Recommended incremental development workflow
Provides a way to run the Sensei MCP directly from GitHub using npx, allowing developers to access specialized tools for Dojo and Cairo development without local installation.
Enables installation and execution of the Sensei MCP server through the npm package manager using npx commands.
Offers configuration guidance for Scarb.toml files in Dojo projects, helping developers properly set up dependencies and project settings.
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
Installation
Using with Cursor
To add Sensei to your Cursor IDE:
Open Cursor Settings (⌘+,)
Navigate to the "MCP" section
Click "Add New MCP"
Configure as follows:
Name: Sensei (or any name you prefer)
Type: Command
Command:
npx github:dojoengine/sensei-mcp
Click "Save"
Once configured, you can access Sensei by:
Opening the command palette (⌘+K)
Typing "MCP" and selecting "Open MCP Chat"
Selecting "Sensei" from the MCP dropdown
Sensei will provide specialized assistance for your Dojo and Cairo development questions, with deep knowledge of Starknet development best practices.
Using with Cursor Agent
When using Sensei with Cursor Agent, 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
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:
Running Directly
You can also run Sensei MCP directly:
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:
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
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
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that provides expert guidance for Dojo and Cairo development on Starknet, offering specialized knowledge and assistance for building onchain worlds using the Dojo Entity Component System framework.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn official AI Model Context Protocol server that enables AI assistants to interact with Dart project management by creating/managing tasks and documents through prompts and tools.Last updated -16100117MIT License
- AsecurityAlicenseAqualityProvides a Model Context Protocol server implementation that allows AI agents and other MCP clients to programmatically interact with DefectDojo, a vulnerability management tool, for managing findings, products, and engagements.Last updated -115MIT License
- -securityFlicense-qualityA Model Context Protocol server that connects to a payments company's developer portal, providing AI assistants with access to payment documentation, APIs, and guides.Last updated -
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that enables AI agents to interact with Starknet blockchain, query data, manage wallets, and work with smart contracts.Last updated -25104MIT License