Skip to content
@pyreon/mcp
tools · AI-assisted development

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
Documentation
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 Lenslive, live·prop, live·attr, static, hoisted inlay hints
for models
llms.txt + llms-full.txtgenerated from 58 package manifests
The Pyreon MCP server catches a destructured-props bug and confirms the fix A real transcript of the Pyreon MCP validate tool: on a todo component it finds 1 issue, props-destructured on line 6, explains that destructuring props captures the values once, shows the current signature and the fix (read props.x directly); after the fix, validate reports no issues found. assistant ↔ pyreon MCP → validate pyreon MCP · Todos.tsx Found 1 issue: 1. props-destructured (line 6) Destructuring props at the component signature captures the values ONCE during setup … Current: { todo, onToggle, onRemove }: { … } Fix: (props: Props) => /* read props.x directly */ Auto-fixable: no → validate pyreon MCP · Todos.tsx (fixed) ✓ No issues found. The code follows Pyreon patterns correctly. real tool output · the server makes no network calls
  • 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 →
why teams pick it

Stop correcting your assistant.

  1. The compiler grades the snippet

    explain_reactivity runs the analysis the JSX transform uses and marks each expression live, baked once, or a footgun such as props-destructured-body.

  2. The API from the source

    get_api answers from each package's manifest: signature, usage and common mistakes. "count.value does not exist. Use count()" comes back with the answer.

  3. React habits caught by code

    validate returns each finding with code, line, the text as written, the fix and an auto-fixable flag. className, useState and .map() in JSX all have codes.

  4. It reads your project

    get_routes, get_components and get_content_collection read your app. get_atlas_catalog, get_api_client and get_dependency_fabric read Atlas, Lathe and Loom output.

the difference

What it writes from memory, and what the server tells it.

from memory

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>
}
validate

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"
all 24 tools

Six jobs your assistant can now do properly.

discover · 5
  • mcp_overview
  • get_api
  • get_pattern
  • get_anti_patterns
  • get_changelog
check code · 4
  • validate
  • explain_reactivity
  • diagnose
  • explain_error
rewrite code · 2
  • migrate_react
  • migrate_pyreon
read your project · 5
  • get_routes
  • get_components
  • get_content_collection
  • get_content_entry
  • get_dependency_fabric
audit · 3
  • audit_test_environment
  • audit_islands
  • get_browser_smoke_status
components and APIs · 5
  • get_atlas_catalog
  • get_atlas_component
  • get_api_client
  • get_api_operation
  • explain_api_diff
beyond the server

Built for machines to read.

Reactivity Lens
in your editor

Inlay hints from pyreon-lint --lsp: live where an expression updates, static where it was read once. Footguns arrive as warnings.

pyreon check
before you commit

The compiler's React-habit and Pyreon-misuse detectors, over the files you changed. Prints each fix, exits 1 on any finding.

llms.txt
for any model

llms.txt and llms-full.txt are generated from every package manifest, and the docs build publishes both at the site root.

create-zero --ai
at scaffold time

--ai mcp,claude,cursor,copilot,agents writes .mcp.json, CLAUDE.md, Cursor rules, Copilot instructions or AGENTS.md.

pyreon context
a project snapshot

Writes .pyreon/context.json: components with their props and signal names, routes and islands.

your own llms.txt
for your docs

@pyreon/zero-content emits dist/llms.txt for your site when you set seo.llms.

try it

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.

ask
the snippet · Counter.tsx
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>
  )
}
assistant ↔ @pyreon/mcp · stdio · pyreon 0.53.0
you › Why doesn't my label update?
→ explain_reactivity({ filename: "Counter.tsx", code })
Reactivity map for Counter.tsx — 2 live · 1 baked-static · 1 footgun
```
1 | import { signal } from '@pyreon/reactivity'
2 |
3 | export function Counter(props: { label: string }) {
4 | const count = signal(0)
5 | const { label } = props
^ ⚠ footgun [props-destructured-body] — Destructuring `props` in the component body captures the values ONCE during setup — the compiler emits signal-driven props as getters, so the destructured locals are dead snapshots that never update when the parent rewrites them. Read `props.x` directly inside the reactive scope (JSX / effect / computed), or use `splitProps(props, ['x', ...])` to carve out a group while preserving reactivity.
6 | return (
7 | <button onClick={() => count.update((n) => n + 1)}>
8 | {count()}
^ ◆ live — live — this text re-renders whenever its signals change
9 | {props.label}
^ ◆ live — live — this text re-renders whenever its signals change
10 | {label}
^ ○ baked once — baked once into the DOM — never re-renders (no signal read here)
11 | </button>
12 | )
13 | }
14 |
```
[3 lines of the result trimmed here]
simulated conversation, real tool output · results recorded over stdio from the repo's @pyreon/mcp, 2026-11-11
what's included

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: true for every entry in full.
  • diagnose and explain_error paste an error message into diagnose for the likely Pyreon cause, the fix and a code sample; explain_error reads a dev error report with its reactive trace.
  • migrate_react a first pass over React code: hooks to signals and effects, className to class, imports swapped, with a list of changes.
  • Your project get_routes, get_components, get_content_collection and get_content_entry read 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.txt with each package's full section.
recipes

Things to build with it.

Connect Claude Code

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"]
    }
  }
}
Start a project that already knows its assistant

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)
Give your own docs an llms.txt

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' },
      },
    }),
  ],
}
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.

discover · 5
  • mcp_overview
  • get_api
  • get_pattern
  • get_anti_patterns
  • get_changelog
check code · 4
  • validate
  • explain_reactivity
  • diagnose
  • explain_error
rewrite code · 2
  • migrate_react
  • migrate_pyreon
read your project · 5
  • get_routes
  • get_components
  • get_content_collection
  • get_content_entry
  • get_dependency_fabric
audit · 3
  • audit_test_environment
  • audit_islands
  • get_browser_smoke_status
components and APIs · 5
  • get_atlas_catalog
  • get_atlas_component
  • get_api_client
  • get_api_operation
  • explain_api_diff
outside the server: @pyreon/compiler/analyze · 3
  • analyzeReactivity
  • formatReactivityLens
  • detectPyreonPatterns
flags: pyreon-lint --lsp · pyreon check --fix · 2
  • --lsp
  • --fix
good to know

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.

questions

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
Read the MCP guide