moonmcp

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.

pull up a stool · tap a window

A masonry wood-fired oven: a stone arch over a brick firebox, with a chimney and a stone hearth.

the core, always lit

The board

839 public items from 13 packages

MCP 2026-07-28 · 2025-11-25 · 2024-11-05

Down to the guide The reference cellar

On the table

order · tools/call add{ "a": 2, "b": 3 }
→ { "sum": 5 }
order · resources/readconfig://app
→ { "theme": "dark" }
recipe · a tool
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",
)