Developers Connect an AI

Connect Muse

Meta has no way to add an MCP server by address yet, so Muse reaches Hand-Off through a few lines of your own code.

Meta AI can’t add Hand-Off by address today. When this page was checked, the Meta AI app had no self-serve custom connector (Meta AI Connectors is a developer preview you apply for), and the Meta Model API had function calling but no MCP tool type.

What works now: your code connects to Hand-Off with an MCP client, hands the tools to Muse as functions, and runs the calls Muse asks for. When Meta opens connectors to everyone, this page will get the short version.

Server address

https://api.handoff.store/mcp

Muse through the Meta Model API

  1. Get a Hand-Off access token for the member the software acts for: see Sign-in.
  2. Connect an MCP client to https://api.handoff.store/mcp with that token and list the tools.
  3. Pick the tools your software needs and pass them to Muse as functions. Don’t pass the whole catalog: it is far more than a model should choose from in one request.
  4. When Muse asks for a function, call the tool through the MCP client and send the result back, until Muse answers in words.
TypeScript (outline)
import OpenAI from "openai"
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"

// 1. Hand-Off, over MCP
const handOff = new Client({ name: "my-app", version: "1.0.0" })
await handOff.connect(
  new StreamableHTTPClientTransport(new URL("https://api.handoff.store/mcp"), {
    requestInit: { headers: { Authorization: `Bearer ${ACCESS_TOKEN}` } },
  }),
)

// 2. Only the tools this app needs
const wanted = ["get_connection_context", "search_orders", "get_order"]
const { tools } = await handOff.listTools()
const functions = tools
  .filter((tool) => wanted.includes(tool.name))
  .map((tool) => ({
    type: "function" as const,
    function: { name: tool.name, description: tool.description, parameters: tool.inputSchema },
  }))

// 3. Muse, through Meta's OpenAI-compatible API
const meta = new OpenAI({ baseURL: "https://api.meta.ai/v1", apiKey: META_API_KEY })
const messages: OpenAI.ChatCompletionMessageParam[] = [
  { role: "user", content: "How many orders came in today?" },
]

for (;;) {
  const reply = await meta.chat.completions.create({ model: "muse-spark-1.3", messages, tools: functions })
  const message = reply.choices[0].message
  messages.push(message)
  if (!message.tool_calls?.length) {
    console.log(message.content)
    break
  }
  // 4. Run each call Muse asked for and hand back the result
  for (const call of message.tool_calls) {
    if (call.type !== "function") continue
    const result = await handOff.callTool({
      name: call.function.name,
      arguments: JSON.parse(call.function.arguments),
    })
    messages.push({ role: "tool", tool_call_id: call.id, content: JSON.stringify(result.structuredContent ?? result.content) })
  }
}
  • This outline follows Meta’s published OpenAI-compatible API. Check Meta’s documentation for the current model names before you run it.
  • The same pattern works for any model that has function calling but no MCP support of its own.

After you connect

  • Reads and everyday edits run right away. Destructive changes, anything that moves money and anything that messages customers wait for an owner’s approval: see Approvals.
  • To disconnect, open Connected apps in your Hand-Off dashboard and revoke it.
  • What the tools can do is in the tool reference.

Meta’s side of these steps was checked against its documentation on 1 December 2026. If a menu has moved since, these pages have the current steps: