pip install cedarscript-mcp-serverThe Claude Desktop configuration file is typically located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Open the configuration file and add the CEDARScript MCP server:
{
"mcpServers": {
"cedarscript": {
"command": "python",
"args": [
"-m",
"cedarscript_mcp.server",
"--root",
"/path/to/your/project"
],
"env": {
"CEDARSCRIPT_LOG_LEVEL": "INFO"
}
}
}
}Replace /path/to/your/project with the actual path to your project directory.
Close and reopen Claude Desktop to load the new MCP server configuration.
Ask Claude:
"What CEDARScript capabilities do you have access to?"
Claude should respond with information about the available tools (parse_cedarscript, apply_cedarscript, list_capabilities).
"Parse this CEDARScript command:
UPDATE myfile.py SET imports.append('import os')"
Claude will validate the syntax and show you the parsed AST.
"Apply this transformation in dry-run mode:
UPDATE calculator.py SET function:calculate REPLACE 'x + 1' WITH 'x + 2' ```"
Claude will show you a preview of the changes without modifying any files.
"Apply this transformation to my code:
UPDATE myfile.py SET imports.append('from typing import List, Dict')Run it in dry-run mode first to preview."
Claude will:
- First run in dry-run mode to show you the preview
- Ask for confirmation
- Apply the changes if you approve
"Show me what CEDARScript features are available"
Claude will display server version, supported commands, and security settings.
You can customize the server behavior using environment variables in the configuration:
{
"mcpServers": {
"cedarscript": {
"command": "python",
"args": ["-m", "cedarscript_mcp.server", "--root", "/path/to/project"],
"env": {
"CEDARSCRIPT_LOG_LEVEL": "DEBUG",
"CEDARSCRIPT_READ_ONLY": "false",
"CEDARSCRIPT_MAX_FILE_SIZE": "10485760"
}
}
}
}Available options:
CEDARSCRIPT_LOG_LEVEL: DEBUG, INFO, WARNING, ERRORCEDARSCRIPT_READ_ONLY: true/false (prevents all file writes)CEDARSCRIPT_MAX_FILE_SIZE: Maximum file size in bytes (default: 10MB)
Alternatively, use CLI arguments:
{
"mcpServers": {
"cedarscript": {
"command": "python",
"args": [
"-m",
"cedarscript_mcp.server",
"--root", "/path/to/project",
"--log-level", "DEBUG",
"--max-file-size", "10485760"
]
}
}
}Solution: Install the MCP SDK:
pip install mcp>=1.0.0Solution: Ensure the file paths in your CEDARScript commands are within the project root directory specified in --root.
Solution: Remove read-only mode by:
- Removing
--read-onlyfrom CLI args, or - Setting
"CEDARSCRIPT_READ_ONLY": "false"in env
Solution:
- Check that the configuration file path is correct
- Verify JSON syntax (use a JSON validator)
- Restart Claude Desktop completely
- Check Claude Desktop logs for error messages
You can configure multiple CEDARScript servers for different projects:
{
"mcpServers": {
"cedarscript-project-a": {
"command": "python",
"args": ["-m", "cedarscript_mcp.server", "--root", "/path/to/project-a"]
},
"cedarscript-project-b": {
"command": "python",
"args": ["-m", "cedarscript_mcp.server", "--root", "/path/to/project-b"]
}
}
}For exploring code without risk of modification:
{
"mcpServers": {
"cedarscript-readonly": {
"command": "python",
"args": [
"-m",
"cedarscript_mcp.server",
"--root", "/path/to/project",
"--read-only"
]
}
}
}For troubleshooting:
{
"mcpServers": {
"cedarscript-debug": {
"command": "python",
"args": [
"-m",
"cedarscript_mcp.server",
"--root", "/path/to/project",
"--log-level", "DEBUG"
],
"env": {
"CEDARSCRIPT_LOG_FORMAT": "json"
}
}
}
}Logs will appear in Claude Desktop's console (View → Developer → Developer Tools).
- Read ARCHITECTURE.md for system design
- Check README.md for full documentation
- Explore CEDARScript syntax for advanced transformations
- Issues: GitHub Issues
- Email: cedarscript@orgecc.com