一键导入
mcp-test
Run the 4-tier test strategy for an MCP server (unit, integration, registration, E2E). Use during Phase 5 (Test) of the feature development lifecycle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the 4-tier test strategy for an MCP server (unit, integration, registration, E2E). Use during Phase 5 (Test) of the feature development lifecycle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run ASOPB evaluation with credential routing, build context sync, and baseline comparison
Walk the full ADEPT Code Hygiene Quick Reference Card checklist and report PASS/FAIL/N-A for each item. Use as a final check before pushing.
Full task closure workflow -- runs test validation, session report, tracking doc updates, commit preparation, and hygiene audit in sequence. Use at the end of a development session. Pass an optional title hint as argument.
Configure Claude Code to connect to an ADEPT instance (local Docker stack or remote server). Generates .mcp.json, runs doctor check, verifies connectivity. Use when setting up or switching between ADEPT instances.
Guided workflow to deploy ADEPT on cloud infrastructure (AWS, Azure, or GCP) as a single VM or A2A mesh pair. Covers provisioning, OS prep, stack deployment, and optional A2A federation between two independently-deployed stacks.
Add a new tool to an existing MCP server following the canonical register(mcp) + Pydantic pattern. Use during Phase 4 (Implement) of the feature development lifecycle.
| name | mcp-test |
| description | Run the 4-tier test strategy for an MCP server (unit, integration, registration, E2E). Use during Phase 5 (Test) of the feature development lifecycle. |
| disable-model-invocation | true |
| allowed-tools | Bash(make *) Bash(nohup *) Bash(docker *) Bash(grep *) Bash(find *) Bash(ls *) Bash(stat *) Bash(git *) Read Glob Grep |
| argument-hint | [{"optional":"server-directory"}] |
You are assisting an ADEPT developer with running the 4-tier MCP server test strategy. This skill corresponds to Phase 5 (Test) in the feature development lifecycle.
Do not use emojis in any output.
Enforce all rules in docs/development/AGENT_CODING_RULES.md throughout this skill execution.
If $ARGUMENTS provides the server directory, use it. Otherwise ask:
"Which MCP server are you testing?"
ls -d examples/*_mcp_server/ examples/*_mcp/ 2>/dev/null
Then read the server's test documentation:
cat <server_dir>/tests/TESTING.md 2>/dev/null || echo "No TESTING.md found"
ls <server_dir>/tests/
Check what changed to determine which tiers are mandatory:
git diff --name-only $(git merge-base HEAD main)..HEAD -- <server_dir>/
Apply the tier selection matrix:
| Change Type | Tiers Required |
|---|---|
| New tool added | Tier 1 (schema discovery) + Tier 3 (registration) |
| Config/settings change | Tier 1 (config validation) |
| Docker/compose change | Tier 2 (deployment health) |
| Full release / new server | All 4 tiers |
| Pre-registration check | Tier 1 + 2 + 3 |
Present the required tiers and ask the developer to confirm.
Unit tests validate imports, configuration, and schema discovery. No Docker required.
mkdir -p logs && nohup make -C <server_dir> test-unit \
> logs/<name>_unit_$(date +%Y%m%d_%H%M%S).log 2>&1 &
If make test-unit is not available:
mkdir -p logs && nohup bash -c "cd <server_dir> && python3 -m pytest tests/ -k 'unit or schema or config or import' -v" \
> logs/<name>_unit_$(date +%Y%m%d_%H%M%S).log 2>&1 &
Wait for completion, then check results:
tail -20 logs/<name>_unit_*.log | grep -E "passed|failed|error"
If unit tests fail, stop here. Do not proceed to integration tests until unit tests pass.
Integration tests verify the server starts, responds to health checks, and connects to MCP protocol. Requires Docker.
First verify the server containers are running:
cd <server_dir> && make health 2>&1 || echo "Server not running -- start with: make start"
If not running, ask the developer whether to start:
cd <server_dir> && make build && make start
Then run integration tests:
mkdir -p logs && nohup make -C <server_dir> test-integration \
> logs/<name>_integration_$(date +%Y%m%d_%H%M%S).log 2>&1 &
Check results:
tail -20 logs/<name>_integration_*.log | grep -E "passed|failed|error"
Registration tests validate the tool registration lifecycle with the ADEPT gateway: tools/list JSON-RPC, Redis key creation, CLI register/deregister.
Prerequisites:
curl -sf http://localhost:8083/v1/health)make sync-credentials from project root)Makefile target sync-credentials and DOCKER_RUN_VALIDATE_BASE (line 7). The credentials directory .env-keycloak-credentials-dir/ is auto-mounted in all validation containers via --env-file and -v flags.mkdir -p logs && nohup make -C <server_dir> test-registration \
> logs/<name>_registration_$(date +%Y%m%d_%H%M%S).log 2>&1 &
Check results:
tail -20 logs/<name>_registration_*.log | grep -E "passed|failed|error"
End-to-end tests validate full domain-specific workflows through the ADEPT orchestrator.
Prerequisites:
/mcp-register)mkdir -p logs && nohup make -C <server_dir> test-e2e \
> logs/<name>_e2e_$(date +%Y%m%d_%H%M%S).log 2>&1 &
Check results:
tail -20 logs/<name>_e2e_*.log | grep -E "passed|failed|error"
Present a summary table:
| Tier | Required | Log File | Result |
|---------------|----------|-----------------------------|--------------|
| 1. Unit | Yes | logs/<name>_unit_*.log | PASS/FAIL/SKIP |
| 2. Integration| Yes/No | logs/<name>_integration_*.log | PASS/FAIL/SKIP |
| 3. Registration| Yes/No | logs/<name>_registration_*.log | PASS/FAIL/SKIP |
| 4. E2E | Yes/No | logs/<name>_e2e_*.log | PASS/FAIL/SKIP |
Verify log timestamps are newer than code changes:
stat --format='%Y %n' logs/<name>_*_*.log 2>/dev/null | sort -rn | head -4
stat --format='%Y %n' <server_dir>/<package>/tools/*.py | sort -rn | head -1
If any required tier failed or is missing, provide remediation guidance. Do not proceed to Phase 6 (Document) until all required tiers pass.
Remind the developer of next steps in the lifecycle:
/mcp-register/write-session-report/close-task (Phases 5-9)