pracht dev-mcp
OFFICIAL SERVERGives a coding agent the resolved route, API and capability graph of a pracht app, plus scaffolding
Inspect, replay and drive a running Foldkit app's Model and Message history from an AI agent
Official · Foldkit TypeScript Local · stdio Developer tools
88 popularity score ★ 1.2k ↓ 23k/wk
Opens the app, which asks before it adds the server.
claude mcp add foldkit-devtools -- npx -y @foldkit/devtools-mcp{
"mcpServers": {
"foldkit-devtools": {
"command": "npx",
"args": [
"-y",
"@foldkit/devtools-mcp"
]
}
}
}{
"mcpServers": {
"foldkit-devtools": {
"command": "npx",
"args": [
"-y",
"@foldkit/devtools-mcp"
]
}
}
}{
"servers": {
"foldkit-devtools": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@foldkit/devtools-mcp"
]
}
}
}[mcp_servers.foldkit-devtools]
command = "npx"
args = ["-y", "@foldkit/devtools-mcp"]gemini mcp add --scope user foldkit-devtools npx -- -y @foldkit/devtools-mcpFOLDKIT_PROJECT_ROOT |
Optional: Project directory to look for a relay in; defaults to the working directory. |
|---|---|
FOLDKIT_DEVTOOLS_MCP_PORT |
Optional: Skips discovery and connects to this port; must match devToolsMcpPort in the Vite config. Needed on Windows. Without it the server tries 9988 when discovery finds nothing. |
FOLDKIT_DEVTOOLS_MCP_HOST |
Optional: Overrides the hostname of the discovered relay or configured port. |
FOLDKIT_DEVTOOLS_RELAY_DIRECTORY |
Optional: Registry directory; defaults to one under XDG_RUNTIME_DIR or the OS temp directory. Set it in both processes if they run in different sandboxes. |
Foldkit DevTools MCP (@foldkit/devtools-mcp) is the Foldkit project's own server for debugging Foldkit applications while they run in development. Foldkit apps hold their state in a single Model that changes only through Messages; this server gives an agent the same view of that state that the in-browser DevTools panel gives a person.
Through it an agent can read the current Model or the Model after any retained history entry, narrow a read to one path, list and count Messages by tag or by the Model paths they changed, diff two past Models, read what init produced, and step the app back to an earlier state and then resume. If the app passes its Message Schema to the DevTools config, the agent can also look up that Schema and dispatch Messages, one at a time or in batches of 1 to 100, each decoded against the Schema before it reaches update.
It works in three parts: a browser bridge inside the app, a relay served by the Foldkit Vite plugin on the dev server, and this Node process, which the agent starts over stdio. The server finds the relay for its project directory through a per-user registry and a random token, and reconnects if the dev server restarts. In the source (src/tools.ts), foldkit_list_messages returns 50 entries by default and accepts a limit of up to 500.
| Runtime | Node.js 18+ |
|---|
Node.js 18 or later and npx. A Foldkit application (peer dependencies foldkit 0.165.0 or later and effect 4.0.0) built with the @foldkit/vite-plugin, its Vite dev server running, and the app open in a browser tab. DevTools must stay enabled (the default in development). Dispatch needs the app's Message Schema passed in its DevTools config. On Windows, a fixed devToolsMcpPort in vite.config.ts and the same value in FOLDKIT_DEVTOOLS_MCP_PORT.
Works only with Foldkit applications, and only in development: production builds leave out the relay and the browser bridge. It sees a Runtime only while the app is open in a browser tab. Without the Message Schema in the DevTools config, both dispatch tools reject every request; inspection and replay still work. Batch dispatch takes 1 to 100 Messages and other Messages can land between them. foldkit_list_messages returns 50 entries by default, at most 500. On Windows automatic discovery is unavailable and a fixed port must be set. When several relays match the project, the most recently started one is used unless runtime_id or settings pick another.
Suits developers building a Foldkit app who want an agent to check what the app is actually doing (state, Message history, Commands and Mounts) rather than guess from the code, and to reproduce a bug by replaying or dispatching Messages. It is published by the Foldkit project and runs locally with no account. It is no use for apps built on other frameworks, nor for production debugging. For writing Foldkit code itself, the project points to its skills and vendored source as the companion references.
foldkit_list_runtimesfoldkit_get_modelfoldkit_get_model_atfoldkit_get_initfoldkit_get_runtime_statefoldkit_list_messagesfoldkit_count_messages_by_tagfoldkit_diff_modelsfoldkit_get_messagefoldkit_list_keyframesfoldkit_replay_to_keyframefoldkit_resumefoldkit_get_message_schemafoldkit_dispatch_messagefoldkit_dispatch_messages