Tsconfig Inheritance Flattener Mcp

io.github.vola-treblaPublished by GitHub account vola-treblav0.2.0Updated Oct 24, 2026

Resolves TypeScript config inheritance chains and returns effective compiler options per file.

VerifiedSTDIODesktop onlyFiles & StorageDeveloper Tools

Overview

AI-generated overview

A local MCP server that resolves TypeScript tsconfig inheritance chains and reports the effective compiler options, path alias targets and project references an

What you can do
Resolve the full extends chain of a tsconfig.json and return the merged compiler options that actually apply, with enums as readable strings and include/exclude patterns shown alongside the inheritance chain. Map a TypeScript path alias to its physical file on disk using the resolved paths and baseUrl, with extension probing and existing candidates listed. Inspect the references array of a root tsconfig and check that each referenced package sets composite: true, flagging missing configs and violations.
When to use it
Useful when an assistant works in a TypeScript project or monorepo whose settings come from extended base configs or node_modules presets, and needs to know which compiler options really apply before suggesting code, explaining type errors, or tracing where an alias points. Also handy for checking project references before a build fails silently.
Requirements
Runs as a local process over stdio, started with npx from the npm package tsconfig-inheritance-flattener-mcp, so Node.js and network access for the package download are needed. No authentication, environment variables or headers are declared. It reads tsconfig files on the local machine, so it is desktop-only.
Before you install
It reads local project configuration files and resolves paths on disk, so it exposes project structure and file locations to the assistant. The tools are described as read-only analysis; no writes, credentials or third-party data transfer are shown.

Installation

In SourceWeft

  1. Open Tsconfig Inheritance Flattener Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

🔍 tsconfig-inheritance-flattener-mcp

[npm] [CI] [License: MIT]

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:

json
{ "extends": "@tsconfig/strictest", "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }

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 target is ES2022, not ES5
  • 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.

Effective TypeScript Configuration  Config:            /project/apps/web/tsconfig.json  Inheritance chain: /project/apps/web/tsconfig.json                     → /project/tsconfig.base.json                     → node_modules/@tsconfig/strictest/tsconfig.json
Compiler Options (merged):  target: "ES2022"  module: "NodeNext"  moduleResolution: "NodeNext"  strict: true  noUncheckedIndexedAccess: true  exactOptionalPropertyTypes: true  baseUrl: "/project"  paths: { "@/*": ["apps/web/src/*"] }

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.

Alias Resolution: @/hooks/useAuth  Config:   /project/apps/web/tsconfig.json  Base URL: /project
Resolved physical paths:  /project/apps/web/src/hooks/useAuth.ts      ✓ exists

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.

Project References Analysis  Config: /project/tsconfig.json  References found: 2
  [✓] packages/shared → /project/packages/shared/tsconfig.json  [✗ NOT FOUND] packages/deprecated → /project/packages/deprecated/tsconfig.json
Violations:  ✗ packages/shared is referenced but does not have composite: true    Fix: add "composite": true to packages/shared/tsconfig.json

🧪 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:

get_effective_compiler_options("/project/apps/web/tsconfig.json")→ strict: true, noUncheckedIndexedAccess: true, target: "ES2022", module: "NodeNext"

Now the agent knows exactly why arr[0] has type string | undefined and not just string. No more wrong suggestions.


⚡ Setup

json
{  "mcpServers": {    "tsconfig-flattener": {      "command": "npx",      "args": ["-y", "tsconfig-inheritance-flattener-mcp"]    }  }}

🚀 Usage

"What compiler options actually apply to /project/apps/web/tsconfig.json? It extends a monorepo base and @tsconfig/strictest."

"Where does @/components/Button resolve to on disk?"

"Are the project references in my root tsconfig valid? Do all referenced packages have composite: true?"

Works great alongside:


📦 Links

License

MIT

Source: README.md at commit 237be2a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts