Skip to main content
Two commands for a person or a coding agent. Both print short lines, or one JSON object with --json, on stdout. Each has its own --help.

magpie-server doctor

Checks a running server. It changes nothing but one test span.

The checks

A failed check has a fix line that says what to do. A check that cannot run after a failed one is skip.

Flags and variables

{"ok", "url", "doctorVersion", "server", "checks", "testSpan"}:
  • server: the answer of GET /v1/version, or null.
  • checks: always the five checks in order, each {"name", "status", "message", "fix"}. status is pass, fail or skip; fix is null unless the check failed.
  • testSpan: {"traceId", "spanId", "word", "service", "delete": {"method", "path", "body", "curl"}} once the server took the span, else null.
  • The key and the test span go only to magpie-server. When GET /v1/version is missing or does not answer as magpie-server does, send and query are skip.
  • The test span is one span of a new trace, service magpie-doctor. The output gives the command that deletes it.
  • The output never shows a key.
  • A server on this machine (localhost, 127.0.0.0/8, ::1) gets the requests with no proxy. For another host the doctor uses HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY.

magpie-server setup

Finds the language and the agent framework of a project, and prints its tracing setup. It writes no file and connects to nothing.
It reads four files of the folder, not its sub-folders: For each framework it prints the install line, the environment variables, the code, whether the setup was tested with Magpie, and a link to the framework’s docs. A project with none of them gets the plain OpenTelemetry variables. The output ends with the doctor command that checks the server. Exit code 0, or 2 for wrong flags or a --dir that is not a folder.

Set up with a coding agent

The steps a coding agent follows, with doctor as the check.

MCP for agents

Let an agent query the traces.