Files
zeekayandGitHub 69a5fecf84 feat: cloud Mount() per HIP-0106 (#6)
* feat: cloud Mount() per HIP-0106

Adds pkg/mcp with the canonical Mount(*zip.App, cloud.Deps) entry so the
unified cloud binary can serve the HIP-0300 tool surface under /v1/mcp.

The route layer is pure-Go: it defines an Invoker contract and dispatches
GET /v1/mcp/tools, POST /v1/mcp/tools/:name, plus the standard search and
fetch shortcuts. The CGO-backed hanzomcp package implements Invoker; a
build without CGO mounts the routes and returns 503 until SetInvoker
registers a runtime. Adds schema/mcp.zap describing the typed surface.

* refactor: collapse pkg/go/ → root + flatten cloud import

Repo IS the package. Mount() at root. Consumers use
`github.com/hanzoai/mcp/go` (no /pkg/go/ nesting).
2026-05-18 23:38:03 -07:00

49 lines
1.9 KiB
Plaintext

# Hanzo MCP — ZAP Schema (HIP-0106 / HIP-0300)
#
# Server: hanzoai/mcp mounted at /v1/mcp inside the unified cloud binary.
#
# Code generation:
# zapc generate mcp.zap --lang go --out ./go/pkg/mcp/zap/
# zapc generate mcp.zap --lang ts --out ./src/zap/
# zapc generate mcp.zap --lang py --out ./py/zap/
# zapc generate mcp.zap --lang rust --out ./rust/src/zap/
# ── Tool catalog ─────────────────────────────────────────────────────────
struct ToolDef
name Text
description Text
inputSchema Text # JSON schema, serialized as Text to avoid recursion
struct ToolList
tools List(ToolDef)
# ── Invocation ──────────────────────────────────────────────────────────
struct CallRequest
name Text
params Text # caller-supplied JSON params for the tool action
struct CallResult
success bool
content Text # tool-specific JSON content
error Text # populated when success=false
# ── Health ──────────────────────────────────────────────────────────────
struct Health
status Text # "ok" | "no-runtime"
backend Text # "ready" | "none"
# ── Service interface ───────────────────────────────────────────────────
interface MCP
# List tool definitions registered with the runtime.
list () -> (list ToolList)
# Invoke a tool by name with caller-supplied JSON params.
call (request CallRequest) -> (result CallResult)
# Health probe; reports whether the runtime is wired.
health () -> (status Health)