Cedardiff
Edit files using CEDARScript, a SQL-like language for code manipulation.
cedardiff MCP Server
Edit files with CEDARScript grammar rules
This is a TypeScript-based MCP server that implements CEDARScript, a SQL-like language for code manipulation. It provides:
- A comprehensive grammar for code manipulation commands
- Tools for executing CEDARScript operations
- Support for complex pattern matching and transformations
Features
Grammar
- SQL-like syntax for code operations (DDL, DML)
- Support for file, function, class, and method targeting
- Pattern matching with regex, prefix/suffix, and indentation rules
- Block-level code manipulation capabilities
Tools
edit_file- Execute CEDARScript commands- Takes script and working directory as parameters
- Supports file creation, deletion, moving, and updating
- Pattern-based code transformations
Implementation Status
Current testing has revealed:
- Command parsing works correctly
- Grammar supports complex operations
- File writing mechanism needs improvement
- Success messages returned but changes not persisted
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Installation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"cedardiff": {
"command": "/path/to/cedardiff/build/index.js"
}
}
}
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
ES Module Migration
The project has been migrated to use ES modules. Key changes include:
- Added
"type": "module"topackage.json - Updated
tsconfig.jsonto use"module": "ESNext" - Converted import/export statements to ES module syntax
- Updated type definitions to be compatible with ES modules
Compatibility Notes
- Ensure you are using Node.js version 12 or higher
- Use
importinstead ofrequire()for module imports - Use
.jsextension when importing local files
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Gradle Class Finder MCP
Find and decompile classes within Gradle dependencies.
Gateway MCP Server
A gateway server that intelligently routes MCP requests to multiple backend servers.
Azure DevOps
Provides comprehensive integration with Azure DevOps services.
MCP-guide
A guide for setting up an MCP server using a Python virtual environment and integrating it with the Cline VS Code extension.
302AI Basic MCP Server
A toolkit for enhancing the fundamental capabilities of large language models.
MCP Tools
Provides file system and command execution tools for LLM clients like Claude Desktop.
OpenAPI Schema
Exposes OpenAPI schema information to Large Language Models (LLMs). The server loads OpenAPI schema files specified via command line.
Tinyman MCP
An MCP server for the Tinyman protocol on the Algorand blockchain, offering tools for swaps, liquidity provision, and pool management.
nf-core MCP Server
Manage and navigate local nf-core pipeline repositories.
MCPCLIHost
A CLI host that allows Large Language Models (LLMs) to interact with external tools using the Model Context Protocol (MCP).