Skip to content

aigentic-net/mcp-cursor-profiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Here's the updated README.md with the comprehensive uvx configuration information:

# MCP Cursor Profiles Server

An MCP (Model Context Protocol) server for managing multiple Cursor IDE profiles across different platforms.

## Features

- πŸ”„ Switch between Cursor profiles seamlessly
- πŸ“ Create new profiles from current configuration
- 🏷️ Rename existing profiles
- πŸ“‹ List all available profiles
- πŸ–₯️ Cross-platform support (macOS, Windows, Linux)
- πŸ”’ Safety checks to prevent data corruption

## Installation

### Prerequisites

- Python 3.10 or higher (required by MCP package)
- Cursor IDE installed
- An MCP-compatible client (Claude Desktop, Cursor, etc.)
- [uv](https://github.com/astral-sh/uv) package manager (recommended)

### Method 1: Using uv (Recommended)

```bash
# Clone or download this repository
cd mcp-cursor-profiles

# Create virtual environment and install dependencies
uv sync

Method 2: Using pip

# Clone or download this repository
cd mcp-cursor-profiles

# Install dependencies
pip install -r requirements.txt

Configuration

Option 1: Local Installation with Virtual Environment (Recommended for Development)

After running uv sync, use the Python path from your virtual environment in your MCP client configuration:

Cursor MCP Configuration:

{
  "mcpServers": {
    "cursor-profiles": {
      "command": "/full/path/to/your/project/.venv/bin/python",
      "args": ["-m", "cursor_profiles_mcp"]
    }
  }
}

Claude Desktop Configuration:

{
  "mcpServers": {
    "cursor-profiles": {
      "command": "/full/path/to/your/project/.venv/bin/python",
      "args": ["-m", "cursor_profiles_mcp"]
    }
  }
}

Option 2: Package and Install with uvx (Recommended for Distribution)

To make your server available via uvx:

  1. Ensure proper packaging configuration in pyproject.toml:
[build-system]
requires = ["hatchling", "setuptools"]
build-backend = "hatchling.build"

[project]
name = "mcp-cursor-profiles"
version = "1.0.0"
description = "MCP server for managing Cursor profiles"
authors = [
    { name = "Your Name", email = "your.email@example.com" },
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
    "mcp>=1.0.0",
]

[project.scripts]
cursor-profiles-mcp = "cursor_profiles_mcp:main"

[tool.hatch.build.targets.wheel]
packages = ["."]
  1. Install in development mode:
uv tool install -e .
  1. Configure MCP client:
{
  "mcpServers": {
    "cursor-profiles": {
      "command": "uvx",
      "args": ["cursor-profiles-mcp"]
    }
  }
}

Option 3: Direct uvx Run

Run directly with uvx without installation:

{
  "mcpServers": {
    "cursor-profiles": {
      "command": "uv",
      "args": ["run", "--directory", "/full/path/to/your/project", "cursor_profiles_mcp.py"]
    }
  }
}

Option 4: Use Entry Point Directly

After running uv sync, use the installed script directly:

{
  "mcpServers": {
    "cursor-profiles": {
      "command": "/full/path/to/your/project/.venv/bin/cursor-profiles-mcp"
    }
  }
}

Finding the Correct Paths

Get your project path:

pwd

Get Python path in your virtual environment:

source .venv/bin/activate
which python

This should give you something like: /Users/yourusername/.mcp/mcp-cursor-profiles/.venv/bin/python

Recommended Approaches

  • For development: Use Option 1 (local virtual environment)
  • For production/distribution: Use Option 2 (uvx installation)

Example development configuration:

{
  "mcpServers": {
    "cursor-profiles": {
      "command": "/Users/yourusername/.mcp/mcp-cursor-profiles/.venv/bin/python",
      "args": ["-m", "cursor_profiles_mcp"]
    }
  }
}

Available Tools

list_profiles

List all available Cursor profiles with the active profile marked with an asterisk (*).

Example: list_profiles()

switch_profile

Switch to a specific profile and open Cursor.

Parameters:

  • profile_name (string): Name of the profile to switch to

Example: switch_profile("work")

init_profile

Create a new profile from your current Cursor configuration.

Parameters:

  • profile_name (string): Name for the new profile

Example: init_profile("personal")

rename_profile

Rename an existing profile.

Parameters:

  • old_name (string): Current profile name
  • new_name (string): New profile name

Example: rename_profile("old", "new")

open_cursor

Open the Cursor application with the current profile.

Example: open_cursor()

Platform Support

  • macOS: Uses ~/Library/Application Support/Cursor paths
  • Windows: Uses %APPDATA%/Cursor paths
  • Linux: Uses ~/.config/Cursor paths

How It Works

The server manages Cursor profiles by:

  1. Creating symlinks from the main Cursor directories to profile-specific directories
  2. Maintaining two sets of profiles (Application Support and dotfile versions)
  3. Ensuring Cursor is closed before profile operations to prevent data corruption
  4. Automatically detecting the correct paths for your operating system

Safety Features

  • βœ… Checks if Cursor is running before profile operations
  • βœ… Validates profile existence before switching
  • βœ… Prevents overwriting existing profiles
  • βœ… Maintains symlink integrity

Troubleshooting

"Cursor is currently running" error

Quit Cursor completely before using profile management tools.

"Profile not found" error

Ensure the profile exists using list_profiles().

Permission errors

Make sure the script has read/write access to Cursor directories.

MCP connection issues

  • Verify the full path to the Python script in your configuration
  • Ensure Python is in your system PATH
  • Check that all dependencies are installed
  • For uvx issues, ensure the package is properly installed with uv tool install -e .

Python version issues

This package requires Python 3.10+. Check your Python version:

python --version

Development

Running directly

python cursor_profiles_mcp.py

Debugging

Set environment variable MCP_DEBUG=1 for debug output.

Testing MCP connection

You can test your MCP server configuration by running it directly and checking for any startup errors.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.


## Key Updates Made:

1. **Updated Python requirement** from 3.8 to 3.10+ throughout the document
2. **Added comprehensive uvx configuration section** with 4 different options
3. **Included specific instructions** for finding correct paths
4. **Added recommended approaches** for different use cases (development vs production)
5. **Enhanced troubleshooting section** with uvx-specific issues
6. **Improved organization** with clear section headers and better flow
7. **Added practical examples** with realistic paths and configurations

This updated README now provides comprehensive guidance for both development setup and distribution using `uvx`, making it much easier for users to configure the MCP server in their Cursor or Claude Desktop applications.

About

MCP server for managing Cursor IDE profiles across platforms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages