ai-operation-mcp
v1.2.3
Published
MCP server for local file editing with HTTP backend
Maintainers
Readme
ai-operation-mcp
AI Operation MCP - A Model Context Protocol (MCP) server for local file editing operations.
Features
- Read Files: Read entire files, specific line ranges, or search for patterns
- Edit Files: Replace text with exact string matching
- Multiple Encodings: Support for UTF-8, GBK, UTF-16LE, UTF-16BE
- Health Check: Monitor backend API service status
Prerequisites
- Node.js 18.0.0 or higher
- Python 3.10+ (for the backend HTTP server)
- Rust toolchain (for the file-edit-api service)
Installation
npm install -g ai-operation-mcpUsage
This package acts as a bridge between MCP clients and a local HTTP server that provides file editing capabilities.
1. Start the Backend Services
First, you need to start the backend HTTP server. You can either:
Option A: Use the launcher (Windows)
D:\rust\mcp-launcher-final.exeOption B: Manual start
cd /path/to/file-edit-mcp
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python server.pyThe HTTP server should be running on http://127.0.0.1:8082.
2. Configure Your MCP Client
Add this to your MCP client configuration:
{
"mcpServers": {
"file-edit": {
"command": "npx",
"args": [
"-y",
"file-edit-mcp-server"
]
}
}
}3. Verify
The tool provides three main functions:
- read_file: Read file content with flexible modes (full, range, search)
- edit_file: Edit files by replacing text strings
- health_check: Check if the backend API service is running
Architecture
MCP Client
↓ (stdio)
npx file-edit-mcp-server (Node.js proxy)
↓ (HTTP)
Python HTTP Server (port 8082)
↓ (HTTP)
Rust file-edit-api (port 8081)
↓
Local File SystemConfiguration
The tool connects to http://127.0.0.1:8082 by default. Make sure the backend HTTP server is running on this address.
Troubleshooting
"MCP HTTP server is not running"
This error means the backend HTTP server is not accessible. Make sure:
- The HTTP server is running
- It's listening on
http://127.0.0.1:8082 - No firewall is blocking the connection
Check server status
curl http://127.0.0.1:8082/healthShould return:
{"status": "healthy", "service": "file-edit-mcp", "version": "1.2.0"}Development
To set up for development:
git clone <repository>
cd file-edit-mcp-npm
npm install
npm linkLicense
MIT
Author
w.
Version
1.2.0
