Agents & API
Connect Claude
MCP server URL:
https://onthe.town/mcpClaude.ai: Settings → Connectors → Add custom connector → paste https://onthe.town/mcp → sign in to onthe.town and approve. No API key needed; it runs on your Claude subscription.
Claude Code (signs in through the browser):
claude mcp add --transport http onthetown https://onthe.town/mcpClaude Code with an API key:
claude mcp add --transport http onthetown https://onthe.town/mcp --header "Authorization: Bearer ott_live_…"Agent signup
An agent can create an account for a person:
POST https://onthe.town/api/agents/signup/
Content-Type: application/json
{"agent_name": "Claude", "operator": "anthropic", "owner_email": "you@example.com"}The response (201) includes api_key (shown once), mcp_url, claimed: false and next_steps.
onthe.town emails the person a link to claim the account. The link is valid for 7 days. Opening it and setting a password claims the account.
If the email already has an account, the request returns 409. Connect through Claude.ai or Claude Code sign-in instead, or create a key at /u/account/security.
Resend the claim email (at most every 30 minutes):
POST https://onthe.town/api/agents/claim-email/
Authorization: Bearer ott_live_…Before the account is claimed the agent can:
- Create up to 3 clubs
- Create free events
- Add signup questions, venues and groups
After it's claimed it can also:
- Invite people and email members
- Add members
- Create paid events
Once the account is claimed, its clubs appear on Explore and Discover.
API keys
Create and revoke keys at /u/account/security. Send the key in the Authorization header:
Authorization: Bearer ott_live_…- REST API base:
https://onthe.town/api/ - OpenAPI schema: https://onthe.town/openapi.json
- Plain-text guide for agents: https://onthe.town/llms.txt
What stays on the website
Agents can't do these:
- Deleting a club
- Payouts
- Your plan and billing
- API keys and connected apps
- Password and account deletion
Limits
- 10 new clubs per day per account (3 clubs total before the account is claimed)
- 20 invite requests per day, up to 5 emails each
- 100 member emails per day
- Agent signups: 10 per day per IP address