#tree-sitter #mcp #semantic-editing #code-editing

app semantic-edit-mcp

MCP server for semantic code editing with tree-sitter

5 releases

Uses new Rust 2024

0.2.1 Jul 29, 2025
0.2.0 Jul 26, 2025
0.1.2 Jun 7, 2025
0.1.1 Jun 6, 2025
0.1.0 Jun 6, 2025

#194 in Text processing

Download history 77/week @ 2025-05-31 263/week @ 2025-06-07 2/week @ 2025-06-14 1/week @ 2025-06-28 4/week @ 2025-07-19 229/week @ 2025-07-26 17/week @ 2025-08-02 4/week @ 2025-08-09

333 downloads per month

MIT/Apache

125KB
3K SLoC

semantic-edit-mcp

codecov ci crates.io version badge

A Model Context Protocol server for AST-aware code editing

Supported Languages and Important Language Notes

  • Rust
    • Must have rustfmt available on the PATH
    • Currently assumes edition 2024 for formatting, eventually this will be determined from context
  • Python
    • Must have ruff available on the PATH
  • JavaScript/TypeScript/JSON/JSX/TSX
    • Must have biome available on the PATH
  • TOML
    • No external dependencies, taplo formatting included
  • Plaintext / markdown / default editor
    • No external dependencies

Tools

  preview-edit           Stage an operation and see a preview of the changes
  retarget-edit          Change the targeting of an already-staged operation without rewriting the content
  persist-edit           Execute the currently staged operation
  set-working-directory  Set the working context path for a session

Installation

$ cargo install semantic-edit-mcp

Usage with Claude Desktop or gemini-cli

Add this to your MCP configuration JSON file:

{
  "mcpServers": {
    "edit": {
      "command": "/path/to/semantic-edit-mcp/semantic-edit-mcp",
      "args": ["serve"]
    }
  }
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~54MB
~1.5M SLoC