# Connect your MCP server to iMessage

Put your product in iMessage with Keiki by giving an AI agent the tools of the MCP server you already run.

[View imessage-mcp-agent on GitHub](https://github.com/Mail-0/imessage-mcp-agent)

## How do I connect my MCP server to iMessage?

1. Deploy the repo: click **Deploy to Render** in the [README](https://github.com/Mail-0/imessage-mcp-agent) (or `git clone https://github.com/Mail-0/imessage-mcp-agent && cd imessage-mcp-agent && npm install`) and set `OPENAI_API_KEY` and `MCP_SERVER_URL` (plus `MCP_SERVER_TOKEN` if your MCP server needs one).
2. Point a Keiki agent at it: `npx @onkeiki/cli init --dispatch-url https://your-app.example.com/keiki/turn`, then copy `KEIKI_SIGNING_SECRET` from `.env` into your host's environment and redeploy.
3. [Attach an iMessage line](https://onkeiki.com/docs/channels#imessage-lines) to the agent (or use the shared test line with its join code) and text it. The agent answers with your MCP server's tools.

Your code, your model, your servers. Keiki only handles the channels.

## Details

- Stack: Hono, Node.js, TypeScript, Vercel AI SDK, @ai-sdk/mcp, Render
- Channels: iMessage
- Docs: [/docs/external-harness](https://onkeiki.com/docs/external-harness)
- Guide: [How do I connect my MCP server to iMessage?](https://onkeiki.com/content/how-do-i-connect-my-mcp-server-to-imessage)
