pracht dev-mcp

Gives a coding agent the resolved route, API and capability graph of a pracht app, plus scaffolding

Official · Jovi De Croock JavaScript Local · stdio Developer tools

55 popularity score ★ 106 ↓ 838/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add pracht-dev -- npx -y -p @pracht/cli pracht dev-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "pracht-dev": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@pracht/cli",
        "pracht",
        "dev-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "pracht-dev": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@pracht/cli",
        "pracht",
        "dev-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "pracht-dev": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@pracht/cli",
        "pracht",
        "dev-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.pracht-dev]
command = "npx"
args = ["-y", "-p", "@pracht/cli", "pracht", "dev-mcp"]
Gemini CLITerminal
gemini mcp add --scope user pracht-dev npx -- -y -p @pracht/cli pracht dev-mcp

What it does

pracht is a Preact and Vite web framework, and pracht dev-mcp is the development-time MCP server built into its command-line package, @pracht/cli. Instead of having a coding agent read through src/ and guess how the app is wired, it hands the agent the app graph that pracht itself resolves: routes with their render modes, shells and middleware, API endpoints, agent capabilities and build output. Each tool returns the same JSON as the matching pracht CLI command.

Beyond inspection, the server runs pracht's checks (doctor, verify, typegen), produces the app-graph diff against a git base (origin/main by default) and a PR-ready markdown report, runs eval scenarios against an app you have already started, and scaffolds routes, shells, middleware, API routes and capabilities as files in the project. It also serves the framework's authoring guide and the docs pages bundled with the installed CLI version, so the guidance matches the app's pracht version.

The coding-agents docs page lists 17 tools; the tool registration file for version 1.16.1 (src/mcp-server.ts) registers 19, adding list_docs and search_docs. search_docs returns 10 sections by default and up to 50 with limit. The older command name pracht mcp still works but is marked deprecated in favour of pracht dev-mcp.

What it needs

RuntimeNode.js

Node.js with npx, and a pracht app with @pracht/cli installed as a dependency. Its docs register it as npx --no-install pracht dev-mcp, which uses the app's own copy of the CLI and fetches nothing; the snippet here names the package so it also runs where that copy is missing. Start it from the app root, or pass cwd (an absolute path) to each tool. inspect_build needs a prior pracht build; eval needs the app already running at a URL you give it.

Limits

Works only on pracht apps; it has no use in other projects. It is a stdio server for local development and is not shipped in a deployed app. eval does not start the app for you, and inspect_build has nothing to show before a build. A failed call (missing manifest, unknown shell, refusing to overwrite a file) comes back as an MCP error and the server keeps running. The docs page lists 17 tools and leaves out list_docs and search_docs, which the 1.16.1 source registers.

Who it suits

Developers building a pracht app with Claude Code, Cursor or another local MCP client who want the agent to read the real route and capability graph, check its changes with verify and plan, and scaffold new routes in the framework's conventions. It is published by the framework's own maker. It writes files when scaffolding, refreshing the graph snapshot or regenerating types, so it suits agents allowed to edit the project. For any non-pracht codebase it offers nothing; the same commands are also usable from the pracht CLI or its agent skills without MCP.

Tools 19

inspect_routes
Returns the app's resolved routes as JSON, same as pracht inspect routes.
inspect_api
Returns the app's API endpoints as JSON.
inspect_capabilities
Returns the app's declared agent capabilities as JSON.
inspect_agents
Returns the app's agent-facing surface as JSON.
inspect_build
Returns details of the last build output; needs a prior pracht build.
doctor
Runs wiring diagnostics and reports a status per check.
verify
Checks constraints and whether the committed graph snapshot is current.
plan
Diffs the app graph against a git base; with write it refreshes the snapshot.
report
Produces a markdown summary of graph changes for a pull request.
typegen
Regenerates typed routes and capability types, or only reports staleness with check.
eval
Runs eval scenario files against an app you already started at a given URL.
get_docs
Returns the authoring guide, or one bundled docs page or section by topic.
list_docs
Lists the docs pages bundled with the installed CLI.
search_docs
Keyword search over the bundled docs, 10 results by default.
generate_route
Scaffolds a new route file and registers it.
generate_shell
Scaffolds a new shell (layout).
generate_middleware
Scaffolds a new middleware file.
generate_api
Scaffolds an API route with typed HTTP method handlers.
generate_capability
Scaffolds an agent capability with its effect and exposure.

Similar servers