We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MeroZemory/suno-multi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
# Suno-MCP Cursor Rulebook
## π¨ CRITICAL REQUIREMENTS
### PowerShell Syntax (MANDATORY)
- **NEVER use Linux/Unix commands** - Only Windows PowerShell commands
- **NEVER use `&&`** - Use separate PowerShell commands
- **NEVER use `cd /d`** - Use `Set-Location` or `cd`
- **NEVER use `rmdir /s /q`** - Use `Remove-Item -Recurse -Force`
- **NEVER use `mkdir`** - Use `New-Item -ItemType Directory`
- **NEVER use `cp` or `mv`** - Use `Copy-Item` and `Move-Item`
- **ALWAYS use PowerShell cmdlets** - `Get-ChildItem`, `Set-Content`, etc.
### Command Examples (CORRECT):
```
β
Set-Location "D:\path\to\dir"
β
New-Item -ItemType Directory -Path "folder"
β
Remove-Item -Recurse -Force "path"
β
Copy-Item "source" "destination"
β
Get-ChildItem -Recurse
```
### Command Examples (WRONG):
```
β cd /d D:\path\to\dir
β mkdir folder
β rmdir /s /q path
β cp source destination
β find . -name "*.py"
β command1 && command2
```
## π§ FastMCP Standards (MANDATORY)
### Tool Registration
- **ALWAYS use `@mcp_app.tool()` decorators**
- **ALWAYS provide comprehensive docstrings** with Args/Returns
- **NEVER use multiline docstrings with `"""` inside**
- **ALWAYS follow FastMCP 2.12 standards**
### Tool Documentation Format:
```python
@mcp_app.tool()
async def tool_name(param: str) -> str:
"""
Brief description of what the tool does.
More detailed explanation if needed.
Args:
param: Description of the parameter
Returns:
Description of the return value
"""
```
### Server Structure
- **ALWAYS use FastMCP FastAPI integration**
- **ALWAYS provide dual interface (stdio + HTTP)**
- **ALWAYS use proper error handling with custom exceptions**
- **ALWAYS implement comprehensive logging**
## π Python Standards
### Code Style
- **ALWAYS use type hints** for function parameters and returns
- **ALWAYS use async/await** for I/O operations
- **ALWAYS use descriptive variable names**
- **NEVER use bare `except:`** - Always catch specific exceptions
- **ALWAYS use context managers** for resource management
### Imports
- **ALWAYS organize imports** in this order:
1. Standard library imports
2. Third-party imports
3. Local imports
- **ALWAYS use absolute imports** within the package
- **NEVER use wildcard imports** (`from module import *`)
### Error Handling
- **ALWAYS create custom exception classes** for domain-specific errors
- **ALWAYS provide meaningful error messages**
- **ALWAYS log errors appropriately**
- **NEVER swallow exceptions** without proper handling
## π Playwright Automation
### Browser Management
- **ALWAYS use the BrowserManager class** for browser lifecycle
- **ALWAYS handle browser cleanup** properly
- **ALWAYS use robust selectors** (multiple fallback selectors)
- **ALWAYS implement retry logic** for UI interactions
### Selector Strategy
- **ALWAYS use multiple selector strategies:**
```python
selectors = [
'[data-testid="element"]',
'.css-class',
'button:has-text("Text")',
'[data-attribute]'
]
await SelectorHelper.try_selectors(page, selectors, "click")
```
## π Project Structure
### File Organization
- **ALWAYS follow the package structure:**
```
src/suno_mcp/
βββ __init__.py
βββ server.py
βββ tools/
β βββ basic/
β βββ shared/
```
- **NEVER create new top-level directories** without approval
- **ALWAYS place tools in appropriate subdirectories**
### Naming Conventions
- **ALWAYS use snake_case** for Python files and functions
- **ALWAYS use PascalCase** for classes
- **ALWAYS prefix tool functions** with their category (e.g., `suno_`, `studio_`)
- **NEVER use abbreviations** unless they're standard (e.g., MCP, API)
## π Security & Best Practices
### Input Validation
- **ALWAYS validate user inputs** before processing
- **ALWAYS sanitize file paths** and user data
- **NEVER trust external inputs** without validation
### Resource Management
- **ALWAYS close browser instances** properly
- **ALWAYS handle file operations** safely
- **ALWAYS use context managers** for resources
### Logging
- **ALWAYS use the logging module** instead of print statements
- **ALWAYS set appropriate log levels**
- **ALWAYS include relevant context** in log messages
## π― Suno-MCP Specific Rules
### Tool Categories
- **Basic tools ONLY:** Login, generate, download, status
- **NEVER implement Studio tools** - They're vaporware
- **NEVER claim to automate Suno Studio** - It's not feasible
- **ALWAYS be honest about capabilities**
### API Design
- **ALWAYS return meaningful strings** from tools
- **ALWAYS provide progress feedback** for long operations
- **ALWAYS handle rate limits** gracefully
- **ALWAYS respect Suno's terms of service**
### Testing
- **ALWAYS test with free tier first**
- **ALWAYS mock external dependencies** in unit tests
- **ALWAYS use descriptive test names**
- **NEVER make real API calls** in automated tests
## π« ABSOLUTELY FORBIDDEN
### Commands & Syntax
- β `&&` (command chaining)
- β `cd /d` (use `Set-Location`)
- β `mkdir` (use `New-Item -ItemType Directory`)
- β `rmdir /s /q` (use `Remove-Item -Recurse -Force`)
- β `cp`, `mv`, `ls` (use PowerShell equivalents)
- β `grep`, `sed`, `awk` (use PowerShell cmdlets)
### Code Patterns
- β Bare `except:` clauses
- β Wildcard imports
- β Global variables (except constants)
- β Print statements for logging
- β Synchronous I/O in async functions
### Project Violations
- β Implementing fake Studio automation
- β Making false claims about capabilities
- β Using untested selectors
- β Breaking FastMCP standards
## β
APPROVED PATTERNS
### Terminal Commands
```
β
Set-Location "path"
β
New-Item -ItemType Directory -Path "folder"
β
Remove-Item -Recurse -Force "path"
β
Get-ChildItem -Recurse
β
Copy-Item "source" "dest"
β
Move-Item "source" "dest"
```
### Python Code
```python
# β
Correct FastMCP tool
@mcp_app.tool()
async def suno_generate_track(
prompt: str,
style: Optional[str] = None
) -> str:
"""
Generate a music track with AI.
Args:
prompt: Description of desired music
style: Optional musical style
Returns:
Success message with track details
"""
# Implementation here
return f"Generated track: {prompt}"
# β
Correct error handling
try:
result = await some_async_operation()
except SpecificException as e:
logger.error(f"Operation failed: {e}")
raise CustomError(f"User-friendly message: {e}")
```
## π REFERENCE LINKS
- [FastMCP Documentation](https://fastmcp.com)
- [Playwright Python Docs](https://playwright.dev/python/)
- [PowerShell Cmdlet Reference](https://docs.microsoft.com/en-us/powershell/)
- [Python Async Best Practices](https://realpython.com/async-io-python/)
## π― PROJECT GOALS
1. **Honest Implementation** - Only claim what actually works
2. **Production Ready** - Proper error handling, logging, testing
3. **Maintainable Code** - Clean architecture, good documentation
4. **Windows Native** - PowerShell commands, Windows paths
5. **MCP Compliant** - Follow FastMCP 2.12 standards exactly
**REMEMBER: This project was cleaned up after attempting to implement impossible Studio automation. Stay focused on the working Suno AI integration!**