Sensei (Dojo) MCP server

Provides specialized guidance for Starknet ecosystem development with Cairo programming and Entity Component System (ECS) framework expertise through TypeScript-based tools for Dojo developers building onchain games and applications.
Back to servers
Setup instructions
Provider
Dojo Engine
Release date
Mar 12, 2025
Language
TypeScript
Stats
12 stars

Sensei MCP is a specialized server implementing the Model Context Protocol (MCP) to provide expert guidance for Dojo and Cairo development on Starknet. Acting as your personal Dojo Sensei, it offers specialized knowledge and assistance for building onchain worlds using the Dojo Entity Component System (ECS) framework.

Installation Options

Installing with Cursor

  1. Open Cursor command palette (⌘+Shift+P)
  2. Type in "Cursor Settings" to open up the settings menu
  3. Navigate to "MCP Tools" and click "New MCP Server"
  4. Add the following configuration to mcp.json:
{
  "mcpServers": {
    "sensei": {
      "type": "command",
      "command": "npx github:dojoengine/sensei-mcp",
      "enabled": true
    }
  }
}
  1. Save the file

Cursor will attempt to initialize the server. You may need to install the server manually by running npx github:dojoengine/sensei-mcp in your terminal before Cursor will detect it.

Installing with Claude Code

To add Sensei MCP to Claude Code, run:

claude mcp add sensei-mcp npx github:dojoengine/sensei-mcp

Running Directly

You can also run Sensei MCP directly in your terminal:

npx github:dojoengine/sensei-mcp

Usage Guide

Working with Cursor

Once installed, Cursor Agent will automatically query Sensei when appropriate. For the best experience:

  1. Explicitly mention specialized tools in your requests (e.g., "Please use the dojo_model tool to help me create a model")

  2. 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
  3. Be specific in your requests rather than asking for general help

  4. Break down complex tasks into manageable components

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.

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

Recommended Development Workflow

For optimal results, follow this structured approach:

  1. Project Setup (using dojo_101)

    • Initialize your project with sozo init
    • Understand the project structure
    • Remove or replace boilerplate code
  2. Define Models (using dojo_model)

    • Create your game state models
    • Ensure proper trait derivation
    • Set up key fields correctly
  3. Implement Systems (using dojo_logic)

    • Create system contracts
    • Implement game mechanics
    • Handle state changes
  4. Project Configuration (using dojo_config)

    • Set up Scarb.toml
    • Configure Dojo profiles
    • Manage dependencies
  5. Testing (using dojo_test)

    • Write comprehensive tests
    • Verify game logic

This workflow ensures you build your Dojo application in a structured, methodical way, leveraging each specialized tool at the appropriate development stage.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "sensei" '{"type":"command","command":"npx github:dojoengine/sensei-mcp","enabled":true}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "sensei": {
            "type": "command",
            "command": "npx github:dojoengine/sensei-mcp",
            "enabled": true
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "sensei": {
            "type": "command",
            "command": "npx github:dojoengine/sensei-mcp",
            "enabled": true
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later