Skip to content

Assistants

Connect an AI assistant to Cozycal over MCP.

Cozycal is a remote MCP server at https://<host>/mcp, signed in to with OAuth. Assistants such as ChatGPT, Claude, Claude Code, Cursor, and VS Code can read the agenda and change blocks, tasks, and the day note. Each change reaches every device live.

  1. Add https://<host>/mcp as a remote MCP server in the assistant and choose OAuth.
  2. The assistant opens /connect. Check the destination, sign in with your passkey, and tap « Autoriser ».
  3. To stop it, open Réglages → Assistants and disconnect the connection. Its next call is refused.
  • Any HTTPS redirect or HTTP loopback redirect on localhost, 127.0.0.1, or [::1] is accepted, including in production. Loopback clients may choose their callback port at authorization time.
  • Local apps are named from their client ID metadata document, with its host shown beside the app name.
  • The tools, their French descriptions and their rules are the TOOLS table in src/worker/assistant.ts. They run inside the Notebook, which writes through the same commit as a device push.
  • The OAuth server is src/worker/oauth.ts, with its tables in D1. Access tokens last an hour. Refresh tokens rotate, and reusing an old one ends that connection.
  • Locally, the MCP Inspector or the MCP TypeScript SDK can connect to http://localhost:5173/mcp with a loopback callback.