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.
https://api.handoff.store/mcphttps://api.handoff.store/mcp with that token and list the tools.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) })
}
}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: