Documentation

Milkey Client API

The typed HTTP client at the center of the SDK.

`createClient` gives your app a typed Milkey HTTP client. Provider adapters sit on top of this client, but the client itself is the shared source of truth for tool calls, skill fetches, references, timeouts, and typed errors.

createClient

@milkeyskills/sdk
import { milkey } from "@milkeyskills/sdk" const milkeyClient = milkey.createClient({  baseUrl: process.env.MILKEY_BASE_URL!,  apiKey: process.env.MILKEY_API_KEY!,})

Config

  • baseUrl: required. The Milkey backend base URL.
  • apiKey: required. The Milkey API key used for Bearer auth.
  • timeoutMs: optional. Per-request timeout in milliseconds.
  • headers: optional. Additional headers for proxies, tracing, or custom network policy.
  • userAgent: optional. Override or extend the default SDK user agent string.
  • fetch: optional. Supply a custom fetch implementation when your runtime needs one.
Built-in behavior
The client validates config, preserves caller abort signals, enforces timeouts, parses RFC 9457 problem responses, and throws typed SDK errors.

Methods

  • getMcpUrl()
  • listTools()
  • callTool()
  • resolveSkill()
  • getSkill()
  • listSkillReferences()
  • getSkillReference()

Canonical tools

Canonical names and provider-safe aliases
resolve-skill            -> milkey_resolve_skillget-skill                -> milkey_get_skillget-skill-reference      -> milkey_get_skill_reference

Canonical names remain the source of truth. Provider adapters expose the safe alias names when the provider expects them.

© 2026 Milkey MCP