Connect Claude to CottonDB
Your Mac is the server. Claude connects to it by URL, you approve the connection from a device you already hold, and from then on Claude can read your data and, if you allow it, write to it. Three ways in, one approval flow, five minutes.
Before you start
- CottonDB for Mac is running, with a relay name registered and Remote access dialled. The address it shows in This Mac → Connect is the one you need below.
- Your iPhone, or the Mac itself, is a device your server already admits; that is what approves the request.
- CottonDB is not in Anthropic's connector directory. Add it by URL, as below.
Your server's address
Your Mac's address is shown in CottonDB for Mac. Type its name here to fill the addresses on this page in, or read on with the placeholder.
The addresses on this page are filled in for the name you gave. Check it matches what CottonDB for Mac shows.
https://<your-server>/v1/mcp
Claude on the web and Claude Desktop
- Open Settings → Connectors → Add custom connector. Claude Desktop uses the same settings.
- Name it CottonDB and paste your server's address, the one above ending in
/v1/mcp. Leave the client ID and secret empty: the server registers the client itself. - Claude opens your server's approval page. It has no sign-in form. It shows a short code and a QR code.
- On your iPhone open Settings → Connected AIs → Approve a request, scan or type the code, and approve. Reading is always granted; write access is a checkbox you tick or leave.
- Back in Claude, the connector shows as connected. Start a conversation and ask it for your day.
Claude Code
Register the server, then authenticate from inside a session.
claude mcp add --transport http cotton https://<your-server>/v1/mcp
Run /mcp, choose cotton, then Authenticate. The same approval page opens; approve it from your phone as above.
A script, or a client with no browser
For a cron job or a client that cannot open the approval page, the app can mint a token to paste, from Settings → Connected AIs. It is shown once. Send it as a bearer token on every request to /v1/mcp. It has the scopes you chose when you made it and appears in the same list as every other connection, where it can be revoked.
What Claude sees, and what it does not
Claude gets a tool for every kind of record you keep. Each is annotated as read-only or not, so a client can show you what a call will do before it does it. The first thing a well-behaved session calls is one project, which returns the working context you keep there; the second is your day.
No tool returns a document's password, the value of a stored secret, your alarms, anything in the bin, or your recovery key. Memory accepts only sentences you said. Nothing over MCP erases a note, a journal entry or a screenplay.
What Claude reads passes to Anthropic under Anthropic's terms. Every call is written to an audit table in your database with its arguments redacted, so you can see what was read and when.
Disconnecting
Settings → Connected AIs lists every assistant and token with when it last called. Revoke any of them there. Revocation is immediate; a revoked connection's next call is refused.
If it does not connect
- The approval page does not open. The Mac's relay is not connected, or the address has a typo. CottonDB for Mac shows the address it is answering on.
- "Not approved" after scanning. The code expired. Ask Claude to reconnect and approve the new one.
- Reads work, writes are refused. The write checkbox was left empty at approval. Revoke the connection and approve it again with the write checkbox ticked.