Using Cursor with Igniter.js

Cursor is an AI-first code editor designed for pair-programming with a powerful AI. To make Cursor an expert on your Igniter.js project, you can configure it with "Rules" that provide persistent context.

Method 1: Training Cursor on the Igniter.js Framework

This method gives Cursor a deep, foundational understanding of the entire Igniter.js framework by pointing it to our official, comprehensive documentation file. This is ideal when working on an existing project that wasn't created from one of our templates.

Step 1: Create a Rules Directory

In the root of your project, create a new directory: .cursor/rules/.

Step 2: Create a Rule File

Inside that directory, create a new file named igniter-framework.mdc.

Step 3: Add the Rule Content

Open igniter-framework.mdc and paste the following content. This rule instructs Cursor's AI to use our llms.txt as its primary source of knowledge.

Code
---
alwaysApply: true
---
# Igniter.js Framework Expert

You are an expert developer specializing in Igniter.js. Your primary source of knowledge for all framework-related questions and code generation is the official documentation, which can be found in its entirety at: https://igniterjs.com/llms.txt.

Always adhere to the patterns and best practices described in that document.

Method 2: Use an Official Igniter.js Template (The Easy Way)

The easiest way to work with Cursor is by starting your project with one of our official templates. These templates come pre-configured with detailed AGENT.md files that Cursor automatically detects and uses as a project-specific rule.

🚀 Enhanced with MCP Server

Our official templates now include a MCP Server that provides Cursor with direct access to your project through standardized tools. This means Cursor can:

  • Analyze your codebase with deep understanding of your project structure
  • Execute development commands like starting the dev server or running tests
  • Generate code scaffolding for features, controllers, and procedures
  • Manage tasks and projects with built-in project management tools
  • Access your project's memory to remember architectural decisions and patterns
  • Delegate work to specialized AI agents for complex tasks

Adding MCP Server to Cursor

To enable the MCP Server integration with Cursor:

Option 1: Global Configuration

  • Open Cursor Settings
  • Select MCP in the settings sidenav
  • Click + Add new global MCP server
  • Add the Igniter.js configuration:
Code
{
  "mcpServers": {
    "Igniter": {
      "command": "npx",
      "args": ["@igniter-js/mcp-server"]
    }
  }
}

Option 2: Project-Specific Configuration

Create .cursor/mcp.json in your project root:

Code
{
  "mcpServers": {
    "Igniter": {
      "command": "npx", 
      "args": ["@igniter-js/mcp-server"],
      "env": {
        "IGNITER_PROJECT_ROOT": "."
      }
    }
  }
}

This gives Cursor direct access to powerful development tools that understand your Igniter.js project deeply.

Learn more about our MCP Server and Next.js Starter Rules.