Skip to main content
Glama

AutoLinker is an AI Agent support library for the E language. Through reverse engineering, it lets AI write code fully automatically: it automatically finds and reads relevant code based on your needs, and directly edits, modifies, and inserts code.

It also provides a local MCP service that can connect the E language IDE to Codex, Claude Code, Gemini CLI, and other tools, letting them perform fully automated E language coding (see the MCP section below).

📖 E language × AI Agent practice whitepaper · 📖 e-packager: disassemble .e into txt, modify, then repackage

Quick Start

After downloading the Release, place AutoLinker.fne into the E language lib directory and enable this support library.

🔧 AI / MCP feature configuration guide (API Key, relay stations, per-platform configuration)

📊 Before choosing a model, you can check the E language LLM benchmark scores to compare actual response packets and headless compilation results.

Related MCP server: ACE-MCP

Core Features

⭐ AI Agent Session Tab

Tell the AI what you want to do, and it will automatically search, read, and edit the current project's source code.

⭐ Right-Click Menu AI Features

  • AI Optimize Function — performs equivalent optimization on the current function

  • AI Add Comments — generates comments for the current function

  • AI Translate Function + Variable Names — renames to English lowerCamelCase

  • AI Translate Selected Text

  • AI Add Code by Current Page Type — generates new code based on the current page type, context, and your requirements

⭐ Project Specification File {文件名}.AGENTS.md

Create a .AGENTS.md with the same name in the same directory as the .e source file. Its contents are automatically injected into the system prompts of all AI features as the project specification (similar to CLAUDE.md for Claude Code and AGENTS.md for Codex).

Source file

Spec file (same directory)

test_a.e

test_a.AGENTS.md

MyProject.e

MyProject.AGENTS.md

⭐ Different .e Source Files Use Different Linkers

No more manually switching linkers back and forth. Add multiple link.ini configurations under [Tools menu → AutoLinker Settings → Linker], and switch the linker used by the current source file under [Main menu → Compile].

⭐ Automatic Switching of Dynamic/Static ec Modules During Debugging / Compilation

Prepare a pair of ec files (dynamic version / static version) for the same module, and AutoLinker will automatically replace the corresponding imported module in the project at start debug and start compile. Typical scenarios include VMP SDK and ExDui: compilation requires the static version declared by Lib, while debugging can only use the dynamic version declared by Dll.

Open AutoLinker EC Module Auto-Switch Settings from the IDE's "Tools" menu to maintain rules. Note: you must first reference either the dynamic or static ec yourself, and the paired ec files must be placed in the same folder (only the file name is changed during replacement).

⭐ Project-Level Build by Configuration

In "Tools menu → AutoLinker Settings → Build Configurations", maintain multiple output configurations for the current .e/.ec project. Supported targets include auto, Window EXE, Console EXE, DLL, E-module target, static compilation, and PowerShell actions before/after compilation. After saving, select a configuration from "Main menu → Compile → Build by Configuration"; the task generates a snapshot of the current IDE project and executes asynchronously in a separate hidden e.exe instance. The configuration is saved in <文件名>.autolinker.json next to the source file; see docs/project-build-menu-integration.md for detailed fields and variables.

Local MCP Service

To connect the E language MCP to Codex, Claude Code, Gemini CLI, and other tools, the client must support MCP Streamable HTTP.

Service Address

  • External clients always connect to http://127.0.0.1:19207/mcp; each IDE instance uses internal backend ports from 19208 onward, and the gateway is taken over by the surviving instance.

  • After successful startup, the IDE output window and autolinker.log will record:

[AutoLinker][LocalMCP] 本地 MCP 服务已启动:http://127.0.0.1:19207/mcp

Protocol

  • JSON-RPC 2.0; initialize negotiates 2025-11-25 / 2025-03-26 / 2024-11-05 (unknown versions fall back to 2025-11-25).

  • Supported methods: initialize, notifications/initialized, ping, tools/list, tools/call, DELETE /mcp.

  • Security boundary: binds only to 127.0.0.1, rejects browser requests with a non-empty Origin, and has no CORS / Bearer Token. External calls do not show an approval window, but tool whitelist, parameter Schema, workspace refresh, and source hash CAS validation are still enforced. Each native client session must successfully call refresh_workspace_mirror once. It has a fixed 4 worker threads, queues at most 32 connections, and returns HTTP 503 on overload.

Client Configuration Examples

Claude Code~/.claude.json; Gemini CLI~/.gemini/settings.json

{
  "mcpServers": {
    "AutoLinker": {
      "transport": "streamable_http",
      "url": "http://127.0.0.1:19207/mcp"
    }
  }
}

Codex~/.codex/config.toml

[mcp_servers.AutoLinker]
url = "http://127.0.0.1:19207/mcp"

Cursor / Windsurf / IDE — In the MCP settings page, add: Name AutoLinker, Type http / streamable_http, URL http://127.0.0.1:19207/mcp.

Project Source Read/Write Model

  • The built-in AI automatically prepares a mirror in full mode before each round of requests; external MCP sessions must call refresh_workspace_mirror before the first read/write. The mirror is unpacked by e-packager into %TEMP%/AutoLinker/workspace-mirror/ (including unsaved changes) without polluting the source directory. mode supports auto / main_only / full.

  • Call e_packager only when the user explicitly asks to parse, view, reference, or replicate an external .e / .ec file, and the current MCP session must first have successfully called refresh_workspace_mirror. The required parameter is file_path (an absolute path, or a path relative to the current project directory; only existing regular .e / .ec files are accepted). The file is unpacked into the read-only directory unimported_code/{文件名}/ under the current mirror; use list_files / search_code to locate files, then read them with read_file / read_files. Do not use read_code_item on unreferenced source code, and must not modify it with write tools. A directory with the same name is replaced only after a successful unpack; on success, operation="unpack", output_directory, file_count, the new mirror_generation, and read_hint are returned. Unpacking changes the mirror generation, so paged reads must restart from the first page.

  • All reads go through mirror-relative paths (list_files, search_code, read_file, read_files, read_code_item); large files return next_source_byte_offset for continued reading. For subsequent pages, it is recommended to pass back the previous page's non-zero mirror_generation unchanged; if omitted, it is automatically bound to the current mirror generation, while an explicitly passed old-generation cursor will still be rejected.

  • Before editing, use read_real_file to obtain a paged view and code_hash as the CAS baseline. Write tools (edit_file, multi_edit_file, write_file, etc.) take file_path as the target, map it back to the IDE program item, and write directly back to the IDE without round-trip compilation.

  • Writes must include the SHA-256 expected_base_hash (expected_current_hash for restore) to prevent an old baseline from overwriting new changes; the result only returns hashes, snapshots, validation, and change statistics, with the full result in structuredContent.

  • src/*.xml are E language native window UI files and are for reading and searching only. The current tools do not support adjusting the position, size, z-order, or properties of windows or controls, adding or deleting controls, or adding, deleting, or modifying control event bindings. The window assembly code and existing event handler code in the corresponding src/*.txt files can still be edited, but adding an event subroutine does not mean the control event binding has been established. Fixed tables (constants, global variables, DLL declarations, data types) can be edited through the corresponding paths, and assembly variable write-backs will be processed into an IDE-acceptable format.

  • When multiple IDEs are open, first call list_instances to view the target project, then use select_instance to select an instance; the selection is isolated by Mcp-Session-Id, and there is no silent switch after an instance exits.

Public Tools (tools/list)

Category

Method

Description

Read

refresh_workspace_mirror

Refresh the mirror from the IDE in-memory project (auto / main_only / full)

Read

e_packager

Unpack other .e / .ec files into the read-only reference directory unimported_code/{文件名}/ in the refreshed mirror; returns the new mirror_generation

Read

list_files

List files in the mirror by glob

Read

search_code

Search file by file within the mirror; supports batch patterns, glob, context, and pagination

Read

read_file / read_files

Read single / batch files or ranges, with line numbers

Read

read_code_item

Read a complete subroutine / declaration block by top-level code item name

Read

read_real_file

Return a paged view and code_hash from the real IDE page (pre-write baseline)

Edit

edit_file / multi_edit_file

Exact text replacement (single / batch)

Edit

write_file

Overwrite the real page with complete source code; supports expected_base_hash

Edit

diff_file

Preview structured diff, no write-back

Edit

restore_file_snapshot

Restore the pre-write snapshot

Current Page

get_current_page_info

Current page name, type, and parse source

Current Page

get_current_eide_info

Source path, IDE process path, MCP port, etc.

Routing

list_instances

List running AutoLinker IDE instances and the current session selection

Routing

select_instance

Route the current MCP session to the specified instance

Compile

compile_with_output_path

target defaults to auto; verifies success by artifact fingerprint

Interaction

run_powershell_command

Execute PowerShell after confirmation; terminates the process tree on timeout

Networking

search_web_tavily

Search web pages online

Networking

fetch_url

Fetch public HTTP(S) text; blocks loopback / private networks / redirects

Networking

extract_web_document

Extract page body text and absolute link summaries

Other Features

⭐ Headless Command-Line Compilation

It is recommended to use AutoLinkerTest headless-compile to launch e.exe: it automatically closes startup pop-ups, hides the IDE, calls compile_with_output_path, and outputs the resulting JSON to the console. The launcher supports concurrent calls from multiple processes: the same .e project is queued in call order, while different projects can be compiled in parallel; the output path should still be kept unique by the caller.

.\bin\fne_release\AutoLinkerTest.exe headless-compile `
  "C:\path\to\e571.exe" "D:\demo\demo.e" "D:\demo\build\demo.exe" `
  --target auto --static --result "D:\demo\build\compile-result.json" --timeout 120

target supports auto, win_exe, win_console_exe, win_dll, ecom; --static applies only to EXE/DLL. When --result is omitted, each invocation generates a separate <输出文件>.headless.<invocation-id>.json and atomically updates the compatibility file <输出文件>.headless.json. {易语言目录}\AutoLinker\Log\headless_compile_last.json is also the atomically updated "last result"; concurrent callers should not rely on it to distinguish their own results. When --result is passed explicitly, concurrent callers should use different paths.

You can also launch the main program directly (it only handles headless compilation; for early pop-ups and coordinating concurrent launches of the same project, the launcher is still recommended):

"C:\path\to\e571.exe" "D:\demo\demo.e" `
  --autolinker-headless-compile `
  --autolinker-output "D:\demo\build\demo.exe" `
  --autolinker-target auto `
  --autolinker-result "D:\demo\build\compile-result.json" `
  --autolinker-invocation-id "compile-001"

⭐ Rewrite Core Library Functions

Replacing core library functions with modern C++ can greatly improve performance and provides protection against e-function signature cracking and AV evasion; it also applies to third-party libraries.

Usage

  1. In IDA, determine the correct 函数签名 (most core library functions are in LibFn.obj of krnln_static.lib); refer to the BlackMoon core library open source implementation.

  2. Implement the function in your own Lib (refer to the TestCore project), and compile as a 32-bit lib in Release. Example:

// C++20(需 VC2022)重写核心库「寻找文本」,约为核心库 300% 速度
extern "C" void __cdecl krnln_fnInStr(PMDATA_INF pRetData, INT nArgCount, PMDATA_INF pArgInf) {
    std::string_view inputString = pArgInf[0].m_pText;
    std::string_view searchString = pArgInf[1].m_pText;
    if (inputString.empty() || searchString.empty()) { pRetData->m_int = -1; return; }
    size_t start = (pArgInf[2].m_dtDataType == _SDT_NULL || pArgInf[2].m_int <= 1) ? 0 : pArgInf[2].m_int - 1;
    auto r = (pArgInf[3].m_bool)
        ? std::search(inputString.begin() + start, inputString.end(), searchString.begin(), searchString.end(),
                      [](char a, char b) { return std::tolower(a) == std::tolower(b); })
        : std::search(inputString.begin() + start, inputString.end(), searchString.begin(), searchString.end());
    pRetData->m_int = (r != inputString.end()) ? std::distance(inputString.begin(), r) + 1 : -1;
}
  1. Open AutoLinker Core Library Function Rewrite Settings from the IDE's "Tools" menu to maintain the list of .lib files to force-link:

    • Lib path: the .lib appended to linking (placed before krnln_static.lib to override symbols with the same name)

    • Linker match: leave empty to apply to all linkers; if text is filled in, it takes effect only when the selected linker name contains that text (e.g. vc2022+pf)

    • Enable switch: allows temporarily disabling a rule

  2. After saving, static compilation takes effect; warnings such as LNK4006 / LNK4088 may appear, but they do not affect operation.

Notes

  • This method automatically enables the linker's /FORCE to ignore conflicts.

  • Your own Lib must disable /GL; otherwise the second link pass will ignore the Lib order adjusted by AutoLinker.

  • The sample TestCore uses C++20 and requires the VC2022 linker; the settings page is based on WebView2, so please ensure the runtime is installed.

⭐ Mouse Back Button Returns to the Previous Edit

A common feature in other IDEs; a personal preference.

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/giaosang8888-cmd/AutoLinker-5.1.2-Local'

If you have feedback or need assistance with the MCP directory API, please join our Discord server