Skip to content
Content

How do I connect my MCP server to iMessage?

Put your remote MCP tools behind a dedicated iMessage number, and keep business tools, setup and live message handling separate.

How do I connect my MCP server to iMessage?

Connect your remote MCP server to a Keiki-hosted agent, then attach an iMessage line so customers can use your tools by texting your product. If you bring an agent, keep its MCP connection in your runtime while Keiki runs the conversation and team inbox.

Key takeaways

  • Connect your remote MCP server as business tools for an agent on an iMessage line.
  • Use Keiki's setup MCP endpoint to configure the agent, not to connect your personal message history.
  • If an MCP client should run the live agent loop, connect it to the separate harness MCP endpoint.
  • Test a read-only tool first, and keep account checks and write controls in your backend.

What connects the MCP server to the iMessage thread?

The iMessage line carries the messages. The MCP server supplies the tools. The agent sits between them: it reads the customer request, calls a tool and uses the result to reply. For example, if a customer texts asking when their order ships, the agent can call a read-only order lookup on your MCP server after your backend verifies access. It replies with the fulfillment status your tool actually returned.

How do I connect my own MCP server to a Keiki-hosted agent?

To share the tools with everyone who texts your agent, open the existing agent in the dashboard. Under Tools, choose Connect a tool, then Add an MCP server. Enter a name and a URL Keiki can reach. For OAuth, select Save & authorize and sign in. For an API key sent in a header, choose Static headers, enter the header and select Save & connect. For a public server, select Public (no auth) and Save & connect.

Confirm the server is connected and attach a dedicated iMessage line if the agent doesn't already have one. Text the number from a test phone and confirm the agent calls the intended tool and replies with the result. If you use a shared number instead, text the agent's join code first to route messages from that phone to your agent.

Do I have to host my model on Keiki to use MCP?

No. Build and run the agent on Keiki if you want it to operate both the conversation and the tools. If your app already runs the model, keep your MCP client and tools there and use the AI SDK handler or a custom external harness to receive Keiki turns and reply. Keiki still handles message delivery and the team inbox.

If an MCP client will handle incoming messages, use an external-harness agent in inbox mode and connect the client to Keiki's harness MCP endpoint. OAuth sets up inbox mode for an agent with no existing dispatch; it does not override push or relay. Once the agent uses inbox mode, the client can claim an inbound turn with next_message and answer through reply. This connection is for a Keiki agent's conversations, not for reading an Apple account's inbox.

How do I keep tool writes and exceptions under control?

Limit the server to operations the agent needs, and verify who may touch the record before returning data or making a change. If your model calls your tools directly, enforce authorization and approvals in your own execution path. For a supported dispatched tool, configure governed actions to hold a sensitive write until it is approved. An eligible direct iMessage conversation can present a Keiki Vault Face ID approval card; a configured payment on an eligible line can use Apple Pay in the thread. A teammate can take over in the same conversation when the agent cannot finish the request.

Which MCP server runs the tools customers use in iMessage?

Your MCP server exposes product tools such as looking up a booking. The Keiki MCP server lets a coding agent manage the Keiki setup. A local Mac MCP bridge is another setup altogether; you do not need one when Keiki runs your customer-facing line.

Quick start for AI coding agents

Read setup.md, then add https://onkeiki.com/mcp to your coding client for setup. If you are bringing a supported app, sign in with npx @onkeiki/cli login and run:

npx @onkeiki/cli init

That setup does not register your business MCP server. Connect the server where your model loop runs, then test a real message, a denied lookup and a team takeover. See Keiki's setup MCP guide, the guide to connecting your own tools and what Apple's official Messages APIs cover.

FAQ

How do I connect my MCP server to iMessage? Add the remote MCP server to a hosted Keiki agent, then attach an iMessage line. If you bring your own agent, let that runtime call your MCP tools and connect it to Keiki with the external harness.

Can Keiki connect to an MCP server running only on my laptop? Not at a local-only address. For a Keiki-hosted agent, the server needs a remote URL reachable from its sandbox. With your own model loop, your app can call servers it has access to.

Is my MCP server the same endpoint as onkeiki.com/mcp? No. Your MCP server exposes business actions to the runtime. Keiki's setup endpoint lets a coding client configure the agent and its channels.

Which endpoint should an MCP client use to handle new iMessages? Use https://onkeiki.com/api/v1/harness/mcp and authorize an external-harness agent that uses inbox mode. Use https://onkeiki.com/mcp for setup instead.

Can I connect my MCP tools without moving my model to Keiki? Yes. Run the model and MCP client in your app, and connect the app to your Keiki line through an external harness.