
Tsconfig Inheritance Flattener Mcp
io.github.vola-trebla由 GitHub 帳號 vola-trebla 發布v0.2.0更新於 Oct 24, 2026
Resolves TypeScript config inheritance chains and returns effective compiler options per file.
概覽
一個本機 MCP 伺服器,解析 TypeScript tsconfig 的繼承鏈,回傳實際生效的編譯選項、路徑別名指向與專案參照檢查結果。
- 可以做什麼
- 解析 tsconfig.json 完整的 extends 鏈,回傳真正生效的合併編譯選項,列舉以可讀字串呈現,並同時顯示繼承鏈與 include/exclude 模式。依解析後的 paths 與 baseUrl,把 TypeScript 路徑別名對應到磁碟上的實際檔案,進行副檔名探測並列出已存在的候選。檢查根 tsconfig 的 references 陣列,驗證每個被參照的套件是否設定 composite: true,並指出缺少的設定與違規項目。
- 適用情境
- 適合助手在 TypeScript 專案或 monorepo 中工作、設定來自被繼承的基礎設定或 node_modules 預設集時,需要先確認哪些編譯選項真正生效,再提出程式碼建議、解釋型別錯誤或追蹤別名指向。也適合在建置無聲失敗前檢查專案參照。
- 執行需求
- 以本機程序透過 stdio 執行,使用 npx 從 npm 套件 tsconfig-inheritance-flattener-mcp 啟動,因此需要 Node.js 以及下載該套件的網路存取。未宣告任何驗證、環境變數或標頭。它會讀取本機上的 tsconfig 檔案,僅限桌面環境。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tsconfig Inheritance Flattener Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
🔍 tsconfig-inheritance-flattener-mcp
Your AI agent reads tsconfig.json. It has no idea what it actually means.
MCP server that resolves the full TypeScript config inheritance chain and returns the effective compiler options that actually apply — including everything inherited from extended base configs, monorepo packages, and node_modules presets.
🤔 The problem
Your agent reads tsconfig.json and sees:
It has no idea that @tsconfig/strictest sets strict: true, noUncheckedIndexedAccess: true, exactOptionalPropertyTypes: true. It doesn't know that baseUrl is defined two levels up in your monorepo base config. So it:
- Suggests code that would fail
noUncheckedIndexedAccess - Gets confused about what
@/resolves to - Doesn't know your
targetisES2022, notES5 - Gives wrong answers about module resolution
The TypeScript compiler API already resolves all of this. This MCP just exposes it.
🛠️ Tools
get_effective_compiler_options
Resolves the full extends chain and returns the merged compiler options that actually apply to a given tsconfig.json. Shows the inheritance chain, all merged options (with enums as readable strings, not magic numbers), and include/exclude patterns.
resolve_module_alias
Maps a TypeScript path alias (e.g. @/hooks/useAuth) to its physical file location on disk, using the resolved paths and baseUrl from the tsconfig. Returns all existing candidates with extension probing.
analyze_project_references
Inspects the references array in a root tsconfig.json and validates that each referenced package has composite: true. Catches broken cross-package dependencies in TypeScript monorepos before they cause silent build failures.
🧪 What it looks like in practice
Agent is helping debug a TypeScript error and asks:
"What compiler options are actually active in this project?"
Without this MCP, the agent guesses based on what it sees in tsconfig.json. With it:
Now the agent knows exactly why arr[0] has type string | undefined and not just string. No more wrong suggestions.
⚡ Setup
🚀 Usage
"What compiler options actually apply to
/project/apps/web/tsconfig.json? It extends a monorepo base and @tsconfig/strictest."
"Where does
@/components/Buttonresolve to on disk?"
"Are the project references in my root tsconfig valid? Do all referenced packages have composite: true?"
Works great alongside:
- ast-impact-mapper-mcp — for code→test correlation
- release-readiness-triage-mcp — for CI triage
📦 Links
- npm: npmjs.com/package/tsconfig-inheritance-flattener-mcp
- GitHub: github.com/vola-trebla/tsconfig-inheritance-flattener-mcp
License
MIT
來源:README.md,提交 237be2a
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分