The Web Framework
Built for AI Agents.

MCP DevTools. Structured errors. Runtime guardrails. Your AI writes better code with What Framework.

$ npx create-what my-app Click to copy
Counter.jsx
import { mount, useSignal, useComputed } from 'what-framework'

function Counter() {
  const count = useSignal(0)
  const doubled = useComputed(() => count() * 2)

  return (
    <div>
      <button onClick={() => count.set(c => c + 1)}>
        Count: {count()}
      </button>
      <p>Doubled: {doubled()}</p>
    </div>
  )
}

mount(<Counter />, '#app')
The Problem

Every framework was designed
before AI wrote code.

AI agents generate more frontend code every month. But existing frameworks give them nothing to work with.

Cryptic Errors

Stack traces full of minified internals. "Cannot read property of undefined" with no hint where the signal, effect, or component went wrong. Agents guess, retry, break more things.

No State Inspection

When an agent builds a component, it cannot see signal values, dependency graphs, or effect states at runtime. Debugging is blind.

Silent Failures

Forgot to clean up an effect? Created an infinite reactive loop? Passed wrong props? Other frameworks stay quiet. The bug ships.

APIs Built for Text Editors

Autocomplete, hover docs, and inline hints help humans in IDEs. AI agents need structured, machine-readable contracts they can query programmatically.

The Solution

Built for AI agents
from the ground up.

Every layer of What Framework gives AI agents the context they need to write correct code, catch errors, and ship faster.

MCP DevTools

AI agents inspect every signal, effect, and component in a running app via the Model Context Protocol. Live state, dependency graphs, performance data -- all queryable.

// Agent calls MCP tool:
what_devtools.getSignals()
// Returns:
{ count: { value: 5, subscribers: 2 },
  doubled: { value: 10, type: "computed" } }

Structured Errors

Every error returns JSON with an error code, human message, suggested fix, and code example. Agents parse, understand, and fix errors in a single pass.

{ code: "SIGNAL_READ_OUTSIDE_TRACKING",
  message: "Signal read outside reactive scope",
  fix: "Wrap in useComputed() or useEffect()",
  example: "useComputed(() => count())" }

Agent Guardrails

Runtime catches infinite loops, missing effect cleanup, XSS via innerHTML, and signal misuse before they hit production. The framework protects agents from common mistakes.

// Runtime catches this automatically:
useEffect(() => {
  count.set(count() + 1) // Infinite loop
})
// Error: EFFECT_LOOP_DETECTED

Compiler Intelligence

Write normal JSX. The compiler transforms it into fine-grained reactive DOM operations. No virtual DOM diff. Components run once. Agents write familiar code, the compiler optimizes it.

// You write:
<p>{count()}</p>
// Compiler outputs: direct DOM text node update
// No re-renders. No VDOM. No reconciliation.

Small & Fast

~15 core APIs. 12KB runtime. Zero dependencies. Tree-shakeable. Agents generate less code, ship smaller bundles, and reason about a smaller API surface.

// The full API an agent needs to learn:
import { useSignal, useComputed, useEffect,
  mount, Show, For, createStore } from 'what-framework'
// ~12KB gzipped. That's it.
MCP in Action

Your component code.
What your agent sees.

The left panel is what you write. The right is what an AI agent can query via MCP DevTools at runtime.

TodoApp.jsx
import { useSignal, useComputed, mount } from 'what-framework'

function TodoApp() {
  const todos = useSignal([])
  const filter = useSignal('all')

  const visible = useComputed(() => {
    if (filter() === 'all') return todos()
    const done = filter() === 'done'
    return todos().filter(t => t.done === done)
  })

  const remaining = useComputed(() =>
    todos().filter(t => !t.done).length
  )

  return (
    <main>
      <h1>Todos ({remaining()})</h1>
      <For each={visible()}>
        {todo => <TodoItem item={todo} />}
      </For>
    </main>
  )
}
MCP DevTools Response
// what_devtools.inspectComponent("TodoApp")
{
  "component": "TodoApp",
  "signals": {
    "todos": {
      "value": [
        { "text": "Ship v1", "done": false },
        { "text": "Write tests", "done": true }
      ],
      "subscribers": 2
    },
    "filter": { "value": "all", "subscribers": 1 }
  },
  "computed": {
    "visible": { "value": ["...2 items"], "deps": ["todos", "filter"] },
    "remaining": { "value": 1, "deps": ["todos"] }
  },
  "children": ["TodoItem", "TodoItem"]
}
Getting Started

Set up MCP in two minutes.

Connect your AI agent to a running What app. Works with Claude Code, Cursor, and any MCP-compatible client.

Claude Code

Add the What DevTools MCP server to your Claude Code config.

// .claude/mcp_servers.json
{
  "what-devtools": {
    "command": "npx",
    "args": ["what-devtools", "--mcp"],
    "env": { "PORT": "3001" }
  }
}

Cursor

Add the MCP server to your Cursor workspace settings.

// .cursor/mcp.json
{
  "mcpServers": {
    "what-devtools": {
      "command": "npx",
      "args": ["what-devtools", "--mcp"]
    }
  }
}
Comparison

How What compares.

A factual look at AI-agent capabilities across frameworks.

What React Solid Svelte
MCP DevTools Built in No No No
Structured Errors JSON + fix Stack trace Stack trace Warnings
Runtime Guardrails Loops, XSS, cleanup StrictMode Minimal Minimal
Reactivity Fine-grained signals VDOM diff Fine-grained signals Compiler runes
JSX Yes Yes Yes Custom syntax
SSR / Islands Built in Via Next.js SolidStart SvelteKit
React Library Compat 90+ via what-react Native No No
Runtime Size ~12KB ~44KB ~8KB ~16KB
Ecosystem

Batteries included.
Modular by design.

Every package works standalone. Grab what you need.

By the Numbers

Small framework.
Big capabilities.

~12KB
Gzipped runtime
~15
Core APIs
257
Tests passing
90+
React libs compatible

Let your AI agent build with confidence.

MCP DevTools. Structured errors. Runtime guardrails. One command to start.

$ npx create-what my-app Click to copy