
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 分