Semantic Edit is a Model Context Protocol (MCP) server designed for semantic code editing utilizing tree-sitter. It empowers developers with safe, AST-aware code editing operations that maintain syntax structure and formatting. By offering features like semantic node targeting, safe structural editing, and syntax validation, it helps prevent breaking changes and ensures code integrity. The server currently supports Rust with an extensible architecture planned for more languages.
주요 기능
01Semantic node targeting using name, type, query, or position
020 GitHub stars
03Support for multiple languages (currently Rust)
04Safe structural editing to replace, insert, wrap, or delete AST nodes
05Syntax validation to prevent breaking changes
06Transaction safety ensures all edits are validated before application
사용 사례
01Adding documentation to code structures programmatically
02Wrapping code blocks with conditional compilation directives
03Automated code refactoring while preserving syntax