Whytype
FreeNot checkedGive coding agents the TypeScript compiler's actual reasoning — MCP server + CLI that turn type errors into because-chains pointing at the declaration to fix
About
Give coding agents the TypeScript compiler's actual reasoning — MCP server + CLI that turn type errors into because-chains pointing at the declaration to fix
README
The compiler, explaining itself. An agent debugging TypeScript sees what
tsc prints: the flattened summary of a forty-line elaboration. The actual
cause — a declaration three levels down the reasoning, often in another file —
never reaches the context window, so the agent guesses: a cast, an any,
another wasted edit–compile–fail loop. WhyType extracts the compiler's own
reasoning — because-chains, inference bindings, conditional-type verdicts —
and hands it to whoever is debugging, agent or human:
npm i -D whytype && npx whytype init # MCP server registered; agents stop guessing
Playground: whytype.dev · Docs: whytype.dev/docs · npm: whytype
Parts
whytypeon npm (core/) — MCP server for agents (npx whytype mcp: whytype_diagnostics / whytype_explain / whytype_snippet), one-command setup (npx whytype init,--hooksfor a Claude Code PostToolUse check), CLI (npx whytype file:line:col,whytype check), and the extraction engine as a library.- Playground — whytype.dev: click an error, read
the reasoning; a gallery of the greatest hits of TS confusion (
examplesbutton). Runs entirely client-side — the compiler lives in a web worker, nothing leaves the tab; sharing is a compressed#code/...URL. - VS Code extension (
extension/) — renders the same because-chain for your own project's tsserver diagnostics via a "Why?" quick fix.
Architecture
engine/— the extraction engine, worker-hosted. TS 6 (the last JS-based compiler, aliased astypescript-strada) is the data source until the tsgo stable API lands in TS 7.1; every internal-API touch is quarantined inengine/adapter.ts, the single seam for that port.- Conditional-type verdicts are never approximated: the engine synthesizes
probe aliases (
type __WT_P0 = [check] extends [target] ? ... : ...) into one extra program and reads back what the checker actually decided. src/— Vite + React + Monaco playground UI.spike/— Phase 0 feasibility spike and the Node test harness.
Develop
npm install # also copies TS lib files into engine/libs/
npm run dev # playground on http://localhost:5173
npm test # engine test harness (tsx spike/test-engine.ts)
npm run build # production build to dist/
Privacy
Your code never leaves the tab — analysis is 100% in-browser, there is no backend. The hosted playground page loads self-hosted Plausible page analytics (cookieless, counts visits only; it sees URLs, never editor content). Share links encode code into the URL fragment — fragments are never transmitted to servers; the recipient's browser decompresses the code locally.
License
MIT © Eldora Studio
Installing Whytype
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/zeelib1/whytypeFAQ
Is Whytype MCP free?
Yes, Whytype MCP is free — one-click install via Unyly at no cost.
Does Whytype need an API key?
No, Whytype runs without API keys or environment variables.
Is Whytype hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Whytype in Claude Desktop, Claude Code or Cursor?
Open Whytype on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectAmap Maps Mcp Server
MCP server for using the AMap Maps API
by duxiaohuiSupabase
Database, auth and storage
by SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
Time
Time and timezone conversion capabilities.
Compare Whytype with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
