---
title: "MGS3034: MCP client script failed"
description: A client MCP request was invalid, timed out, or its Buzz script failed.
tags: [MGS3034, mcp, client, buzz]
---

# MGS3034: MCP client script failed

The message following the code names the failed part of the request or includes
the Buzz compiler/runtime diagnostic.

## What to do

- Supply exactly one of `script` or `path`, and pass arguments through `args`.
- Define `main(args: [str])` and return a JSON-encodable value. The return is
  under `json`; text from `std.print` is under `stdout`.
- Call `magus\describe.module("magus")` for the signatures. Label arguments
  after the first, and annotate every parameter.
- Fix any nested `BZZ####` compiler or import diagnostic first.
- File imports, native FFI, and host modules outside the allowlist are refused.
  The allowlist is `magus` plus `std`, `math`, `crypto`, `serialize`, `buffer`,
  and the WASM host modules except `env`.
  `magus\cmd` and `magus\pry` are not offered.
- A timed-out script hit the call bound. Bounded at 10 minutes when called
  directly; a host that supports MCP tasks can run it as a task without that
  bound. Otherwise run the script through the `magus buzz` CLI.
- A script that only reshapes JSON another tool already returned belongs on
  the `buzz` tool, which refuses `import "magus"`.
- If the worker reports an invalid response, report it as a Magus bug with the
  diagnostic and server version.
