MCP server giving LLM clients deep static understanding of Dioxus 0.7 projects: route maps, component/server-fn indexes, dead-code detection, prop-drilling reports, signal/props lints, asset audits, and scaffolding helpers.
Strong foundation with 16 well-named, action-verb tools covering static analysis and scaffolding. Most tools have detailed descriptions (100-300 chars) explaining what they detect and when to use them. Input schemas are present with typed parameters. However, output schemas are not documented in the visible code, LLMs cannot see what fields to expect from responses. Error handling guidance is minimal. One write tool (create_server_fn) lacks destructive/idempotent annotations. Parameter descriptions are generally good but some lack format/constraint details (e.g., 'project_root' accepts any string with no validation hints).
Audit assets/: list files under the assets dir(s) not referenced by any `asset!("...")` macro, and `asset!()` references to files that don't exist on disk. Dynamic (non-string-literal) args are counted but skipped.
Audit Cargo.toml + dioxus.toml for misconfigurations (conflicting platform features, fullstack mis-wiring, version mismatches).
Lint Rust file(s)' rsx! blocks for common 0.7 mistakes (missing keys on iterators, parameter-less event handlers, attribute writes that trigger E0034 ambiguity — e.g. `autofocus: true` on `input`/`button`/`textarea`/`select`). The response includes a `checks_run` list naming the lints that fired so a clean `issues: []` is distinguishable from an empty/skipped scan. Pass `file` for a single file (single-file response shape: `file`, `rsx_block_count`, `checks_run`, `issues`). Pass `files: [...]` for batch mode (adds `per_file: [...]`; top-level `issues` is the flat merge with each issue tagged by file).
Scaffold a new server-fn with HTTP method, route path, parameters, extractors, and optional auth prologue. Generates the function body in `src/server/<name>.rs` and updates `src/server/mod.rs` to declare it.
List components defined but never used in any rsx! block. Components reachable from the Routable enum (route targets + layouts) plus `App` are treated as roots.
Output schemas not documented. LLMs cannot see what fields responses contain (e.g., check_rsx returns 'issues' array, but structure of each issue is not specified). This forces LLMs to guess field names and types, increasing errors in downstream reasoning.
create_server_fn (WRITE tool) lacks destructiveHint/idempotentHint annotations. LLMs cannot determine if the tool is safe to retry or if it has side effects. This is critical for write operations.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
Flag pure helper fns whose body is byte-identical across `src/components/` and `src/server/`. Pattern: a generator that hits "this logic needs to run on both sides of a server fn" copy-pastes the helper into both halves of the app instead of lifting it into `src/model/`. The two definitions WILL drift; both call sites end up depending on identical impls until one side patches a bug and the other doesn't.
Flag `Set-Cookie` header values built inside server fns that lack the `Secure` attribute. Scans every string literal in a server-fn body (including `format!(...)` format strings and `HeaderValue::from_static("...")` bare literals) and treats it as a cookie value when it contains at least one recognised cookie attribute (`HttpOnly`, `SameSite=`, `Path=`, `Max-Age=`, etc.).
Flag the hand-rolled "optimistic-lock staleness gate" pattern in a Dioxus component: a `Signal<integer>` that is snapshotted (`let snap = sig();`), bumped (`sig += 1`), and then compared back against the snapshot (`if sig() == snap { … }`) inside an `async` / `spawn` tail to gate reconciliation. The shape is correct but it has recurred verbatim across multiple generated apps — suggests extracting into a Store generation method (e.g. `let rev = store.bump_revision(); … if store.matches(rev) { … }`) so the invariant lives in one place. Confidence: medium — requires all three shapes to co-occur on the same signal in the same write source.
Find props passed unchanged from a parent component into a child (drilling). Matches bare ident and one-level wrappers `.clone()`, `.into()`, `.to_owned()`, `.read()`, `.peek()`, `.cloned()`; each finding tagged with a `via` field.
Lint Props structs: flag `#[derive(Props, ...)]` structs that don't also derive `PartialEq`. Dioxus needs PartialEq on Props for memoization.
Hint when a component hand-rolls a catalog widget. Detects: the HTML5 drag/drop triplet (`ondragstart` + `ondragover` + `ondrop` on the same component, `confidence: high`); the drop-target half alone (`confidence: low`); and bare DOM elements with catalog equivalents (`<select>`, `<dialog>`, `<textarea>`, `<input>`, `confidence: low`). Skips catalog wrapper files (`src/components/<catalog_name>/`). Findings are hints, not errors — the drag/drop catalog widget is single-list, and specialised forms (e.g. `<input type="file">`) have no catalog equivalent, so verify the use case before swapping.
Server-fn call graph: for every #[server] fn, list every call site (caller_file, caller_line, enclosing_fn) and emit an orphan list of server fns nobody calls. Cross-crate callers not detected.
Summarize server-fn call latencies from the dioxus-mcp-probe runtime telemetry log. Reads JSONL events, groups by server-fn name, computes latency percentiles (p50, p95), and reports pending (in-flight) calls. Filters by RFC 3339 timestamp window (default: last 5 minutes).
Flag `std::sync::Mutex` / `RwLock` (and similar sync locks) called from inside `async` server-fn bodies. Currently safe if the critical section stays fully synchronous, but the first `.await` added while holding the guard will block the Tokio worker thread for the duration of that await. Suggests switching to `tokio::sync::Mutex` / `RwLock` (lock-across-await safe) or moving the section into `tokio::task::spawn_blocking`. Calls inside an existing `spawn_blocking { … }` body are silently skipped — that's the recommended escape hatch.
Flag a `Signal<T>` prop passed unchanged through 2 or more parents — the canonical "missing `use_context_provider`" shape that `prop_drill` only sees as a single-level passthrough at each hop. Walks `prop_drill`'s state_passthrough edges, keeps only those where the parent-side prop type is `Signal<T>` / `ReadSignal<T>` / `WriteSignal<T>`, and emits a finding for every two-hop forwarding chain (A → B → C). Returns the full chain, the signal type, and a copy-pasteable `use_context_provider` / `use_context::<…>()` fix snippet. Severity is `warning` — Signals flowing unmodified through multiple hops almost always want a context provider.
Lint signals: flag `use_signal` / `use_memo` / `use_resource` / `use_effect` calls inside `for` / `while` / `loop` bodies in component fns — a new hook is created on every iteration.
Parameter 'project_root' appears in 15 tools with description 'Optional absolute path to the Dioxus project root' but lacks validation hints (e.g., must exist, must be a directory, defaults to cwd). LLMs may pass invalid paths without guidance on what happens.
Error handling descriptions are absent. Tools do not document what errors can occur, when they are retryable, or what the LLM should do next (e.g., 'If project_root is invalid, returns error code 2, verify path exists and is a Dioxus project').
create_server_fn parameters 'args' and 'extractors' are arrays of objects but lack schema details. LLM cannot see the required fields (name, ty) or constraints. Should document: 'Array of {name: string, ty: string} objects; name must be valid Rust identifier, ty must be valid Rust type.'