The AI-Native Code Action Backend โ the "hands" of the Cortex ecosystem.
cortex-astsees.cortex-actdoes.
cortex-act is a pure-Rust MCP (Model Context Protocol) server that provides AI coding agents with write, edit, and execute capabilities. It is deliberately scoped to output-only operations to enforce a strict separation of concerns:
| Project | Role | Capability |
|---|---|---|
CortexAST | ๐๏ธ Eyes | Read-only: code analysis, symbol lookup, semantic navigation |
cortex-act | โ Hands | Write/execute: file edits, config patching, shell commands |
CortexSync | ๐ง Brain | Global memory: captures intent/decisions, vectorizes memories |
Together, they form the CortexSync Ecosystem โ a seamless, cross-IDE memory and action layer for AI agents.
[!IMPORTANT] To enable full ecosystem features (like task-end memory capture), ensure
cortex-syncis running globally andCortexASTis installed as your primary MCP server.
cortex_act_edit_astReplace or delete a named symbol (function/class/struct) in any source file. Targets by name, not line number. Auto-heals broken AST via local LLM if validation fails. Use cortexast map_overview to discover symbol names first.
cortex_patch_fileSurgically patch config (JSON/YAML/TOML via dot-path), markdown docs (section heading), or .env (key). Avoids full-file rewrites.
type=config: target='dependencies.serde'type=docs: target='Installation'type=env: target='API_KEY'cortex_act_run_asyncRun a shell command as a background job. Returns immediately with job_id. Poll with cortex_check_job. Use for long-running builds, scripts, or any command that may exceed MCP timeout.
cortex_check_jobPoll a background job (from cortex_act_run_async). Returns status (running/done/failed), exit code, duration_secs, and last 20 lines of output (log_tail).
cortex_kill_jobTerminate a background job (SIGTERM). No-op if job already finished.
cortex-act/
โโโ src/
โ โโโ main.rs # MCP stdio server (JSON-RPC 2.0)
โ โโโ act/
โ โโโ mod.rs
โ โโโ editor.rs # AST Semantic Patcher + Tree-sitter validator
โ โโโ auto_healer.rs # LLM-based syntax error repair (10s timeout)
โ โโโ config_patcher.rs # JSON / YAML / TOML dot-path editor
โ โโโ docs_patcher.rs # Markdown section replacer
โ โโโ env_patcher.rs # .env key-value patcher
โ โโโ job_manager.rs # Async background job runner + file logging
Add to your mcp_config.json:
{
"mcpServers": {
"cortex-act": {
"command": "/path/to/cortex-act/target/release/cortex-act",
"args": []
}
}
}
cargo build --release
# Binary: target/release/cortex-act
~/.cortexast/jobs/{job_id}.log to prevent OOM.anyhow::Result error handling.Thanon Aphithanawat โ thanon@aphithanawat.me
MIT ยฉ 2026 Thanon Aphithanawat
8 commits
Rust
66.8%
Python
15.2%
Shell
4.0%
C++
2.7%
Perl
2.4%
Jupyter Notebook
2.4%
CMake
2.0%
TypeScript
1.4%
JavaScript
1.0%
The AI-Native Code Action Backend โ the "hands" of the Cortex ecosystem.
cortex-astsees.cortex-actdoes.
cortex-act is a pure-Rust MCP (Model Context Protocol) server that provides AI coding agents with write, edit, and execute capabilities. It is deliberately scoped to output-only operations to enforce a strict separation of concerns:
| Project | Role | Capability |
|---|---|---|
CortexAST | ๐๏ธ Eyes | Read-only: code analysis, symbol lookup, semantic navigation |
cortex-act | โ Hands | Write/execute: file edits, config patching, shell commands |
CortexSync | ๐ง Brain | Global memory: captures intent/decisions, vectorizes memories |
Together, they form the CortexSync Ecosystem โ a seamless, cross-IDE memory and action layer for AI agents.
[!IMPORTANT] To enable full ecosystem features (like task-end memory capture), ensure
cortex-syncis running globally andCortexASTis installed as your primary MCP server.
cortex_act_edit_astReplace or delete a named symbol (function/class/struct) in any source file. Targets by name, not line number. Auto-heals broken AST via local LLM if validation fails. Use cortexast map_overview to discover symbol names first.
cortex_patch_fileSurgically patch config (JSON/YAML/TOML via dot-path), markdown docs (section heading), or .env (key). Avoids full-file rewrites.
type=config: target='dependencies.serde'type=docs: target='Installation'type=env: target='API_KEY'cortex_act_run_asyncRun a shell command as a background job. Returns immediately with job_id. Poll with cortex_check_job. Use for long-running builds, scripts, or any command that may exceed MCP timeout.
cortex_check_jobPoll a background job (from cortex_act_run_async). Returns status (running/done/failed), exit code, duration_secs, and last 20 lines of output (log_tail).
cortex_kill_jobTerminate a background job (SIGTERM). No-op if job already finished.
cortex-act/
โโโ src/
โ โโโ main.rs # MCP stdio server (JSON-RPC 2.0)
โ โโโ act/
โ โโโ mod.rs
โ โโโ editor.rs # AST Semantic Patcher + Tree-sitter validator
โ โโโ auto_healer.rs # LLM-based syntax error repair (10s timeout)
โ โโโ config_patcher.rs # JSON / YAML / TOML dot-path editor
โ โโโ docs_patcher.rs # Markdown section replacer
โ โโโ env_patcher.rs # .env key-value patcher
โ โโโ job_manager.rs # Async background job runner + file logging
Add to your mcp_config.json:
{
"mcpServers": {
"cortex-act": {
"command": "/path/to/cortex-act/target/release/cortex-act",
"args": []
}
}
}
cargo build --release
# Binary: target/release/cortex-act
~/.cortexast/jobs/{job_id}.log to prevent OOM.anyhow::Result error handling.Thanon Aphithanawat โ thanon@aphithanawat.me
MIT ยฉ 2026 Thanon Aphithanawat
8 commits
Rust
66.8%
Python
15.2%
Shell
4.0%
C++
2.7%
Perl
2.4%
Jupyter Notebook
2.4%
CMake
2.0%
TypeScript
1.4%
JavaScript
1.0%