Get the FREE Ultimate OpenClaw Setup Guide →

cortex-ast

A powerful Model Context Protocol (MCP) server and Omni-AST engine. It empowers AI agents to seamlessly parse complex codebases, execute secure cross-project operations, and dynamically fetch token-optimized rules.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cortex-works-cortex-ast /path/to/cortexast

How to use

CortexAST is a production-grade MCP server that provides AI agents with semantic code navigation, AST-aware time travel, and self-evolving WASM parsers. It offers tools to explore codebases, analyze symbols, manage AST languages, and run diagnostics—all through standardized MCP actions. Typical usage involves running the CortexAST server as an MCP backend and configuring your MCP client to send actions like map_overview, find_usages, save_checkpoint, compare_checkpoint, and language management commands. This server shines when paired with CortexSync-backed workflows for memory retrieval, rules, and cross-project context, enabling robust, AST-aware agent behavior across large codebases.

How to install

Prerequisites:

  • Rust 1.80+ (stable toolchain)
  • Cargo (comes with Rust)
  • Optional: Ollama or LM Studio for Auto-Healer features

Installation steps:

  1. Clone the repository: git clone https://github.com/DevsHero/CortexAST
  2. Build the project in release mode: cd CortexAST cargo build --release
  3. Run the MCP server (stdio):

    From the built binary

    ./target/release/cortexast

Configuration:

  • Use the MCP config example and place it at ~/.cursor/mcp.json or your preferred MCP config location, e.g.:
{
  "mcpServers": {
    "cortexast": {
      "command": "/path/to/cortexast",
      "args": []
    }
  }
}

Notes:

  • Ensure /path/to/cortexast points to the compiled binary and is executable.
  • When running in a container or production environment, you may adapt the command/args to match your deployment method.

Additional notes

Tips and common considerations:

  • CortexAST supports self-evolving WASM language parsers loaded at runtime; ensure your environment allows wasm module downloads if you enable dynamic language support.
  • For cross-project workflows, pair CortexAST with CortexSync to leverage memory retriever, rule fetching, and network discovery commands.
  • If you encounter issues with planning or parsing, consult the Chronos AST snapshot tooling to compare pre/post-change states.
  • The MCP config uses stdio; if you run cortexast as a background service, you may need to adapt the command to launch in the foreground for MCP integration or expose a suitable IPC interface.
  • Prerequisites mention Rust 1.80+; keep your toolchain up to date to ensure compatibility with WASM hot-reload and language support features.

Related MCP Servers

Sponsor this space

Reach thousands of developers