Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Testing MCP Tool Call Hangs with Deterministic Failure Lab

Описание и применение

Использование MCP Failure Lab позволяет воспроизводить зависания инструментов и проверять тайм‑ауты, отмену, состояние сессии и побочные эффекты.

Задача

MCP clients need deterministic tests for tool calls that hang, to verify timeout handling, cancellation, and state consistency.

Результат

Deterministic hangs enable reliable testing of client timeout logic, cancellation handling, and side‑effect verification, reducing flaky test failures.

Рабочий процесс

  • 1. Install MCP Failure Lab: npx mcp-failure-lab demo
  • 2. Define a scenario JSON that calls the hang tool with a timeout, e.g. 1000 ms
  • 3. Run the scenario; the client should receive a timeout after the specified period
  • 4. Optionally call observe to check server state after the timeout
  • 5. Verify that the session remains usable and that other tool calls succeed

Доказательства

MCP Failure Lab has a hang tool specifically for this.

Источник

The server hangs. The client is expected to time out after one second.

Источник

Failure Lab supports an independent observe call for scenarios where state needs to be checked after the main call.

Источник

  • Дата записи: 2026-09-08T15:48:33.950Z