Skip to main content
Glama

cedardiff MCP サーバー

CEDARScript 文法ルールを使用してファイルを編集する

これは、コード操作のためのSQL風言語であるCEDARScriptを実装した、TypeScriptベースのMCPサーバーです。以下の機能を提供します。

  • コード操作コマンドの包括的な文法

  • CEDARScript操作を実行するためのツール

  • 複雑なパターンマッチングと変換のサポート

特徴

文法

  • コード操作用の SQL のような構文 (DDL、DML)

  • ファイル、関数、クラス、メソッドのターゲット設定のサポート

  • 正規表現、接頭辞/接尾辞、インデントルールによるパターンマッチング

  • ブロックレベルのコード操作機能

ツール

  • edit_file - CEDARScriptコマンドを実行する

    • スクリプトと作業ディレクトリをパラメータとして受け取ります

    • ファイルの作成、削除、移動、更新をサポート

    • パターンベースのコード変換

実施状況

現在のテストで明らかになったこと:

  • コマンド解析は正しく動作します

  • 文法は複雑な演算をサポートする

  • ファイル書き込みメカニズムの改善が必要

  • 成功メッセージが返されましたが、変更は保存されませんでした

Related MCP server: ast-editor

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "cedardiff": {
      "command": "/path/to/cedardiff/build/index.js"
    }
  }
}

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

ESモジュールの移行

プロジェクトはESモジュールを使用するように移行されました。主な変更点は次のとおりです。

  • package.jsonに"type": "module"を追加しました

  • "module": "ESNext"を使用するようにtsconfig.json更新しました

  • インポート/エクスポート文をESモジュール構文に変換しました

  • ESモジュールと互換性があるように型定義を更新しました

互換性に関する注意事項

  • Node.jsバージョン12以上を使用していることを確認してください

  • モジュールのインポートにはrequire()の代わりにimportを使用する

  • ローカルファイルをインポートするときに.js拡張子を使用する

Available Tools

1 tool
edit_fileC

Edit a file using CEDARScript syntax

Inputs: script (required), workingDir (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'edit_file' has a clearly distinct purpose that cannot be confused with any other tool in this set.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'edit_file' follows a clear verb_noun pattern, and there are no other tools to cause inconsistency.

    Tool Count2/5

    A single tool is generally too few for most server purposes, as it limits functionality and suggests an incomplete or narrow scope. For a server named 'Cedardiff MCP Server' which implies CEDAR-related operations, one tool feels insufficient to cover typical needs like validation, querying, or other file operations.

    Completeness1/5

    The server is severely incomplete for its apparent domain of CEDAR operations. With only an 'edit_file' tool, there are obvious gaps such as creating, reading, validating, or deleting files, and no coverage of other CEDAR-related tasks like policy management or analysis.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      AST-targeted code editing MCP server with 28 surgical tools for structural edits across 11 languages. Built on tree-sitter, replaces brittle search/replace with byte-correct edits keyed by symbol names.
      2
      28
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Transforms TypeScript and JavaScript codebases into a persistent code knowledge graph in SQLite, enabling structural codebase navigation via deterministic graph queries without reading source files.
      26 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables parsing, indexing, and querying source code as structured knowledge, providing code exploration, spec generation, and migration tools via 20 MCP tools.
      MIT