MCP
Cursor

Cursor Integration

Cursor

Cursor Integration

Dispersl integrates seamlessly with Cursor via Model Context Protocol (MCP), enabling your AI coding assistant to connect with Dispersl's multi-agent development platform for enhanced coding capabilities.

What You'll Get

With Dispersl integrated into Cursor, you can:

  • Coordinate multi-agent teams directly from your IDE
  • Generate complex codebases with specialized AI agents
  • Create comprehensive test suites automatically
  • Manage Git workflows with AI assistance
  • Generate documentation as you code
  • Access advanced development tools beyond Cursor's built-in capabilities

Prerequisites

  • Cursor IDE installed and configured
  • Active Dispersl account with API access
  • Dispersl MCP key (obtained from your dashboard)

Setup Instructions

Step 1: Get Your Dispersl MCP Key

First, obtain your Dispersl MCP key:

  1. Log into your Dispersl dashboard
  2. Navigate to Settings → MCP Integration
  3. Generate a new MCP key or copy your existing key
  4. Keep this key secure - you'll need it for configuration

Alternatively, get your key via API:

curl -X GET "https://api.dispersl.com/v1/mcp/key" \
  -H "Authorization: Bearer YOUR_DISPERSL_API_KEY"

Step 2: Choose Configuration Method

You can configure Dispersl for Cursor in two ways:

Global Configuration (Recommended)

For tools you want to use across all projects, create a global configuration.

Project-Specific Configuration

For tools specific to a particular project, create a project-level configuration.

Step 3: Global Configuration Setup

  1. Navigate to your home directory

    cd ~
  2. Create the .cursor directory (if it doesn't exist)

    mkdir -p .cursor
  3. Create the MCP configuration file Create a file named mcp.json in the .cursor directory:

    {
      "mcpServers": {
        "dispersl": {
          "url": "https://dispersl.com/mcp/YOUR_DISPERSL_MCP_KEY"
        }
      }
    }

    Important: Replace YOUR_DISPERSL_MCP_KEY with your actual Dispersl MCP key.

  4. Set proper file permissions

    chmod 600 ~/.cursor/mcp.json

Step 4: Project-Specific Configuration

For project-specific integration:

  1. Navigate to your project directory

    cd /path/to/your/project
  2. Create the .cursor directory

    mkdir -p .cursor
  3. Create the MCP configuration file

    {
      "mcpServers": {
        "dispersl": {
          "url": "https://dispersl.com/mcp/YOUR_DISPERSL_MCP_KEY"
        }
      }
    }
  4. Add to .gitignore

    echo ".cursor/mcp.json" >> .gitignore

Step 5: Enable in Cursor Settings

  1. Open Cursor
  2. Go to Settings (Cmd/Ctrl + ,)
  3. Navigate to Extensions → MCP
  4. Ensure the Dispersl server is set to "Enabled"

Cursor MCP Settings

Verification

After setting up your MCP connection, verify it's working correctly:

  1. Open a project in Cursor
  2. Open the AI chat panel
  3. Ask your AI assistant:
    List my Dispersl integrations and available agents

If the connection is successful, you'll see a response showing:

  • Available Dispersl agents (plan, code, test, git, docs)
  • Connection status
  • Your current plan and usage limits

Using Dispersl in Cursor

Multi-Agent Task Coordination

Plan and Execute Complex Tasks

Use Dispersl to build a complete user authentication system with:
- JWT-based authentication API
- Password hashing and validation
- User registration and login endpoints
- Comprehensive test suite
- API documentation

Coordinate Multiple Agents

Dispersl: Create a React component library with:
1. Plan Agent: Break down the component structure
2. Code Agent: Generate reusable components
3. Test Agent: Create unit and integration tests
4. Docs Agent: Generate component documentation
5. Git Agent: Set up proper version control

Code Generation

Generate APIs

Dispersl Code Agent: Create a REST API for a blog platform with:
- Post CRUD operations
- User authentication
- Comment system
- Search functionality
- Proper error handling

Create Database Models

Dispersl: Generate Prisma schema and models for an e-commerce platform with products, users, orders, and inventory management

Testing

Generate Test Suites

Dispersl Test Agent: Create comprehensive tests for my authentication API including:
- Unit tests for all functions
- Integration tests for endpoints
- Mock data and fixtures
- Test coverage reporting

Set Up Test Automation

Dispersl: Set up Jest testing framework with GitHub Actions CI/CD for automated testing on every pull request

Version Control

Git Workflow Management

Dispersl Git Agent: Create a feature branch for the new payment system, implement the changes, and prepare for code review with proper commit messages

Release Management

Dispersl: Prepare a new release with version bumping, changelog generation, and tag creation

Documentation

Generate API Documentation

Dispersl Docs Agent: Generate comprehensive API documentation for my REST API with examples, authentication details, and error codes

Create Project Documentation

Dispersl: Create a complete README with setup instructions, usage examples, and contribution guidelines

Advanced Configuration

Custom Agent Settings

Configure specific agents with custom parameters:

{
  "mcpServers": {
    "dispersl": {
      "url": "https://dispersl.com/mcp/YOUR_DISPERSL_MCP_KEY",
      "config": {
        "defaultModel": "anthropic/claude-3-sonnet",
        "codeAgent": {
          "model": "anthropic/claude-3-sonnet",
          "temperature": 0.1
        },
        "testAgent": {
          "model": "openai/gpt-4",
          "framework": "jest"
        },
        "gitAgent": {
          "model": "deepseek/deepseek-r1",
          "branchPrefix": "feature/"
        }
      }
    }
  }
}

Workspace-Specific Settings

Configure different settings for different workspaces:

{
  "mcpServers": {
    "dispersl-frontend": {
      "url": "https://dispersl.com/mcp/YOUR_DISPERSL_MCP_KEY",
      "config": {
        "focus": ["code", "test"],
        "frameworks": ["react", "typescript"]
      }
    },
    "dispersl-backend": {
      "url": "https://dispersl.com/mcp/YOUR_DISPERSL_MCP_KEY",
      "config": {
        "focus": ["code", "test", "git"],
        "frameworks": ["node", "express", "prisma"]
      }
    }
  }
}

Best Practices

Security

  1. Never commit MCP keys: Always add .cursor/mcp.json to your .gitignore
  2. Use environment variables: For team projects, consider using environment variable substitution
  3. Rotate keys regularly: Generate new MCP keys periodically
  4. Monitor usage: Keep track of your API usage and costs

Effective Prompting

  1. Be specific: Provide clear, detailed requirements for better results
  2. Use agent names: Specify which Dispersl agent you want to use
  3. Provide context: Include relevant project information and constraints
  4. Iterate: Start with simple tasks and build up to complex workflows

Workflow Optimization

  1. Start small: Begin with simple tasks to understand agent capabilities
  2. Combine agents: Use multiple agents for comprehensive solutions
  3. Monitor performance: Track which agents work best for different tasks
  4. Customize settings: Adjust agent configurations based on your preferences

Troubleshooting

Common Issues

"Dispersl server not found"

  • Check that your MCP configuration file exists and has correct syntax
  • Verify the file path: ~/.cursor/mcp.json or ./.cursor/mcp.json
  • Ensure Cursor has been restarted after configuration changes

"Authentication failed"

  • Verify your Dispersl MCP key is correct and active
  • Check that your Dispersl account has sufficient credits
  • Ensure the MCP key hasn't expired

"Agent not responding"

  • Check your internet connection
  • Verify Dispersl service status at status.dispersl.com
  • Review your usage limits and quotas

Configuration file errors

  • Validate JSON syntax using a JSON validator
  • Check file permissions (should be readable by Cursor)
  • Ensure no trailing commas or syntax errors

Getting Help

  1. Check the logs: Look at Cursor's developer console for error messages
  2. Test connection: Use the verification steps to confirm connectivity
  3. Community support: Join our Discord for community help
  4. Documentation: Review the complete MCP documentation
  5. Support: Contact Dispersl support for technical assistance

Example Workflows

Full-Stack Development

Dispersl: Build a complete task management application with:
- React frontend with TypeScript
- Node.js/Express backend
- PostgreSQL database with Prisma
- JWT authentication
- Comprehensive test coverage
- Docker containerization
- CI/CD pipeline setup

API Development

Dispersl Code Agent: Create a GraphQL API for a social media platform with:
- User management and authentication
- Post creation and interaction
- Real-time notifications
- File upload handling
- Rate limiting and security

Testing and Quality Assurance

Dispersl Test Agent: Set up comprehensive testing for my existing codebase:
- Unit tests with 90%+ coverage
- Integration tests for all APIs
- End-to-end tests for critical user flows
- Performance testing setup
- Automated test reporting

Next Steps

  1. Complete the setup following the instructions above
  2. Verify the connection using the verification steps
  3. Start with simple tasks to get familiar with the integration
  4. Explore advanced features like multi-agent coordination
  5. Optimize your workflow based on your development needs

Ready to supercharge your Cursor development experience with Dispersl's multi-agent AI platform!