start_web_appLABSCO SUMMARY
The loop stops when every case passes, not when the average looks good.
The split is the interesting part — no model is called by the server, so your own agent and your own key do the scoring, and the server is just shared state plus a live view. The regression loop's rule that one failing case fails the run is what makes it usable as a guardrail rather than a demo.
What it is
An MCP server you run yourself that owns state for a prompt-tuning session — the system prompt, the test cases, the scored results, the pending suggestions — while the agent in your editor does all the LLM work. A companion web UI shows each iteration's score, the agent's reasoning and the revised system prompt as they land.
What you get
- Session setup —
start_web_appreturns the UI URL,register_api_keyregisters a provider key for test runs,list_modelsandset_test_modelpick the model,delete_sessionclears everything - Workspace state —
get_workspace_state,set_system_prompt,add_test_cases,post_test_result,post_prompt_suggestion,apply_suggestion - Optimization —
start_optimization_sessionfor a single pass that stops for your review,loop_optimizationto iterate until every score clears the threshold - Regression —
run_regression_testsuitefor one scored pass with no prompt changes, andloop_regression, which requires every individual case to pass rather than accepting a good average - Templates —
save_templateandsave_system_prompt_templateput reusable suites and prompts into the UI dropdowns - Archive —
pull_ui_historyfetches session summaries and past regression runs
Requirements
Claude Code, Node.js 18 or later and a local copy of the server: npm install, then npm run dev serves the MCP endpoint at http://localhost:3000/mcp for your .mcp.json. The author's hosted endpoint no longer answers. Provider keys are never stored in the MCP config: export ANTHROPIC_API_KEY, GEMINI_API_KEY or OPENAI_API_KEY into the agent's environment and it registers them per session, with the provider detected from the key prefix. UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN are optional; without them workspaces live in memory and are lost when the server stops. Set PROMPT_LAB_UI_URL to your own Prompt Lab UI (the mcp branch of github.com/jurek-f/prompt-lab, configured to reach this server) so the link start_web_app returns opens your workspace; unset, it links to the author's hosted UI at prompt-lab-mcp.vercel.app. MIT licensed.
Setup effort
Build from source — git clone https://github.com/jurek-f/prompt-lab-mcp.git
USE CASES
Tightening a system prompt against real examples
Add test cases with target answers, run the loop, and watch the score climb per iteration until it clears your threshold.
Checking a prompt edit did not break anything
Run the suite with no prompt changes and read the per-case pass/fail summary before you ship the edit.
Reviewing a proposed rewrite before it takes effect
Let the agent queue a suggestion with its reasoning, read it in the UI, and apply it only when you agree.
19 tools
Listed in project docs. Your client may show a different list.
register_api_keylist_modelsset_test_modeldelete_sessionsave_templatesave_system_prompt_templateget_workspace_stateset_system_promptadd_test_casespost_test_resultpost_prompt_suggestionapply_suggestionget_regression_statusstart_optimization_sessionloop_optimizationrun_regression_testsuiteloop_regressionpull_ui_historyBEFORE YOU INSTALL
What to know first
Tools you get
19 tools named in the project's documentation.
Requires
- Node.js 18 or later
- One provider API key in Claude Code's environment — any one of ANTHROPIC_API_KEY, GEMINI_API_KEY or OPENAI_API_KEY
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/jurek-f/prompt-lab-mcp.git
cd prompt-lab-mcp
npm install
npm run devMCP Clients
Claude Code
{
"mcpServers": {
"prompt-lab": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}The configuration on this page sets no provider key, by design: the project keeps keys out of the MCP config. Put one of ANTHROPIC_API_KEY, GEMINI_API_KEY or OPENAI_API_KEY in Claude Code's environment (your shell profile or ~/.claude/env), and the agent registers it with register_api_key each session.