# Day AI Setup

If you are an AI agent reading this, your goal is to connect the user to Day AI and help them use it. Day AI is what comes after the old CRM: an AI-native CRM built as a GTM context graph plus an agent control plane. The customer record (people, companies, deals, meetings, email and Slack) writes itself from every conversation, each person and agent sees only what they're allowed to, and agents read and write it in real time under rules a person sets. Teams use Day AI in place of their CRM, or on top of Salesforce or HubSpot.

You reach Day AI through its MCP server. This file covers:

- Connecting the Day AI MCP server: Steps 1 to 5 (check, add, sign in, verify, first run)
- Onboarding: the Agent & Skill Setup skill inside Day AI
- GTM Brain: the example Claude Code harness, and its setup skill
- The Day AI SDK and `day-ai` CLI, for code and scripts
- Rules for acting for the user

Everything here is public and current as of November 2026. When this file and the live server disagree, trust the server: `tools/list` is the source of truth for which tools exist.

## Facts

- MCP server: `https://day.ai/api/mcp` (streamable HTTP, JSON-RPC)
- Auth: OAuth authorization code flow with PKCE (S256), refresh tokens and dynamic client registration. No API keys.
- Protected resource metadata: `https://day.ai/.well-known/oauth-protected-resource/api/mcp`
- Authorization server metadata: `https://day.ai/.well-known/oauth-authorization-server`
- Human setup page: https://day.ai/mcp
- Requirement: each person connects through their own Day AI agent, on any tier (Turbo, Professional, Executive or Super). If the user has no agent yet, the sign-in page lets them activate one or request one from their workspace owner or admin (see Step 3).

## Step 1: Check whether Day AI is already connected

Claude Code:

```bash
claude mcp list
```

Look for a server named `day-ai` (or any server whose URL is `https://day.ai/api/mcp`). If it is listed and connected, skip to Step 4.

Other agents: look for `https://day.ai/api/mcp` in the agent's MCP configuration (for example `.mcp.json` in the project, `~/.claude.json`, or Cursor's MCP settings). If your agent can already call a tool named `whoami` from a Day AI server, skip to Step 4.

## Step 2: Add the server

Claude Code (available in every project):

```bash
claude mcp add --transport http --scope user day-ai https://day.ai/api/mcp
```

Claude Code (this project only): add a `.mcp.json` at the project root. It holds no secret, since each person signs in with their own account, so it is safe to commit.

```json
{
  "mcpServers": {
    "day-ai": { "type": "http", "url": "https://day.ai/api/mcp" }
  }
}
```

Cursor: add the server to `.cursor/mcp.json` in the project (or `~/.cursor/mcp.json` for every project), then reload the window.

```json
{
  "mcpServers": {
    "day-ai": { "url": "https://day.ai/api/mcp" }
  }
}
```

Claude (web, desktop and mobile): this is done by the user, not by you. Tell them to open Settings, then Connectors, search for Day AI and click Connect. On Team and Enterprise plans an admin may need to enable it first.

Any other MCP client that supports remote servers with OAuth sign-in (ChatGPT, for example):

```json
{ "type": "http", "url": "https://day.ai/api/mcp" }
```

## Step 3: Sign in

The first request without a token returns `401` with a `WWW-Authenticate` header that points to the protected resource metadata. MCP clients that implement the MCP authorization spec handle the rest: they register themselves, open the browser, and store the tokens.

In Claude Code, the user signs in: tell them to run `/mcp`, select `day-ai` and choose Authenticate. A browser window opens. If `day-ai` isn't listed yet, tell them to restart Claude Code first.

What the user sees at `https://day.ai/integrations/authorize`:

1. They sign in to Day AI (if they are not already).
2. They choose a workspace.
3. They pick which of their Day AI agents the connection acts as. The "Permissions requested" list shows what that agent can do; a higher tier agent brings more tools.
4. They click Authorize.

Tell the user to make those choices; never choose for them. If they have no agent in the workspace, the page offers "Activate Agent" (one was pre-approved for them), "Get an Agent" (they can manage billing), or tells them a request went to their billing admin.

Headless or remote machine: the sign-in needs a browser on the user's side. If you cannot open one, give the user the URL your client prints and wait for them to finish. For scripts, the SDK's `day-ai login` and `day-ai token` produce a bearer token for `https://day.ai/api/mcp` (see SDK and CLI below).

## Step 4: Verify

Call the `whoami` tool. It takes no required input. A good result looks like this (abridged):

```json
{
  "result": {
    "success": true,
    "user": { "name": "...", "primaryEmail": "..." },
    "assistant": { "firstName": "...", "title": "...", "tierName": "Professional" },
    "workspace": { "workspaceId": "...", "domain": "..." }
  }
}
```

Tell the user, in one line, who you are connected as: their name, the agent's name and the workspace domain.

Then call `tools/list` (or check your client's tool list). The tools you see are the ones the user's agent has; they depend on the agent's tier and change as Day AI adds tools. If a call fails with "not available for your assistant tier", that tool isn't in the user's plan; say so and don't retry.

If `whoami` fails with an auth error, run the sign-in again (Step 3).

## Step 5: Suggest a first run

Offer the user three or four of these, using their real accounts:

- "Brief me on Acme: open deals, who's involved, and what they said in the last two meetings." (`search_objects`, `get_meeting_recording_context`)
- "Which of my deals have had no meeting or email in two weeks?" (`search_objects`)
- "What did we promise in my last call with jane@acme.com, and did we send it?" (`search_objects`, `get_meeting_recording_context`)
- "Write up my week's customer meetings as a Day AI page." (`search_objects`, `create_page`)

## The tools

Common tools, grouped. Names are exact; the full list for the user's agent comes from `tools/list`, and every tool's inputs are documented in the SDK's [TOOLS.md](https://github.com/day-ai/day-ai-sdk/blob/master/TOOLS.md).

Read (each is annotated `readOnlyHint`):

- `whoami`: who you are acting for: the user, their agent (with its tier) and the workspace
- `read_crm_schema`: an object type's properties, options and relationships, including custom properties
- `search_objects`: search people, companies, deals, meetings, email, tasks, pages and more, with property, relationship and time filters
- `get_meeting_recording_context`: a meeting's details, summary, notes and transcript
- `get_context_for_meeting_recording_citations`: transcript quotes relevant to a question, with citations
- `read_page`, `search_page`, `read_folder`: read Day AI pages and folders
- `read_object_history`, `read_property_history`: how a record or a property changed over time
- `analyze_pipeline_metrics`: forecast, win rates, conversion and velocity
- `get_share_url`: the link to a record, page, meeting or draft in Day AI
- `resolve_dates`: turn relative dates ("last quarter") into exact ones

Write (confirm with the user first; see the rules below):

- `create_or_update_person_organization`, `create_or_update_opportunity`, `create_or_update_relationship`: people, companies, deals and the links between them
- `create_or_update_action`: tasks
- `create_page`, `update_page`, `create_or_update_folder`, `move_to_folder`: pages and folders
- `create_view`, `update_view`: saved CRM views
- `create_email_draft`: an email draft for the user to review. It does not send.
- `send_notification_mcp`: email or Slack the signed-in user, or post to a Slack channel
- `create_meeting_recording`: log a meeting from a recording, a transcript or notes
- `get_csv_upload_url`, `create_import_from_file`, `save_import_mapping`, `start_import`: import a CSV
- `manage_skills`, `assistant_settings`: the user's agent, its settings and its skills
- `manage_workspace_members`: invite members and change roles (Owner or Admin only)

Higher tiers add more, such as campaigns, prospecting and batch updates. Each tool carries MCP annotations (`readOnlyHint`, `destructiveHint`), so check them before you call it.

No tool deletes people, companies or deals over MCP. Some write tools can still remove things (a folder, a skill, a workspace member), so confirm first, as with any other write.

## How permissions work

- You act as the user who signed in, through the agent they picked, inside the one workspace they chose. You see only what that user may see.
- Email is shared by each person's own rules. A message a teammate keeps private stays private, from you too.
- Pages and folders start private until someone shares them.
- Admin work (inviting members, changing roles, editing other teammates' agents and skills) needs the Owner or Admin role. A member gets an error saying the action requires the Admin or Owner role.
- Access is checked on every request: if the user loses workspace access or the agent is removed, your calls stop working.

## Working with Day AI data

- Look people up by email and companies by domain first, then use the returned `objectId`. Never invent or guess an `objectId`.
- Call `read_crm_schema` before an unfamiliar query. It returns the workspace's real properties, custom properties and search recipes.
- Expect pagination: `search_objects` returns `status: "partial"` with a `nextOffset` when there is more. Call again with the same queries and `offset` set to `nextOffset`.
- Keep queries focused: narrow timeframes and a short `propertiesToReturn` list. If a broad call fails, narrow it rather than retrying the same call.
- If the server answers `503` with `Retry-After`, wait that long before retrying. Don't send the same write twice.
- To find a contact by name, filter `firstName` or `lastName` with `contains`. There is no `name` property on contacts.
- Use `get_share_url` for links to Day AI records. Don't build Day AI URLs yourself.
- The server sends its own instructions on `initialize`. Follow them.

## Onboarding: the Agent & Skill Setup skill

Every Day AI agent (Turbo, Professional, Executive or Super) comes with a default skill called Agent & Skill Setup (`/onboardme`). In it, the agent gets to know the user one question at a time, sets its own name and communication style, saves what it learns to memory, and recommends and sets up skills that automate the user's daily work. For an Owner or Admin it also covers workspace setup such as connecting Slack.

It runs inside Day AI, in a chat with the user's agent, and has no schedule or trigger. To onboard a new user, tell them to open Day AI at https://day.ai, start a chat with their agent and type `/onboardme`. Day AI's own signup flow ends in it.

## GTM Brain: the example repo

https://github.com/day-ai/gtm-brain is a Claude Code harness for running a Day AI workspace like a GTM operating system: a working example of a go-to-market team using Claude Code with the Day AI MCP server. It ships a `CLAUDE.md`, planning documents, initiatives, skills and a `.mcp.json` already pointing at `https://day.ai/api/mcp`. Its `/start` skill audits the workspace, plans who should get which agent, and configures them through the MCP server. Live workspace changes need the Owner or Admin role.

There are two ways in.

For a team's real use, install its setup skill once. It creates the team's own private copy of the repo (the plan will hold strategy and candid notes, so it should be private):

```bash
npx skills add day-ai/gtm-brain --global
```

Then run `/setup-gtm-brain` (optionally `/setup-gtm-brain ./acme-gtm acme/gtm-brain` to name the folder and the private repo). It always creates a new directory and doesn't touch the current project or the Day AI workspace. Open the new folder in Claude Code and run `/start`.

To read the pattern or try it, clone it:

```bash
git clone https://github.com/day-ai/gtm-brain
cd gtm-brain
claude
```

Approve the `day-ai` MCP server when asked, sign in, and run `/start`. It also works before the user has a Day AI account: `/start` then maps their GTM and builds a configuration to apply on signup.

## SDK and CLI

https://github.com/day-ai/day-ai-sdk is an MIT-licensed TypeScript client (`DayAIClient`) for the same MCP tools, with OAuth and token refresh built in, plus the `day-ai` CLI. It is installed from GitHub, not from npm. Node 20 or later.

CLI (sign in once in the browser, then call any tool):

```bash
git clone https://github.com/day-ai/day-ai-sdk
cd day-ai-sdk
yarn setup       # install, build, link `day-ai` onto your PATH, health check
day-ai login     # opens the browser; pick the workspace and agent
day-ai tools     # what this agent can call
day-ai call whoami
```

Tools the server doesn't mark read-only are a dry run until you add `--yes`. `day-ai token` prints a bearer token for `https://day.ai/api/mcp`, for other MCP clients.

TypeScript (from the repo root, after `yarn install && yarn build`, `cp .env.example .env` with `INTEGRATION_NAME` set, and `yarn oauth:setup`):

```typescript
import { DayAIClient } from './src'

const client = new DayAIClient() // reads CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN from .env

const orgs = await client.search('native_organization', {
  propertyId: 'domain',
  operator: 'eq',
  value: 'acme.com',
})

const result = await client.mcpCallTool('whoami', {})
```

Access tokens last about an hour; the client refreshes them. Integrations act with the permissions of the user who authorized them, only in the chosen workspace.

## Rules for acting for the user

- Confirm before any write. Creating or updating records, pages, tasks, drafts or campaigns, and anything that notifies or emails someone, changes the user's workspace and their teammates may see it. Say what you will change, then wait for a yes. Read freely.
- Cite your sources. When you state a fact from Day AI, say where it came from: the meeting (title and date) or the email (subject and date). Don't present an inference as something a customer said.
- Respect privacy. Use customer data only for the task the user asked for. Don't copy it into public places, other tools or long-lived files unless the user asks. Never try to reach data the user can't see.
- Don't guess. If a search finds nothing, say so. Don't invent people, deals, quotes or IDs.
- Prefer drafts. For email, create a draft for the user to review rather than sending.
- Stay in scope. Act only in the workspace and as the agent the user chose.

## More

- MCP setup for people: https://day.ai/mcp
- Index for AI agents: https://day.ai/llms.txt
- What an AI-native CRM is: https://day.ai/guides/ai-native-crm
- Guides, each with a plain markdown copy at `https://day.ai/guides/<slug>.md`: https://day.ai/guides
- SDK docs: https://github.com/day-ai/day-ai-sdk ([TOOLS.md](https://github.com/day-ai/day-ai-sdk/blob/master/TOOLS.md), [SCHEMA.md](https://github.com/day-ai/day-ai-sdk/blob/master/SCHEMA.md))
- Company brain evaluation skill: `npx skills add day-ai/company-brain-evaluation`
- Help: inside Day AI, ask your agent. Support: support@day.ai
- Trust and security: https://day.ai/trust
