Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
Polyglot MCP test generation with 8-section contract enforcement across Python, TS, Java, Go, C++.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"universal-test-framework": {
"command": "uvx",
"args": [
"universal-test-framework",
"--transport",
"stdio"
]
}
}
}在终端中运行这条命令
claude mcp add universal-test-framework -- uvx universal-test-framework --transport stdio粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"universal-test-framework": {
"command": "uvx",
"args": [
"universal-test-framework",
"--transport",
"stdio"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"universal-test-framework": {
"type": "stdio",
"command": "uvx",
"args": [
"universal-test-framework",
"--transport",
"stdio"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 phoenice-labs 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(1.0.2)于7个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Spec Driven Development, Remote Desktop Commander, topo^alpin
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Avalanche bulletins and mountain weather forecasts for any place in the Alps.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Contract-driven test enforcement and reporting for LLM-generated code — via MCP, VS Code, Copilot CLI, Claude, Cursor, or Python SDK.
UTF is an MCP server and contract enforcement engine. It does not replace your AI coding assistant — it gives every test your AI writes a mandatory quality gate, a structured audit trail, and a comprehensive compliance report.
AI tools — GitHub Copilot, Claude, Cursor, Gemini — generate tests fast. The problem: fast ≠ trustworthy.
| Without UTF | With UTF |
|---|---|
| Tests exist but nobody knows *why* | Every test is linked to a requirement |
| "Covers everything" — nobody can prove it | Traceability matrix maps REQ → test |
| CI passes; real behavior untested | Gap analysis flags what is NOT covered |
LLM wrote a test that asserts True | Meaningfulness check rejects trivial assertions |
| No history of what was tested | Persistent registry survives session restarts |
| Report shows pass/fail counts only | 8-section per-test detail cards in HTML report |
You may already use markdown files (AGENTS.md, copilot-instructions.md, .cursorrules) to guide your AI. UTF is complementary — not competing:
| Markdown instructions | UTF |
|---|---|
| Describe *how* to write tests | Enforce a contract on *every* test produced |
| Rely on LLM to follow instructions | Block tests that fail the contract at generation time |
| No verification after generation | Score each test 0–1 against 8 measurable criteria |
| No persistent state between sessions | SQLite registry persists all tests and results |
| No compliance report | HTML report with per-test 8-section detail cards |
Use markdown instructions to *shape* how your AI thinks. Use UTF to *verify* and *report on* what it produced.
TC-{PRJ}-{MODULE}-{NNN} and classic TC-{MODULE}-{NNN} both accepteduvx (zero-clone), local clone, Docker, GitHub MCP Registry, pip SDK.utf/rules/ override global defaults| # | Method | How Started | Registry Location | @utf Slash Cmds | Best For |
|---|---|---|---|---|---|
| 1 | uvx (zero-install) | mcp.json + uvx | /.utf/utf.db | ❌ use natural language | Any developer with uv |
| 2 | Local Clone | install-vscode-mcp.ps1 | /.utf/utf.db | ✅ with extension | Contributing / customizing UTF |
| 3 | Docker / HTTP | docker compose up | Named volume or bind mount | ❌ use natural language | Team / remote / CI |
| 4 | GitHub MCP Registry | Auto via client | /.utf/utf.db | ❌ use natural language | Discoverable via MCP marketplace |
| 5 | pip + SDK | Python import | Caller controls cwd | N/A | CI scripts / programmatic |
All methods (1, 2, 4) using stdio transport write the registry to `${workspaceFolder}/.utf/utf.db` — isolated per project and persistent across sessions.
Requires uv. No cloning, no venv.
Add to %APPDATA%\Code\User\mcp.json (Windows) or ~/.config/Code/User/mcp.json (macOS/Linux):
{
"servers": { "utf": { "type": "stdio", "command": "uvx", "args": ["--from", "universal-test-framework", "utf-server", "--transport", "stdio"], "cwd": "${workspaceFolder}", "env": { "UTF_PROJECT_DIR": "${workspaceFolder}" } } } }
Registry:
.utf/utf.dbinside${workspaceFolder}— isolated per project, persistent across sessions.
Reload VS Code after editing
mcp.json.
git clone https://github.com/phoenice-labs/Universal-Test-Framework
cd Universal-Test-Framework
.\scripts\install-vscode-mcp.ps1
.\scripts\install-vscode-mcp.ps1 -InitProject -ProjectDir C:\my-project
Reload VS Code → open Copilot Chat → ask naturally: generate e2e tests for my backend.
The install script writes this entry to mcp.json:
{
"utf": { "type": "stdio", "command": " ", "args": ["-m", "mcp_server.server", "--transport", "stdio"], "cwd": "${workspaceFolder}", "env": { "PYTHONPATH": " " } } }
Registry:
${workspaceFolder}/.utf/utf.db— isolated per project.
`@utf` slash commands are available after the VSIX extension is installed.
# Start the UTF server
cd Universal-Test-Framework docker compose -f docker/docker-compose.yml up -d
Connect from VS Code by adding to mcp.json:
{
"servers": { "utf-remote": { "type": "sse", "url": "http://localhost:8765/sse" } } }
Registry: persisted in a named Docker volume (
utf_registry → /app/.utf/utf.db).
For per-project isolation with Docker, use a bind-mount in
docker-compose.yml:
`yaml
volumes:
- /path/to/your/project/.utf:/app/.utf
`
Because Docker uses HTTP/SSE transport (no
${workspaceFolder}templating), passproject_dir
explicitly in tool calls, or set
UTF_PROJECT_DIRin the container environment.
Per-project Docker workflow:
# docker-compose.override.yml
services: utf-server: volumes:
Once published, UTF is discoverable via the MCP marketplace. Clients that support server.json install it automatically. The generated mcp.json entry is equivalent to Method 1 (uvx).
Registry isolation: The MCP registry schema does not support a
cwdfield at the registry level.
UTF resolves project isolation via (in priority order):
1.
project_dirargument passed to each tool call
2.
UTF_PROJECT_DIRenvironment variable
3.
Path.cwd()fallback (server's working directory)
For correct isolation, ensure the MCP client writes
"cwd": "${workspaceFolder}"and
"UTF_PROJECT_DIR": "${workspaceFolder}"in the generated entry (UTF'smcp-gallery.jsondoes this).
pip install universal-test-framework
from mcp_server.tools.generate_tests import generate_tests
from pathlib import Path
result = generate_tests( test_type="unit", source_code=open("src/auth.py").read(), project_dir=str(Path.cwd()), # ← pass explicitly for correct registry isolation ) print(result["suite_code"])
Registry:
/.utf/utf.dbwhenproject_diris passed; falls back toPath.cwd().
| Tool | Description |
|---|---|
generate_tests | Generate a complete test suite satisfying the 8-section contract |
validate_test_contract | Validate any test (generated or hand-written) against the contract |
analyze_coverage | Identify coverage gaps in an existing test suite |
build_traceability_matrix | Build a requirements → tests traceability matrix |
suggest_test_types | Recommend test types with rationale from source code |
detect_language_framework | Auto-detect programming language and test framework |
import_test_results | Import JUnit XML from any test run into the UTF registry |
query_registry | Query the persistent per-project test registry |
run_tests | Execute test files and return structured CI results |
run_mutation_tests | Run mutation testing and return mutation score |
feedback_status | Get gap analysis, coverage health, and trend report |
generate_report | Generate HTML / JUnit / JSON contract compliance report |
health | Server health check: version, uptime, tool count |
Every test generated by UTF must satisfy all 8 sections. Tests that fail any hard section are blocked — returned in blocked_tests, never silently included.
| # | Section | What It Must Contain | Weight |
|---|---|---|---|
| 1 | test_id | Unique ID: TC-{TYPE}-{NNN} (e.g. TC-US-042) | 10% |
| 2 | why_generated | Rationale tied to a requirement (≥50 chars) | 10% |
| 3 | requirement_mapping | At least one US-, AC-, REQ-, JIRA-, BUG-, or NFR- reference | 15% |
| 4 | how_it_exercises | GIVEN / WHEN / THEN with inputs, mocks, assertions (≥100 chars) | 20% |
| 5 | coverage_contribution | Coverage type + module + estimated % | 15% |
| 6 | expected_outcome | Precise return values, status codes, state changes (≥50 chars) | 15% |
| 7 | gaps_missing | Honest list of what this test does NOT cover (≥40 chars) | 10% |
| 8 | meaningfulness_check | Self-assessment: meaningful / redundant / hallucinated (≥50 chars) | 5% |
Minimum passing score: 0.85. Tests below this threshold are blocked regardless of individual section presence. "none" in gaps or vague rationale like "to test the function" are rejected.
| Language | Frameworks | Test Types |
|---|---|---|
| Python | pytest | unit, integration, api, e2e, security, performance |
| TypeScript | Jest, Vitest, Playwright | unit, integration, e2e, api |
| JavaScript | Jest, Vitest | unit, integration |
| Java | JUnit 5 + AssertJ, Maven | unit, integration, api |
| Go | go-test + testify | unit, integration, api |
| C++ | Google Test | unit |
This is the canonical flow for using UTF with any AI CLI (Copilot, Claude, Cursor) or VS Code. Follow the phases in order — skipping Phase 1 registration means the report has no Per-Test Contract Detail cards.
┌─────────────────────────────────────────────────────────────────────────┐
│ PHASE 1 — CONTRACT GENERATION (LLM writes, UTF validates + registers) │ │ │ │ ① generate_tests (scaffold) │ │ ② LLM writes real test methods — each with its own TC-ID and │ │ 8-section comment block (WHY / REQ / HOW / COV / OUT / GAP / MEAN)│ │ ③ validate_test_contract — score must be ≥ 0.85 per test │ │ ④ register_contracts — parse test file, upsert status=generated rows │ │ ⑤ generate_report — verify Per-Test Contract Detail cards appear │ │ │ │ PHASE 2 — EXECUTION (pytest/jest/maven runs, results captured) │ │ │ │ ⑥ pytest --junit-xml=utf-tests/reports/results.xml │ │ ⑦ import_test_results — upsert executed/failed rows
只显示了开头部分;其余内容请在仓库中阅读