Edit MCP
Required as a runtime environment for the Edit-MCP server, with version 16 or higher needed for installation and operation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Edit MCP format the code in src/utils.js and add proper JSDoc comments"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Edit-MCP: Model Context Protocol Server for Microsoft Edit
Edit-MCP is a Model Context Protocol (MCP) server that integrates with Microsoft's Edit tool to provide advanced file editing capabilities to AI systems. It follows a hybrid architecture that combines direct file system operations for performance with Microsoft Edit integration for complex editing tasks.
Overview
The Edit-MCP server acts as a sophisticated coordinator between AI systems and file editing operations. It exposes a standardized MCP interface that allows AI models to:
Read and write files
Search and replace text
Format code
Perform complex editing operations
Coordinate multi-file edits
And more...
Related MCP server: MCP Chat CLI
Architecture
Edit-MCP follows a hybrid architecture with the following components:
1. Core MCP Server
Handles MCP protocol communication
Routes operations to appropriate subsystems
Manages file state and metadata
Coordinates between multiple Edit instances
Provides caching and optimization
2. File System Manager
Performs direct file operations for simple tasks
Handles basic CRUD operations
Provides text search and simple find/replace
Manages file metadata operations
Supports batch operations across multiple files
3. Edit Instance Manager
Manages Microsoft Edit processes for complex operations
Handles complex editing scenarios
Coordinates multi-file operations
Manages Edit's TUI interactions programmatically
4. Operation Router
Decides which subsystem handles each operation
Routes simple operations to File System Manager
Routes complex operations to Edit Instance Manager
Coordinates hybrid operations between both subsystems
Installation
Prerequisites
Node.js 16 or higher
Microsoft Edit installed and available in your PATH
Install from Source
# Clone the repository
git clone https://github.com/mixelpixx/edit-mcp.git
cd edit-mcp
# Install dependencies
npm install
# Build the project
npm run buildUsage
Starting the Server
You can start the Edit-MCP server using either stdio or HTTP transport:
# Start with stdio transport (for direct integration with AI systems)
npm run stdio
# Start with HTTP transport (for web-based integration)
npm run httpCommand Line Options
Usage: edit-mcp [options]
Options:
-V, --version output the version number
-p, --port <port> Port to listen on for HTTP transport (default: "3000")
-e, --edit-path <path> Path to the Edit executable
-m, --max-instances <number> Maximum number of Edit instances (default: "5")
-t, --timeout <milliseconds> Timeout for Edit instances in milliseconds (default: "300000")
-c, --config <path> Path to configuration file
-d, --debug Enable debug logging
-s, --stdio Use stdio transport instead of HTTP
-h, --help display help for commandConfiguration
You can configure Edit-MCP using a JSON configuration file:
{
"editExecutable": "/path/to/edit",
"maxEditInstances": 5,
"instanceTimeout": 300000,
"simpleOperationThreshold": 1000,
"complexityFactors": {
"fileSize": 0.3,
"operationType": 0.4,
"contextRequirement": 0.3
}
}Available Tools
Edit-MCP provides the following tools:
File System Tools
read_file: Read the contents of a filewrite_file: Write content to a filelist_files: List files in a directoryfind_in_file: Find occurrences of a pattern in a file
Edit Tools
format_code: Format code in a filecomplex_find_replace: Perform advanced find and replace operationsinteractive_edit_session: Start an interactive editing session
Hybrid Tools
smart_refactor: Intelligently refactor code across multiple filesbackup_and_edit: Create backups of files before editing them
HTTP Transport
Edit-MCP now supports HTTP transport in addition to stdio, allowing remote access and REST API endpoints.
Starting with HTTP Transport
# Start with default HTTP port (3000)
edit-mcp
# Start with custom port
edit-mcp --port 8080
# Start with configuration file
edit-mcp --config config.http.example.jsonREST API Endpoints
Health Check
GET /healthJSON-RPC Endpoint
POST /jsonrpc
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "read_file",
"arguments": {
"path": "example.txt"
}
},
"id": 1
}REST API Endpoints
GET /api/tools- List available toolsPOST /api/tools/:toolName- Call a specific toolGET /api/files/:path- Read file contentPUT /api/files/:path- Write file contentGET /api/list/:directory- List files in directoryPOST /api/search- Search for patterns in filesPOST /api/format- Format codePOST /api/refactor- Refactor symbols across filesGET /api/docs- API documentation
Authentication
Enable API key authentication by setting authEnabled: true in your config:
{
"authEnabled": true,
"apiKey": "your-secure-api-key"
}Include the API key in requests:
Header:
X-API-Key: your-secure-api-keyQuery parameter:
?apiKey=your-secure-api-key
CORS Configuration
Configure allowed origins in your config file:
{
"corsOrigins": ["http://localhost:*", "https://yourdomain.com"]
}Rate Limiting
Configure rate limiting to prevent abuse:
{
"rateLimitWindowMs": 900000, // 15 minutes
"rateLimitMax": 100 // 100 requests per window
}Development
Building the Project
# Build the project
npm run build
# Watch for changes and rebuild
npm run watchRunning in Development Mode
# Run with hot reloading
npm run devLicense
MIT
Acknowledgements
Microsoft for the Edit tool
The Model Context Protocol community
Available Tools
9 toolsbackup_and_editBDestructive
Create backups of files before editing them
Inputs: files (required), operation (required).
complex_find_replaceBDestructive
Perform advanced find and replace operations with context awareness
Inputs: path (required), pattern (required), replacement (required), options.
find_in_fileBRead-only
Find occurrences of a pattern in a file
Inputs: path (required), pattern (required), contextLines.
format_codeBIdempotent
Format code in a file
Inputs: path (required), language.
interactive_edit_sessionBDestructive
Start an interactive editing session for complex edits
Inputs: files (required), instructions.
list_filesBRead-only
List files in a directory
Inputs: directory (required), pattern.
read_fileBRead-only
Read the contents of a file
Inputs: path (required), encoding.
smart_refactorADestructiveIdempotent
Intelligently refactor code by renaming symbols across multiple files
Inputs: files (required), oldName (required), newName (required).
write_fileBDestructiveIdempotent
Write content to a file
Inputs: path (required), content (required), encoding.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, such as backup_and_edit for safe modifications and smart_refactor for code restructuring. However, find_in_file and complex_find_replace could be confused, as both involve searching, though the latter adds advanced features like context awareness.
All tool names follow a consistent snake_case pattern with clear verb_noun structures, such as read_file and format_code. There are no deviations or mixed conventions, making the naming predictable and easy to understand.
With 9 tools, the count is well-scoped for a file editing server, covering essential operations like reading, writing, and advanced edits. Each tool serves a clear purpose without feeling excessive or insufficient for the domain.
The toolset provides comprehensive coverage for file editing tasks, including basic CRUD operations (list_files, read_file, write_file), advanced features (smart_refactor, format_code), and safety measures (backup_and_edit). No obvious gaps exist for the stated purpose.
Maintenance
Related MCP Connectors
MCP-native collaborative markdown editor with real-time AI document editing
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server to expose VS Code editing features to an LLM for AI coding9561 npm392MIT
- AlicenseAqualityDmaintenanceA command-line chat interface that connects to an MCP server for reading and editing documents. It provides tools for document manipulation, resource access, and prompts for formatting and summarization.2MIT
- AlicenseAqualityDmaintenanceMCP server that combines Read+Edit file operations into single tool calls. 80-95% fewer tool calls formulti-file refactoring across Claude, Cursor, Windsurf, and more.315 npm3MIT
- FlicenseAqualityCmaintenanceEnables interactive chat with a local LLM using MCP architecture for document management, including tools to read, edit, and format documents.2-