aft
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aft find where authenticateUser is defined and show its callers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
aft-mcp
把 AFT(cortexkit)的唯讀工具包成 MCP server,供 Codex 等 MCP host 使用。
AFT 本身只支援 OpenCode/Pi/omp 這幾種 host,沒有 MCP server;但它接受
harness: "mcp:<client>" 的 configure,且 binary 以 NDJSON 溝通,因此這個
介面層直接驅動 aft.exe。
需求
Node.js 18+
AFT 已安裝(
%LOCALAPPDATA%\aft\bin\v*\aft.exe,或設定AFT_BINARY)
Related MCP server: Codebase Copilot MCP Server
啟動
node H:\aft-mcp\src\index.mjs環境變數:
變數 | 說明 |
| 指定 |
| 預設專案根目錄(否則用 process cwd) |
| harness 名稱,預設 |
註冊到 Codex
codex mcp add aft -- node H:\aft-mcp\src\index.mjs預設不啟用;要啟用時把 ~/.codex/config.toml 的 [mcp_servers.aft] 改成
enabled = true,或直接移除 enabled = false 那一行。
Codex 的 MCP 程序 cwd 不一定是 session 的專案目錄,因此提供
aft_use_project 工具:
aft_use_project { "root": "C:\\path\\to\\repo" }之後同一個 MCP 程序都用這個根目錄(變更時會重新 configure)。
工具(全部唯讀)
工具 | AFT 指令 | 說明 |
|
| 索引式 regex 搜尋,支援 |
|
| glob 檔名搜尋 |
|
| 語意搜尋(需要 semantic index) |
|
| 檔案/目錄結構大綱 |
|
| 指定 symbol 的內容與位置 |
|
| 診斷、TODO、metrics、dead code 等 |
|
|
|
|
| 合併衝突掃描 |
|
| 索引/bridge 狀態 |
| — | 設定專案根目錄 |
已知限制
AFT 的 bridge 協定不是公開 API;升級 AFT 後請重跑測試(
node啟動後看 tool 結果)。首次呼叫會觸發索引建置(grep 數秒;callgraph/semantic 可能更久), 回應會帶
index_building/callgraph_building,重試即可。PowerShell 檔案不支援 outline(AFT 回
unsupported file extension: ps1)。semantic search 需要 ONNX Runtime;inspect 的 LSP 診斷需要對應語言伺服器。
Available Tools
10 toolsaft_callgraphC
AFT call graph (read-only). Ops: callers, call_tree, impact, trace_to, trace_to_symbol, trace_data.
Inputs: op (required), symbol (required), filePath (required), depth, +5 more.
aft_conflictsB
AFT merge-conflict scan (read-only). Lists conflicted files/regions for a repo or worktree.
Inputs: path.
aft_globC
AFT indexed glob (read-only). List files matching a glob pattern.
Inputs: pattern (required), path.
aft_grepC
AFT indexed grep (read-only). Regex search with file paths and line numbers; paginate with offset.
Inputs: pattern (required), path, offset, include.
aft_inspectC
AFT codebase inspection (read-only). Diagnostics, TODOs, metrics, dead code, unused exports, duplicates.
Inputs: topK, scope, offset, sections.
aft_outlineB
AFT structural outline (read-only). Symbols/headings with line ranges; pass files=true for a directory tree.
Inputs: target (required), files, includeTests.
aft_searchB
AFT semantic search (read-only). Requires the semantic index; returns ranked code fragments.
Inputs: topK, query, offset, pattern, +1 more.
aft_statusA
AFT bridge/index status (read-only). Useful when a tool reports an index is building.
Inputs: no named parameters.
aft_use_projectB
Set the AFT project root for this session (configures the aft bridge).
Inputs: root (required).
aft_zoomC
AFT symbol zoom (read-only). Pass batch: [{ target, symbols }] to read specific symbols/sections.
Inputs: batch (required), callgraph, contextLines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
The tools mostly separate cleanly into regex search, globbing, semantic search, structural outlining, symbol reading, inspection, call graph, session setup, status, and conflict scanning. Minor potential overlap exists between aft_glob and aft_outline with files=true, and between aft_grep and aft_search, but descriptions provide enough distinction.
All tools share the aft_ prefix and snake_case style, which is highly predictable. However, the operation names mix verbs and nouns (e.g., aft_zoom, aft_inspect vs. aft_outline, aft_status), so it is not a pure verb_noun pattern throughout.
Ten tools is well-scoped for a codebase search and analysis server. Each tool covers a distinct capability area without excessive fragmentation.
The surface covers code discovery, search, structural navigation, diagnostics, call graph analysis, project configuration, status, and merge conflicts. Minor gaps remain, such as arbitrary file content reading and explicit index refresh, but most read-only codebase workflows are supported.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Search, inspect and invoke every public tool on Invokera through one MCP connection.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI coding agents to efficiently explore codebases by providing structural outlines, module digests, symbol bodies, and AST-aware grep via MCP.414 npm1MIT
- FlicenseNot gradedqualityDmaintenanceExposes code search and file reading tools over the Model Context Protocol, enabling any MCP-compatible client to query a codebase with natural language.-
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT Web or another MCP client to inspect and develop a local workspace, read local Codex task history, and use the complete installed XcodeBuildMCP catalog through a small set of stable tools.MIT
- AlicenseNot gradedqualityBmaintenanceProvides local, read-only MCP tools that expose a specified workspace's directory listing, file contents, text search, git status, and git diff to AI clients.2Apache 2.0