Model Context Protocol · MoonBit
A server framework for MoonBit. One server answers both eras of the protocol, speaks Streamable HTTP or stdio, and its tools are registered by hand or written as #mcp annotations.
the core, always lit
839 public items from 13 packages
MCP 2026-07-28 · 2025-11-25 · 2024-11-05
mcp.tool(
"add",
args => {
guard args.get("a") is Some(Number(a, ..))
&& args.get("b") is Some(Number(b, ..)) else {
fail("a and b must be numbers")
}
{ "sum": Json(a + b) }
},
description="Add two numbers",
)