terraphim / terraphim/terraphim-ai
Phase 1: Extend MCP Server with File Editing Tools (Week 1)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 62
- Forks
- 5
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 1
Description
Part of Epic #270
Objective
Add 6 new file editing tools to existing MCP server, leveraging terraphim-automata for intelligent matching.
Tasks
1. Add File Editing Tools to MCP Server
Location: crates/terraphim_mcp_server/src/lib.rs
Add to existing 17 tools:
- edit_file_search_replace - Using automata strategies
- edit_file_fuzzy - Using fuzzy_autocomplete_search_levenshtein
- edit_file_patch - Apply unified diff
- edit_file_whole - Whole file rewrite
- validate_edit - Pre-edit validation
- lsp_diagnostics - Post-edit validation
2. Leverage Existing Automata Functions
- find_matches → exact search
- fuzzy_autocomplete_search_levenshtein → fuzzy match
- fuzzy_autocomplete_search → Jaro-Winkler match
- replace_matches → base for code replacement
3. Add Block Anchor Matching to Automata
Location: crates/terraphim_automata/src/lib.rs
4. Generate TypeScript Types
- Use existing WASM support
- Generate types for all new tools
Success Criteria
- 6 new MCP tools exposed
- Block anchor matching added
- TypeScript types generated
- Integration tests pass
- Can edit a file using 3+ strategies
Time: 1 week
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading crates/terraphim_mcp_server/src/lib.rs and crates/terraphim_automata/src/lib.rs, then inspect the existing automata functions and WASM support. Implementing the six tools, block anchor matching, generated TypeScript types, and integration coverage is complete when all six tools are exposed and files can be edited through at least three strategies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript, wasm
- Domain
- backend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100