Your assistant learned React. This teaches it Pyreon.
An MCP server gives Claude Code, Cursor, Windsurf or any MCP client 24 tools: the real API from each package's manifest, the compiler's verdict on a snippet, and your own routes and components. In the editor, the Reactivity Lens marks each JSX expression live or static while you type.
bun add -D @pyreon/mcp - tools
- 24counted from the server's own
tools/list - checks
- 45 detector codes19 React habits · 24 Pyreon mistakes · 2 native hazards
- in the editor
- Reactivity Lens
live,live·prop,live·attr,static,hoistedinlay hints - for models
llms.txt+llms-full.txtgenerated from 58 package manifests
- 24 tools your assistant can call: lookup, validation, rewrites, project reading and audits.tools/list over stdio from packages/tools/mcp/lib/index.js, 11 Nov 2026 (scratch mcp-client.mjs)
- 42 detector codes behind
validate: React habits, Pyreon misuse and native-build hazards, each with a fix.Codes that a detector emits: ReactDiagnosticCode in packages/core/compiler/src/react-intercept.ts:32 (19, all emitted; #4476 removed the five declared-only codes), PyreonDiagnosticCode (23, all emitted; props-early-return-conditional and props-object-copy added for #4254) in pyreon-intercept.ts:133, NativeFindingCode (2) in packages/native/compiler/src/native-audit.ts:41 via packages/tools/mcp/src/native-detect.ts - 620 known mistakes in the anti-pattern catalog on main, served as a compact index your assistant pages through.get_anti_patterns({}) index header "620 total"; the number is the count of
- **entries in .agents/rules/anti-patterns.md, computed at build time (docs/src/site/derived.ts)
synthetic · author-run · M3 Max · record of 2026-11-05
Every result, including where we lose →Stop correcting your assistant.
The compiler grades the snippet
explain_reactivityruns the analysis the JSX transform uses and marks each expression live, baked once, or a footgun such asprops-destructured-body.The API from the source
get_apianswers from each package's manifest: signature, usage and common mistakes. "count.valuedoes not exist. Usecount()" comes back with the answer.React habits caught by code
validatereturns each finding with code, line, the text as written, the fix and an auto-fixable flag.className,useStateand.map()in JSX all have codes.It reads your project
get_routes,get_componentsandget_content_collectionread your app.get_atlas_catalog,get_api_clientandget_dependency_fabricread Atlas, Lathe and Loom output.
What it writes from memory, and what the server tells it.
Plausible, idiomatic, and React. It fails in a Pyreon app before it renders.
import { useState, useEffect } from 'react'
export function Counter({ start }: { start: number }) {
const [count, setCount] = useState(start)
useEffect(() => { document.title = String(count) }, [count])
return <button className="btn" onClick={() => setCount(count + 1)}>{count}</button>
}Real output, trimmed. The assistant gets a line number and a fix for each habit, before you see the code.
validate(Counter.tsx) → Found 5 issues:
1. react-import (line 1) Auto-fixable: yes
Fix: import { ... } from "@pyreon/core"
2. props-destructured (line 3) Auto-fixable: no
Fix: (props: Props) => /* read props.x directly */
3. use-state (line 4) Auto-fixable: yes
Fix: count = signal(start)
4. use-effect-deps (line 5) Auto-fixable: yes
Fix: effect(() => { /* reads are auto-tracked */ })
5. class-name-prop (line 6) Auto-fixable: yes
Fix: class="btn"Six jobs your assistant can now do properly.
- mcp_overview
- get_api
- get_pattern
- get_anti_patterns
- get_changelog
- validate
- explain_reactivity
- diagnose
- explain_error
- migrate_react
- migrate_pyreon
- get_routes
- get_components
- get_content_collection
- get_content_entry
- get_dependency_fabric
- audit_test_environment
- audit_islands
- get_browser_smoke_status
- get_atlas_catalog
- get_atlas_component
- get_api_client
- get_api_operation
- explain_api_diff
Built for machines to read.
Inlay hints from pyreon-lint --lsp: live where an expression updates, static where it was read once. Footguns arrive as warnings.
The compiler's React-habit and Pyreon-misuse detectors, over the files you changed. Prints each fix, exits 1 on any finding.
llms.txt and llms-full.txt are generated from every package manifest, and the docs build publishes both at the site root.
--ai mcp,claude,cursor,copilot,agents writes .mcp.json, CLAUDE.md, Cursor rules, Copilot instructions or AGENTS.md.
Writes .pyreon/context.json: components with their props and signal names, routes and islands.
@pyreon/zero-content emits dist/llms.txt for your site when you set seo.llms.
Watch the tools answer.
Pick a question. Each answer is real output from the server on this snippet, recorded over stdio and trimmed to fit.
import { signal } from '@pyreon/reactivity'
export function Counter(props: { label: string }) {
const count = signal(0)
const { label } = props
return (
<button onClick={() => count.update((n) => n + 1)}>
{count()}
{props.label}
{label}
</button>
)
}
What's in the server, and around it.
- validate React-habit, Pyreon-misuse and native-hazard detectors in one call, sorted by line. It says when the native checks were skipped.
- explain_reactivity a line-numbered map:
◆ live,○ baked once,⚠ footgun, with a count of each. - get_api signature, usage and common mistakes for each export the package manifests document.
- get_anti_patterns a paged index of the whole catalog (620 entries in the catalog); ask by name or category, or pass
full: truefor every entry in full. - diagnose and explain_error paste an error message into
diagnosefor the likely Pyreon cause, the fix and a code sample;explain_errorreads a dev error report with its reactive trace. - migrate_react a first pass over React code: hooks to signals and effects,
classNametoclass, imports swapped, with a list of changes. - Your project
get_routes,get_components,get_content_collectionandget_content_entryread the app you are working in. - Atlas, Lathe and Loom verified component catalog, generated API client and operations, API diffs, and dependency health.
- Reactivity Lens the compiler's live-or-static verdict as inlay hints in any LSP editor.
- llms.txt a model-sized index of the framework's packages, plus
llms-full.txtwith each package's full section.
Things to build with it.
Put this in .mcp.json at the project root. Cursor reads the same shape from .cursor/mcp.json, and Windsurf takes the same mcpServers block in its MCP config. pyreon mcp starts the same server from the CLI.
{
"mcpServers": {
"pyreon": {
"command": "bunx",
"args": ["@pyreon/mcp"]
}
}
}The scaffolder writes the AI files for the tools you name. Leave --ai out and it preselects .mcp.json and CLAUDE.md (the default with --yes).
npm create @pyreon/zero@latest my-app -- --ai mcp,claude,cursor --yes
# .mcp.json (the server above)
# CLAUDE.md (Pyreon rules for Claude Code)
# .cursor/rules/pyreon.md (the same for Cursor)Building docs with @pyreon/zero-content? Turn on seo.llms next to seo.baseUrl and the build writes dist/llms.txt, with one line per page.
// vite.config.ts
import content from '@pyreon/zero-content/plugin'
export default {
plugins: [
content({
seo: {
baseUrl: 'https://docs.example.com',
sitemap: true,
llms: { title: 'Example', description: 'Docs for the Example API' },
},
}),
],
}24 tools, and the pieces around them.
Every export has a reference page with its signature, an example and the mistakes people make with it.
- mcp_overview
- get_api
- get_pattern
- get_anti_patterns
- get_changelog
- validate
- explain_reactivity
- diagnose
- explain_error
- migrate_react
- migrate_pyreon
- get_routes
- get_components
- get_content_collection
- get_content_entry
- get_dependency_fabric
- audit_test_environment
- audit_islands
- get_browser_smoke_status
- get_atlas_catalog
- get_atlas_component
- get_api_client
- get_api_operation
- explain_api_diff
- analyzeReactivity
- formatReactivityLens
- detectPyreonPatterns
- --lsp
- --fix
Good to know before you start.
It needs an MCP client
Claude Code, Cursor, Windsurf and other MCP clients call the tools. A plain chat window cannot; give it llms.txt instead.
Tools are listed lean
tools/list carries names and parameter schemas without prose, so every session starts small (about 8 KB). If your assistant picks the wrong tool, ask it to call mcp_overview first.
migrate_react is a first pass
It turns useState into signal() but leaves setter calls like setCount(n) and plain reads like count as written, so its output does not run as is. Rewrite them as count.set(n) and count(), then type-check before you commit.
Native checks are optional
The two native-hazard codes, for the experimental iOS and Android targets, need @pyreon/native-compiler installed. Without it, validate still runs the other 39 codes, and on a snippet that imports @pyreon/primitives it says the native checks were skipped.
The Lens is structural
It tells you whether an expression will update. To see how often it did, use Live Program Inlay Hints, served by the same LSP.
What people ask first.
Does my code leave my machine?
Not through this server. It runs locally over stdio and makes no network calls; tools read the snippet your assistant passes and the files in your project. Your assistant's own model provider is a separate question.
How much of my context window does it use?
The tool list is about 8 KB of JSON. get_anti_patterns returns a compact index (its first page is about 35 KB of text); the full catalog, over 300 KB, comes back only when the assistant asks with full: true.
Is the Lens a guess?
No. analyzeReactivity runs the reactive-or-static analysis the JSX transform uses to decide what to bind, and both compiler backends (Rust and JS) emit the same span data. explain_reactivity gives your assistant the same verdicts.
Which editors show the Lens?
Any editor that speaks LSP inlay hints: register pyreon-lint --lsp for .ts, .tsx, .js and .jsx. For VS Code, symlink the extension from the Pyreon repo's packages/tools/lint/vscode.
My assistant does not speak MCP. Now what?
Hand it llms.txt (a short index) or llms-full.txt (every package's section). Both are generated from the same manifests as get_api. create-zero --ai copilot writes .github/copilot-instructions.md.
It still will not write your tests. It will stop writing useState.
bun add -D @pyreon/mcp