Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Metabind Assistant SDK is a Swift Package that ships an MCP-aware AI client, conversation state, an LLM provider abstraction, and the native SwiftUI renderer for BindJS. Drop it into your app and you have a fully functional in-product AI assistant — calling your tools, rendering results as real SwiftUI views, governed end-to-end.
Rendered Interactive Tool components — product detail cards, a purchasable item card with Buy Now, a 3D model viewer chip, and a product-comparison view — all returned by AI tool calls and rendered as native UI.

Start free

No credit card. Free Assistant SDK. Free tier on the platform.

iOS SDK reference

Full install, configuration, and custom-UI documentation.
Building for Android? Same SDK shape, Jetpack Compose renderer. Jump to the Android SDK guide.

Install via Swift Package Manager

In Xcode: File → Add Package Dependencies → paste:
https://github.com/metabindai/metabind-ai-apple
Or in Package.swift:
dependencies: [
  .package(url: "https://github.com/metabindai/metabind-ai-apple", from: "1.0.0")
]
Requirements: iOS 16+, Xcode 15+, Swift 5.9+. The Agent proxy holds the LLM key server-side, runs the tool loop, and streams responses back as SSE — your iOS binary never ships a third-party API key.
import MetabindAssistant

let assistant = MetabindAssistant(
  server: MCPServerConfig(
    serverURL: URL(string: "https://mcp.metabind.ai/my-org/my-project")!,
    serverHeaders: ["Authorization": "Bearer \(projectToken)"]
  ),
  llmProvider: MetabindAgentProvider(
    apiKey: projectToken
  )
)
The proxy supports Anthropic, OpenAI, and Google — selected per-project in MCP App Studio. Switch providers without shipping a new app version.

Drop in the chat surface

import SwiftUI
import MetabindAssistant

struct AssistantScreen: View {
  let assistant: MetabindAssistant

  var body: some View {
    MetabindAssistantView(assistant: assistant)
      .navigationTitle("Assistant")
  }
}
That’s a working in-app AI assistant. MetabindAssistantView handles user input, message rendering, streaming SSE deltas, and inline native rendering of Interactive Tool output. It respects your app’s color scheme, dynamic type, and accessibility settings — because it’s SwiftUI, not a WebView. For a fully custom UI, use the lower-level API on MetabindAssistantassistant.send(...), assistant.conversation, assistant.cancel(), assistant.isProcessing. See Custom host UI.

What you don’t write

You writeThe SDK does
Project URL + token from your backendMCP connection, auth, retries
LLM provider config (Agent proxy or BYOK)Tool calls, schema validation, conversation state
MetabindAssistantView placement (or custom UI)Streaming, message rendering, tool-result rendering
  • No tool-calling loop. In Agent proxy mode the proxy runs it; in BYOK mode the SDK does. Either way, not you.
  • No streaming code. SSE deltas flow into conversation state and re-render the UI automatically.
  • No native renderer. Interactive Tool output renders through BindJS without you wiring it up.
  • No schema validation. Inputs and outputs are validated against the project’s tool schemas before they reach the renderer.

Native rendering, not a WebView

A Metabind ProductCard renders inline in a chat conversation as a real native SwiftUI view — image, title, price, and shop button — not as a WebView.
When the assistant calls one of your Interactive Tools, the result renders as SwiftUI inline in the conversation. A ProductCard is a SwiftUI view — it animates with your app’s transitions, respects dynamic type, supports VoiceOver, and adopts your color scheme. The renderer is BindJS Swift; there is no JavaScript runtime on iOS, no embedded browser, no app-store release when you change a layout. The same Interactive Tool definition that renders here renders as Jetpack Compose on Android and React on the web. One BindJS definition. Three native runtimes. Same governance everywhere.

Your tools. Your brand. Your app.

Most “drop-in AI” SDKs route users to someone else’s chat surface, someone else’s brand, and someone else’s tool ecosystem. The Assistant SDK is the opposite — the AI runs inside your product, calling tools you built in Metabind, rendered with your components, on your typography and color. Your users never leave your app. You don’t expose them to a third-party host.

Token and key handling

Where it livesWhat
Your backend (recommended)Mint per-user or per-session Metabind project tokens. The SDK uses them to authenticate to the MCP server and the Agent proxy.
Agent proxy, server-sideThe LLM provider key (Anthropic, OpenAI, or Google). Your client never sees it.
BYOK direct mode (dev only)Anthropic API key delivered to the SDK by your auth flow. For production, prefer the Agent proxy.
Don’t hard-code an Anthropic API key in a production iOS app — anyone can extract it from the binary. Use the Agent proxy for production.

Use the Assistant SDK when

  • You’re building an iOS, Android, or web product and want an in-product AI assistant.
  • You want users to use AI inside your app, not be redirected to Claude or ChatGPT.
  • You want native UI rendering of tool results — SwiftUI, Compose, React — not WebViews.
  • You want Metabind to manage LLM key custody and the tool loop server-side.
A project’s tools work in both the Assistant SDK and connected MCP hosts at the same time. Ship the SDK in your app, and let power users also connect Claude Desktop to the same project if they want to.

Three platforms, one model

Swift, Kotlin, and React — the Metabind Assistant SDK ships native renderers for all three.
PlatformPackageRenderer
iOSmetabind-ai-apple (Swift Package)SwiftUI via bindjs-apple
Androidmetabind-ai-android (Maven)Jetpack Compose via bindjs-android
React (web)@metabind/assistant-sdk (npm)React via @bindjs/renderer
Each SDK exposes the same shape — a MetabindAssistant configured with a server and an LLMProvider, plus a default MetabindAssistantView chat surface — adapted to the platform’s idioms.

Ship today

Start free

No credit card. Free Assistant SDK. Free tier on the platform.

iOS SDK reference

Full install, configuration, mock mode for previews.

Android SDK

Jetpack Compose renderer, Kotlin install, parity with iOS.

LLM provider configuration

Agent proxy vs. BYOK. Anthropic, OpenAI, Google selection.