Antigravity MCP timeout testing helps QA teams answer a deceptively important question: what happens when an agent calls a tool that never finishes? A useful integration must stop waiting, explain the failure, preserve the working session, and recover without silently repeating a side effect.

This tutorial builds a bounded fault-injection lab around a disposable Model Context Protocol (MCP) server. You will exercise normal, slow, disconnected, and malformed responses; inspect client and server evidence; test retry behavior; and verify that a timeout is treated as an uncertain result rather than proof that nothing happened.

What Google officially documents

Google’s Antigravity changelog lists version 2.4.2 on July 24, 2026. The release adds a timeout for MCP server connections and tool calls to prevent the agent from hanging indefinitely. It also adds a Download Diagnostics command whose package contains logs and agent state for troubleshooting.

The official MCP guide says Antigravity manages servers under Settings and Customizations. The CLI MCP manager shows live status, supports configuration reloads, and exposes real-time connection logs. MCP tools are governed by Antigravity permissions and default to Ask when no rule is configured. These capabilities make failure injection observable, but they do not make remote execution transactional.

A timeout only says the client stopped waiting. The server may have received the request and completed work after the response path failed. Design this test around synthetic data and an idempotency key.

Test objective and acceptance criteria

Create one harmless tool named qa_probe. It accepts a case ID, delay, response mode, and idempotency key. It writes a sanitized server-side record and returns a small result. Do not connect this exercise to production databases, issue trackers, deployment systems, or customer data.

  • A normal call completes once and returns the matching case ID.
  • A delayed call ends in a bounded failure instead of an endless spinner.
  • The Antigravity conversation remains usable after failure.
  • A reconnect or reload restores a healthy tool call.
  • A retry with the same idempotency key cannot create a second side effect.
  • Client evidence and server evidence can be correlated.
  • Diagnostics are reviewed and redacted before they leave the test environment.
  • Permission prompts still behave as configured during failure and recovery.

Step 1: build the disposable MCP fixture

Implement four deterministic modes in a local test server:

  1. normal: return immediately with status=ok.
  2. slow: wait beyond the client timeout before returning.
  3. disconnect: accept the request and close the transport before replying.
  4. malformed: return an invalid or schema-incompatible result.

For every request, record timestamp, case ID, idempotency key, mode, accepted state, completion state, and side-effect count. Never log prompts, credentials, authorization headers, or user content. A monotonically increasing counter is enough to represent a side effect.

Step 2: isolate configuration and permissions

Add only the disposable server to a test project. Antigravity’s MCP documentation supports project-level configuration, while its permissions system can keep unconfigured tools in Ask mode. Leave the probe in Ask for the first pass so the approval boundary is visible. If you later allow it, scope the rule to this server and tool rather than using a global wildcard.

Use synthetic environment values. The MCP guide documents custom headers, OAuth, and environment variables, any of which may carry secrets. Do not include real tokens in screenshots, server logs, diagnostics, or article evidence. Keep non-workspace access disabled and use a dedicated repository containing no customer fixtures.

Step 3: establish the healthy baseline

Open the MCP manager and capture the connected status. Ask Antigravity to call qa_probe in normal mode with case BASE-01 and a unique idempotency key. Confirm the approval prompt, returned case ID, server acceptance record, completion record, and side-effect count of one.

Repeat with a second key. This proves the fixture can distinguish a valid second operation from an accidental retry. Save timestamps from both sides so later timeout evidence can be correlated without relying on conversational wording alone.

Step 4: inject a slow response

Call the probe in slow mode with case SLOW-01. Choose a delay comfortably longer than the observed client limit; do not claim a fixed timeout value unless your installed build documents one. Measure elapsed time from request submission to the visible failure state.

Verify that Antigravity stops waiting and produces a bounded error or recovery path. Then send a harmless chat message that does not use MCP. The session should still respond. Check the server record: it may show the request completed even though the client timed out. Record the result as unknown until reconciled, not failed-before-execution.

Step 5: test safe retry semantics

Retry SLOW-01 with the same idempotency key in normal mode. The fixture should return the existing result or a duplicate-suppressed response, and the side-effect count must remain one. Next, retry with a new key and confirm the counter increases. This pair proves both duplicate protection and intentional repeat behavior.

If a real MCP tool lacks idempotency support, require a read-before-retry check or human confirmation for actions such as creating issues, sending messages, updating records, or triggering builds. Blind automatic retry is not a safe default for state-changing tools.

Step 6: exercise disconnect and malformed output

Run DROP-01 in disconnect mode. Confirm that the UI exits the waiting state and the MCP manager reflects useful connection evidence. Reload the server configuration, wait for a healthy status, and repeat the normal baseline.

Then run BAD-01 in malformed mode. Antigravity should surface a tool or schema failure without treating invalid data as success. The conversation must remain usable, and the next healthy call must return a correctly structured result. Capture separate evidence for transport failure and response-validation failure; they are different defects with different owners.

Step 7: inspect and sanitize diagnostics

Version 2.4.2 adds Download Diagnostics for logs and agent state. Generate a package only in the synthetic project. Before sharing it, copy it to a controlled review location and inventory filenames and text fields. Search for authorization values, usernames, absolute paths, prompt content, environment variables, server URLs, and test payloads.

Redact or omit sensitive fields while preserving case IDs, timestamps, error classes, connection transitions, and build information needed for reproduction. A diagnostics archive is troubleshooting material, not automatically safe evidence. Apply your organization’s retention and access rules.

Step 8: create the QA result matrix

Case Expected client result Required server check
BASE-01 Successful structured response One accepted and completed record
SLOW-01 Bounded timeout; session usable Determine whether execution completed
RETRY-01 Existing or duplicate-suppressed result Side-effect count remains one
DROP-01 Transport failure; reload works Accepted/completed state reconciled
BAD-01 Invalid response rejected No false success recorded

Record installed Antigravity build, operating system, MCP transport, server revision, permission mode, elapsed time, visible error, reload outcome, and evidence links. Rerun each case at least three times to separate reproducible behavior from an intermittent environment issue.

Common mistakes

  • Assuming timeout means no action: always reconcile with the server.
  • Testing with a production connector: use a disposable, idempotent fixture first.
  • Hard-coding an undocumented timeout: measure the installed build and report it as an observation.
  • Retrying with a fresh key automatically: this can duplicate a state change.
  • Sharing raw diagnostics: review and redact logs and agent state.
  • Ignoring permissions: failure recovery must not widen tool access.

Release decision

Pass the integration only when every failure mode ends in bounded time, the conversation recovers, healthy calls work after reload, duplicate effects are suppressed, and evidence can resolve uncertain outcomes. Raise a defect if the UI hangs, success is reported for malformed output, a retry duplicates work, permissions change unexpectedly, or diagnostics expose unnecessary sensitive data.

Antigravity’s timeout reduces one failure mode: waiting forever. A production-ready QA strategy still needs idempotent tools, server-side audit records, least-privilege permissions, deterministic checks, privacy review, monitoring, and human approval for risky actions.

Official sources