Build an MCP server

Define tools, validate parameters, connect a client, and put the safety gate on the default path.

Define the tools

Give every tool a clear name, parameter schema, return value, and error behavior. Design read-only tools before write or control actions.

Return values should be directly usable by a model: structured, self-describing field names, and errors expressed as normal returns rather than stack traces.

Connect a client

Use the TypeScript MCP SDK or another official SDK. Test discovery, validation, and timeout behavior in a local client first.

server.registerTool(
    "analyze_findings",
    {
        description: "提交端侧解析得到的结构化 findings,返回解释后的报告",
        inputSchema: { findings: z.array(FindingSchema) },
    },
    async ({ findings }) => ({ content: [{ type: "text", text: await explain(findings) }] }),
);

Flight safety principle

The platform never actuates real aircraft

Capabilities that arm, switch modes, or run missions ship only as open-source Skills under three gates: read-only by default, actuation behind an explicit flag, and simulation first — with further gates for real aircraft.

This is a design premise, not a disclaimer: the read-only path must be the default path, not an option you remember to enable.