lab-executor-mcp
Backend-independent experiment execution runtime for AI agents.
Split from visa-mcp at v2.0.
⚠ Upgrading from visa-mcp v1.x? First read
docs/v2_migration.md. 実機 backend が必要な既存利用者はpip install --upgrade visa-mcpが 互換経路 (v2.0 では visa-mcp v2.0 release を待つ必要あり)。
Line-ending / raw display note (v2.5.1 強化):
Some third-party viewers and LLM-based fetchers occasionally report repository files as "1 line" / "collapsed" when reading
raw.githubusercontent.com. This is a viewer-side artifact, not a repository defect. The repository stores all text as LF.Ground truth lives in
RELEASE_VERIFICATION.md— a tag-time generated manifest listing each critical file's exactbytes/LF/CR/BOMcounts. Any reviewer can run:git clone --branch v2.5.1 https://github.com/TECTOS-JP/lab-executor-mcp.git cd lab-executor-mcp python scripts/release_verification.py --check # expect: "OK" + exit 0 (CR=0, LF>=10, no BOM for every critical file)If your viewer disagrees with the manifest, your viewer is wrong. CI also enforces this via
tests/test_v200_split.py::test_critical_files_are_multiline_and_lf_only.
What it provides
- DSL (
ExperimentPlan,dsl_version=0.8) + validator + dry-run - Job manager / state machine / scheduler / barrier
- Observation API (
timeline/live_view/summary) - Benchmark runner (MockBackend, PyVISA 不要)
- Definition pack ecosystem (
extension init/install/check/package/...) - Instrument authoring (
instrument scaffold/promote-check/review-report) - Export / bundle (deterministic reproducibility) —
export_experiment_bundle - MCP tool surface: Stable 43 + Experimental 7 = 50 (v1.0 から不変)
MCP API の安定性ポリシー (Stable / Experimental tool の区分、deprecation 方針)
は docs/v1_stability_policy.md を参照。
Install
pip install lab-executor-mcp
PyVISA は 必須ではない。実機 backend が必要な場合は
visa-mcp を install すると自動的に lab-executor-mcp も入る。
pip install visa-mcp # PyVISA backend + lab-executor-mcp runtime
Extension path behavior (v2.4)
v2.4 introduces dual-path read for installed extension packs while
keeping the write default unchanged (legacy ~/.visa-mcp/extensions/).
Duplicate extension_id across both paths is not auto-resolved:
it is reported as a warning (or error with --strict).
| Aspect | v2.4 behavior |
|---|---|
| Read (catalog / check) | ~/.lab-executor/extensions/ and ~/.visa-mcp/extensions/ |
| Write (install) default | ~/.visa-mcp/extensions/ (unchanged) |
Duplicate extension_id |
warning by default, error with --strict |
| Auto-precedence | none — duplicates are never silently resolved |
| Policy id | duplicate_policy = report_conflict_no_implicit_precedence |
The default install target will be re-evaluated in v2.5+. v2.4 is a reporting phase — it sees both paths, but never picks one implicitly. Inspect the resolver state with:
lab-executor extension paths --json
v2.5 adds lab-executor extension migration-plan (plan only, no file
changes) and the resolve_extension_by_id() API (duplicate
extension_id raises ExtensionResolveError). See
docs/extension_path_migration.md
for the full migration guide and roadmap (v2.6 copy-plan → v2.7
controlled apply → v2.8 default switch).
How to start the server (v2.1+)
| 用途 | コマンド | PyVISA | backend |
|---|---|---|---|
| Mock / dry-run / benchmark / validation | lab-executor serve --backend mock |
不要 | MockBackend |
| 実機 (PyVISA 経由) | visa-mcp serve |
必要 | PyVisaBackend (visa-mcp 同梱) |
Quick examples
# 1) Server を compose して tool 一覧を確認する (transport 起動なし)
lab-executor serve --backend mock --dry-run
# 2) 実 transport を起動 (Claude Code / MCP client から接続)
lab-executor serve --backend mock
# 3) Extension pack を検証
lab-executor validate extension my_pack/extension.yaml --strict
lab-executor extension doctor my_pack/
# 4) Package + verify
lab-executor extension package my_pack/ --output my_pack.visa-mcp-ext.zip
lab-executor extension verify-package my_pack.visa-mcp-ext.zip
# 5) Install + lifecycle (v2.3+)
lab-executor extension install my_pack.visa-mcp-ext.zip --dry-run
lab-executor extension install my_pack.visa-mcp-ext.zip
lab-executor extension catalog # installed pack 一覧
lab-executor extension check # checksum / manifest 検査
lab-executor extension paths # install path resolver 状態
Exit code policy (v2.1.1)
| Subcommand | exit 0 | exit 1 | exit 2 |
|---|---|---|---|
serve |
server 起動 / --dry-run 成功 |
— | --backend 未指定 / 不正 |
validate {instrument,extension} |
errors == 0 | errors > 0 | usage error |
extension doctor |
status == "ok" |
warnings / errors あり | usage error |
extension package |
package 成功 | 失敗 | usage error |
extension verify-package |
checksums OK | mismatch / 不正 | usage error |
extension init |
pack 生成成功 | 失敗 | usage error |
extension install |
install 成功 / --dry-run 成功 |
verify 失敗 / 書き込み失敗 | usage error |
extension check |
OK (warning も exit 0) | error あり、または --strict で warning |
usage error |
extension catalog |
一覧出力 (空でも exit 0) | 内部 error | usage error |
extension paths |
出力成功 | — | usage error |
instrument scaffold |
YAML 生成成功 | 失敗 | usage error |
instrument review-report |
markdown 出力成功 | file 不在等の error | usage error |
diagnose tool-surface |
status == "ok" または warning + --strict 無し |
warning + --strict |
usage error |
doctor は warning だけでも exit 1 になります (CI で fail させる
強い gate として設計)。warning を許容したい場合は doctor 出力を
--json で取り、errors のみを判定してください。
Notes
lab-executor serveは--backend mockが必須 (引数なしは exit 2 でvisa-mcp serveへの案内)- 他 backend (REST / replay / plugin) は v2.2+ で検討
- runtime 内部の
JobManagerは v2.1 時点でvisa=引数名を受け取る (v1.x からの互換維持)。v2.2+ でbackend=への rename を検討予定
CLI status in v2.3
v2.3.1 までに活性化された範囲:
v2.1.0:
lab-executor --version/--helplab-executor serve --backend mock(MockBackend で MCP server 起動)lab-executor serve --backend mock --dry-runlab-executor validate instrument <path>lab-executor validate extension <path>lab-executor extension doctor <pack_dir>lab-executor extension package <pack_dir>lab-executor extension verify-package <zip>
v2.2.0:
lab-executor extension init <dir>(pack scaffold 生成)lab-executor instrument scaffold <category>lab-executor instrument promote-check <yaml>lab-executor instrument review-report <yaml>lab-executor diagnose tool-surface(Stable 43 + Experimental 7 検査)
v2.3.0:
lab-executor extension install <zip>(--dry-run/--force/--skip-verify)lab-executor extension check(--extension-id/--strict)lab-executor extension catalog(install 済 pack 一覧)lab-executor extension paths(path resolver 状態 /--json)
--skip-verify の取り扱い (重要)
extension install --skip-verify は test 用途専用。信頼できない
配布物 (第三者 zip / 外部レジストリ pull) には 絶対に使わないこと。
checksum 検証を skip するため、tampering 検出ができなくなる。
--dry-run semantics (v2.3)
extension install --dry-run は v2.3 時点で package verify のみ を
実行する。install 済 extension_id の重複検査や install path への
書き込み権限確認は行わない (v2.4+ で検討)。
v2.4+ で port 予定 / 検討中
extension uninstall(.install_meta.jsonベースの安全削除)extension list-installed(catalog のエイリアス整理)- 他 backend (REST / replay / plugin) の
--backendchoice 追加 default_extensions_dirの source of truth をextension_paths .get_extension_paths().current_defaultに統合 (現状は 2 系統存在)
実機 backend を起動する経路は引き続き visa-mcp serve (visa-mcp
v2.0+ を install)。
v2.0 split
- v1.x までは
visa-mcp1 リポジトリで提供されていた - v2.0 で backend (visa-mcp) と runtime (lab-executor-mcp) を分離
- MCP tool / DSL schema / extension pack 形式は完全互換
- 旧
from visa_mcp.extension import ...は v2.0 で DeprecationWarning 付きで動作
詳細: docs/v2_migration.md
License
MIT
Metadata
Release files for lab-executor-mcp 2.38.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lab_executor_mcp-2.38.0.tar.gz | 924.9 kB | With provenance | Details for lab_executor_mcp-2.38.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lab_executor_mcp-2.38.0-py3-none-any.whl | Python 3 | none | any | Details for lab_executor_mcp-2.38.0-py3-none-any.whl |
Total release size: 1.5 MB
Release files / lab_executor_mcp-2.38.0.tar.gz
| Download URL | lab_executor_mcp-2.38.0.tar.gz |
|---|---|
| Size | 924.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7e7e38196be1db4ec1297aad97f50c1a492c6c0efa9fa9b0cfdbed7d93dbe87
|
|
BLAKE2b-256 checksum How to use checksums |
c33c0d97d9e2ce2b78e327325cab3f1ca753198c3a3c76baf37cffedf07272dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / lab_executor_mcp-2.38.0-py3-none-any.whl
| Download URL | lab_executor_mcp-2.38.0-py3-none-any.whl |
|---|---|
| Size | 554.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f114101a96320b01602f8419697a1dc8604e64a9aa90bd506f94cf194d4d77a
|
|
BLAKE2b-256 checksum How to use checksums |
34e871b3ea11a7a25eb269bb578888d8de042f46a29d0172b0b3e8aed6b76e87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logSecurity for lab-executor-mcp 2.38.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lab_executor_mcp-2.38.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.