
pracht dev-mcp
io.github.JoviDeCroock由 GitHub 帳號 JoviDeCroock 發布v1.17.0更新於 Oct 26, 2026
Inspect, verify, diff, and scaffold a pracht app's routes, API, and capabilities from its app graph.
概覽
本機 stdio MCP 伺服器,為編碼助理提供 pracht 應用程式工具:檢查應用程式圖、驗證、計畫差異、報告、脚手架與內建文件。
- 可以做什麼
- 檢查解析後的應用程式圖,包括路由、API 端點、能力、代理與建置狀態,並可為工具輸出 JSON。執行驗證與 doctor 檢查,並將應用程式圖與基準 git 參照做差異比對,取得意圖層級的變更記錄。根據計畫差異、驗證結果與用戶端 JS 預算表產生可直接用於 PR 的報告。產生新路由、shell、中介軟體與 API 路由,並更新應用程式清單。讀取內建撰寫指南與隨套件文件,支援離線列出、取得與搜尋。
- 適用情境
- 在開發 pracht 應用程式時使用,讓助理了解路由、API 與能力,檢查專案接線,在提交 PR 前審閱應用程式圖變更,或直接在編輯器中產生新模組。
- 執行需求
- 以本機程序透過 stdio 執行,從 npm 套件 @pracht/cli 安裝,需要 Node.js 與 npm。它作用於 pracht 專案取出目錄。未宣告驗證、環境變數或請求標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 pracht dev-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@pracht/cli
Command-line tool for developing, building, validating, and scaffolding pracht apps.
Install
Commands
pracht dev
Start the local development server with SSR and HMR.
--cache-dir overrides Vite's node_modules/.vite cache. Give concurrent dev
servers separate directories when they run against the same project checkout.
pracht build
Create a production build with client/server output and SSG/ISG prerendering.
--analyze prints, per route (pattern + render mode), the transitive client
chunks it loads with raw and gzip sizes, a total row, and the shared entry
chunks broken out. Output respects NO_COLOR.
When the pracht plugin config declares budgets (e.g.
budgets: { "*": "120kb", "/dashboard": "200kb" }), every build evaluates the
per-route gzip client-JS ceilings, writes dist/server/budget-report.json, and
exits non-zero on exceeded budgets unless --no-budget-fail is passed. See
docs/PERFORMANCE.md.
For Node.js targets, run the built server with:
pracht preview
Serve the production build locally. Runs pracht build first (skip with
--skip-build), then serves the output for the configured adapter:
- Node: runs
dist/server/server.json--port(or$PORT, default 3000). - Cloudflare: delegates to
wrangler devagainst the built worker; requires wrangler innode_modulesor on your PATH plus a wrangler config. - Vercel: there is no faithful local production runtime — the command points
you at
vercel build/vercel devinstead.
pracht verify
Run fast framework-aware verification checks without paying for a full build or
test loop. Use --changed to focus on changed manifest-managed files and
--json for machine-readable output. When dist/server/budget-report.json
exists (written by pracht build when budgets are configured), the last
build's client JS budget results are surfaced as checks.
When the app declares defineApp({ constraints }) or commits a
.pracht/app-graph.json snapshot, verification also resolves the live app
graph, enforces every constraint, and fails if the snapshot is stale (fix with
pracht plan --write).
Use the browser-backed subcommand for routes that expose WebMCP page tools:
It launches an installed Chrome 150+ build with WebMCP testing enabled,
compares the native route-scoped tool registry with the resolved app graph,
and verifies navigation cleanup. Framework-owned pracht_* development tools
are excluded from app-graph parity. Pracht never downloads an unpinned browser;
pass --browser /path/to/chrome in CI. --scenario accepts explicit safe WebMCP
eval files when invocation/cancellation proof should join the report.
pracht eval
Run scripted capability scenarios over HTTP (default), remote MCP
("transport": "mcp"), or native WebMCP ("transport": "webmcp" plus
"webmcpRoute"). A WebMCP step can set cancelAfterMs to prove host
cancellation reaches the dispatch path.
pracht plan
Semantic app-graph diff against a base git ref. Reads the
.pracht/app-graph.json snapshot committed at the base ref (a route-graph
lockfile), resolves the live graph, and prints the routes, API endpoints, and
constraints that were added, removed, or changed — an intent-level changelog
for reviewers. Per-route gzip sizes are annotated when the last build wrote a
budget report.
pracht report
Assemble a PR-ready markdown report from machine truth: the pracht plan
diff, pracht verify results, and the last build's client JS budget table.
Use it as the factual half of a PR description.
pracht llms
Print the embedded pracht authoring guide for coding agents (project layout,
conventions, the verify → plan → report loop). --write saves it as
llms.txt in the app root so agents pick it up automatically.
pracht docs
Read the pracht docs that ship inside this package, so they match the installed
version and work offline. With no topic it lists the pages; a topic prints one
as Markdown (slug#section prints one section); --search finds sections.
The files are also in node_modules/@pracht/cli/docs/.
pracht generate route
Create a new route module. In manifest apps this also updates src/routes.ts.
When the app has a Playwright setup (playwright.config.* or an e2e/
directory), a smoke test is emitted at e2e/<route-id>.spec.ts as well —
--no-test skips it, --test forces it. Generated tests import
@playwright/test; when that dependency is absent, the command prints an
install follow-up (for example, pnpm add -D @playwright/test).
pracht generate shell
Create a shell module and register it in the app manifest.
pracht generate middleware
Create a middleware module and register it in the app manifest.
pracht generate api
Create an API route under src/api/.
pracht inspect
Inspect the resolved app graph. Use --json for agent/tool consumption.
pracht inspect agents summarizes the configured agent surface: Web Bot Auth
policy and keys, the destructive-confirmation mode, the remote MCP endpoint,
whether llms.txt is generated, and which capabilities are exposed on which
transports. The llms.txt state comes from the resolved production server-build
configuration, including build- or production-only options. If an older
installed @pracht/vite-plugin cannot expose that state, JSON reports null and
text reports unknown rather than treating missing metadata as disabled. The
JSON report also includes mcpEndpoint, mcpDestructive, mcpRuntimeStatus,
and mcpUnavailableReasons; text marks declarations mcp(unserved) or
mcp(unverified) when inspection cannot confirm that the tool is reachable.
pracht typegen
Generate src/pracht.d.ts and src/pracht-routes.ts from the resolved
route graph for typed <Link>, route-object useNavigate(), and href()
helpers, plus typed API route registrations for apiFetch(). API modules are
not executed during generation. Use --check in CI to fail when generated
files are stale. After the first generation, pracht dev keeps the default
outputs current; before it, the dev banner prints a one-line setup tip.
pracht doctor
Validate the local app wiring across the whole project. Use --json for
machine-readable output.
pracht dev-mcp
Start a Model Context Protocol server on stdio that exposes inspect, doctor,
verify, plan, report, generate, the authoring guide, and the bundled docs
(get_docs, list_docs, search_docs) as native tools for coding agents. See
docs/MCP.md
for client registration and the tool reference.
來源:packages/cli/README.md,提交 6f1ea74
工具
0版本歷史
3- v1.17.0最新Oct 26, 2026
- v1.16.1Oct 13, 2026
- v1.16.0Oct 12, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分