Content
# Tool List
> **Model Context Protocol (MCP) Server for EasyLanguage (EPL) Development**
EAiCoding Rust MCP Service is a local Model Context Protocol (MCP) plugin for EasyLanguage (EPL) developers and AI clients.
This project removes the complex front-end UI shell and encapsulates the processing of binary EasyLanguage files, built-in knowledge base retrieval of precise easy modules, Search-Replace based partial patching, engineering static security and duplicate diagnosis, and command-line automatic compilation verification into a standalone Rust back-end service based on **Stdio (JSON-RPC 2.0)** transmission.
This allows you to connect to the local EasyLanguage compilation and development chain with one click in modern AI editors such as **Cursor**, **Claude Desktop**, or **VSCode**, enabling AI to "understand" binary EasyLanguage code and modify and compile it reliably locally.
## 🛠️ Features
* **One-click Environment Setup (`setup_env`)**: Automatically download the official Release EasyLanguage compiler and command-line tool dependencies (`e.zip`), eliminating the hassle of manual path configuration.
* **Binary Parsing and Conversion**: Parse the global structure of `.e`/`.ec` files or export them perfectly as UTF-8 encoded `ecode` text engineering directories.
* **Incremental Patching (`patch_file`)**: The large model performs incremental patch modifications to code files through Search-Replace syntax on the Rust side, greatly saving context tokens and ensuring modification robustness.
* **Compilation Diagnosis Regression (`compile_efile`)**: Automatically call the command-line compiler `ecl.exe` + `e.exe` for regression, and intercept compilation error logs for large model error correction.
* **Jingyi Module Retrieval (`search_jingyi_module`)**: Pure Rust implementation of multi-route hybrid retrieval, which can locate and recommend the best API implementation path in seconds according to Chinese functional intentions.
* **Parallel Engineering Diagnosis (`analyze_project`)**: Scan the entire text engineering, find hard-coded URLs, insecure plaintext transmission, and duplicate code logic on the Rust side, and output diagnosis reports.
* **Adaptive Coding Read and Write**: Automatically convert between **GBK** and **UTF-8** without loss during background reading and writing to prevent Chinese characters from being garbled when the model edits EasyLanguage text source code.
## 🔌 Configuration and Integration Guide
### 1. Compile and Release Package
On a Windows machine with the Rust language development environment installed, navigate to the project root directory and execute the release build:
```powershell
# Use the automated packaging script to compile and generate the packaged ZIP distribution package
powershell -File .\package.ps1
```
After successful compilation, the generated independent executable file and distribution package will be output in:
📂 `release/eaicoding-mcp-portable/eaicoding-mcp.exe`
📂 `release/eaicoding-mcp-portable.zip`
### 2. Client Integration Configuration
This service supports **Stdio (command-line process)** and **SSE (Server-Sent Events HTTP)** two calling protocols. It is recommended to use the **SSE** protocol, which supports cross-process, cross-LAN calls, and the service runs more stably.
#### 2.1 SSE (HTTP) Service Operation and Configuration (Recommended)
Start the MCP service in the terminal:
```powershell
# Start listening on port 8765 by default after startup
.\release\eaicoding-mcp-portable\eaicoding-mcp.exe
```
##### 2.1.1 Client Automatic Configuration with `.agents/mcp_config.json`
The `.agents/mcp_config.json` of this project defines the SSE service connection address for the MCP client:
```json
{
"mcpServers": {
"eaicoding-mcp": {
"url": "http://127.0.0.1:8765/sse"
}
}
}
```
If you are using an Agent tool that supports automatic loading of the `.agents/` directory (such as Antigravity / Gemini Code Assist plugin, etc.), it will automatically read and access the SSE service.
##### 2.1.2 Client Manual Configuration (such as Cursor / Cline)
1. Open Cursor's **Settings** -> **Features** -> **MCP**.
2. Click **+ Add New MCP Server**.
3. Fill in the following information:
* **Name**: `eaicoding-mcp`
* **Type**: `SSE`
* **URL**: `http://127.0.0.1:8765/sse`
4. Save it.
#### 2.2 Stdio (Process Pull-up) Client Configuration
If you do not need to keep the background service resident, but instead have the AI client automatically pull up the process each time, you can use the Stdio mode configuration:
##### 2.2.1 Client Configuration: Claude Desktop
Open the configuration file of `Claude Desktop` (usually in `%APPDATA%\Claude\claude_desktop_config.json`), and add the following item:
```json
{
"mcpServers": {
"eaicoding-mcp": {
"command": "C:\\path\\to\\your\\eaicoding-mcp.exe",
"args": []
}
}
}
```
*(Please replace `C:\\path\\to\\your\\eaicoding-mcp.exe` with the actual absolute path where you store the `.exe` file, paying attention to escape backslashes `\\`)*.
##### 2.2.2 Client Configuration: Cursor (Stdio Mode)
1. Open Cursor **Settings** -> **Features** -> **MCP** -> **+ Add New MCP Server**.
2. Fill in the configuration:
* **Name:** `eaicoding`
* **Type:** `stdio`
* **Command:** `C:\path\to\your\eaicoding-mcp.exe`
3. Save it.
## 💡 Skills Running Mechanism and EasyLanguage Maintenance Specifications
The project has built-in skill guides for AI development assistants, which are stored in [SKILL.md](file:///C:/Users/whaty/Desktop/eMcp/.agents/skills/eaicoding_mcp_development/SKILL.md). When AI assistants (such as Antigravity) face development, modification, and EasyLanguage project maintenance tasks in this project, **they will automatically activate this skill**.
### 1. Core Skill Specifications
* **Plain-text Dual Tracking**: EasyLanguage binary files `.e`/`.ec` cannot be diffed and merged. The skill specification requires that after modifying the code and saving it, **must** run `export_ecode` to export it as an `ecode` text engineering directory (`ecode_output/[project name]/`) and submit it to Git for Code Review and branch merging.
* **One-click "Modify-Compile-Compile" Loop**:
1. Use `patch_file` differential patching text source code;
2. Call `generate_efile` to recompile and generate binary `.e` files;
3. Call `compile_efile` to start the EasyLanguage command-line compiler, check for compilation errors, and pass it.
* **High-Fidelity Migration Mapping**: The skill package provides a complete set of commonly used EasyLanguage functions/components and modern language (Python/Go/Rust) **migration mapping tables**. It covers UI (PyQt/Slint/Tauri), HTTP requests, concurrent multithreading (license/Mutex), INI configuration read and write, database (SQLite), and lossless migration solutions for V8/JS engines.
* **Engineering Static Diagnosis**: Use `analyze_project` to scan the source code for hard-coded URLs, sensitive fields (such as tokens, passwords), and insecure plaintext transmission, and output diagnosis reports saved in the `docs/` directory.
## 📂 Directory Structure
```text
eaicoding-mcp/
.agents/
mcp_config.json MCP client SSE connection configuration file
skills/
eaicoding_mcp_development/
SKILL.md Project development and EasyLanguage reverse migration skill guide
src/ Rust source code
main.rs MCP message routing and SSE HTTP server entry
lib.rs Project underlying library declaration
eagent_tools.rs Compilation chain environment detection and self-contained management
ecode_parser.rs EasyLanguage binary and text conversion core
jingyi_search.rs Jingyi module multi-route recall knowledge base
patch.rs Search-Replace partial patching engine
analyze.rs Parallel project diagnosis engine
local_files.rs GBK <-> UTF-8 read and write conversion
easy_language_sdk.rs EasyLanguage installation package environment scan
resources/eagent-tools/ EasyLanguage tool chain packaged with the application (including ecl, e2txt, etc.)
package.ps1 Automated packaging script
Cargo.toml Cargo project configuration file
README.md This project description document
```
## 📦 MCP Tools Interface Definition and Parameter Description
After the MCP service starts, it will report the following Tool interfaces to the client:
### 1. `inspect_env`
* **Purpose:** Check the local EasyLanguage tool chain environment.
* **Parameters:** None
### 2. `setup_env`
* **Purpose:** One-click download Release package `e.zip` and extract it to the local `%USERPROFILE%\.eaicoding\eagent-tools` directory.
* **Parameters:** None
### 3. `parse_efile`
* **Purpose:** Extract the internal public API and assembly overview of `.e`/`.ec` engineering files.
* **Parameters:**
* `file_path` (string, required): Absolute path of the binary source file.
### 4. `export_ecode`
* **Purpose:** Export binary `.e` files as `ecode` text engineering directories for easy LLM editing.
* **Parameters:**
* `source_path` (string, required): Path of the binary source file.
* `output_dir` (string, optional): Output directory of the exported text engineering. Defaults to `%USERPROFILE%\.eaicoding\ecode`.
### 5. `generate_efile`
* **Purpose:** Recompile the text form `ecode` engineering directory to generate binary `.e` files.
* **Parameters:**
* `ecode_dir` (string, required): Path of the text engineering directory.
* `output_path` (string, optional): Absolute path of the generated `.e` binary file.
### 6. `patch_file`
* **Purpose:** The optimal way for large models to locally modify source code. Receive search-replace format difference blocks to perform atomic replacement on target files.
* **Parameters:**
* `file_path` (string, required): Absolute path of the target file.
* `patch` (string, required): Code block containing `<<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE`.
* **Patch Format Example:**
```text
<<<<<<< SEARCH
Information box (“original content”, 0, , )
=======
Information box (“new content”, 0, , )
>>>>>>> REPLACE
```
### 7. `compile_efile`
* **Purpose:** Automated command-line compilation and regression, intercepting compilation error logs.
* **Parameters:**
* `source_path` (string, required): Absolute path of the binary `.e` source file.
* `output_path` (string, optional): Absolute path of the compiled `.exe` executable file.
* `static_link` (boolean, optional): Whether to statically link, default `true`.
* `module_paths` (array[string], optional): List of absolute paths of `.ec` external modules required for compilation.
### 8. `search_jingyi_module`
* **Purpose:** Retrieve the built-in Jingyi module knowledge base, supporting advanced scoring and Reranker.
* **Parameters:**
* `query` (string, required): Retrieval keyword or Chinese demand description.
* `limit` (integer, optional): Limit on the number of best API matching results returned, default 8.
### 9. `analyze_project`
* **Purpose:** Static scanning and duplicate logic checking.
* **Parameters:**
* `ecode_dir` (string, required): Absolute path of the text engineering directory.
### 10. `read_ecode_file`
* **Purpose:** Read source code files, adaptively handle GBK -> UTF-8 decoding to prevent garbled characters.
* **Parameters:**
* `file_path` (string, required): Absolute path of the target file.
* `max_chars` (integer, optional): Upper limit of character truncation, default 12000.
### 11. `write_ecode_file`
* **Purpose:** Overwrite and write source code files, automatically handling UTF-8 -> GBK transcoding and Windows CRLF line specification.
* **Parameters:**
* `file_path` (string, required): Absolute path of the target file.
* `content` (string, required): Source code content to be written.
## 🔎 Technical Points Analysis
### 1. Character Set Transcoding (GBK <-> UTF-8)
Since large model clients can only understand `UTF-8` encoding, while EasyLanguage compilers and support libraries only support `GBK` character sets under Windows Chinese systems. If correct transcoding is not performed during writing or reading, generated Chinese code containing strings (e.g., `Information box (“Hello”, 0, , )`) may cause garbled characters or even lead to compiler crashes. The service introduces `encoding_rs` at the bottom to perform atomic, bidirectional GBK encoding parsing and formatting on data streams.
### 2. Common Error Checking for Command-Line Compilation
* **Prompt for missing `VC98linker\bin\link.exe`:**
Indicates that the linker environment is not correctly configured. Please call the `setup_env` tool to ensure that the local data directory has extracted the complete EasyLanguage compiler package.
* **Prompt for unreferenced support libraries/modules:**
Since the command-line compiler will not automatically load `.ec` files not packaged with the source file or declared in parameters, please ensure that when calling `compile_efile`, pass all missing module absolute paths through `module_paths`.
* **Static linking failure:**
Some EasyLanguage support libraries (e.g., `.fne`) do not support static compilation into `.obj` format due to historical reasons. Try setting the `static_link` parameter to `false` when calling `compile_efile` (use independent compilation to generate `.exe` files with external dll/support library references).
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
No recommendations available