What you'll build: A personal AI assistant that has access to Notion, Gmail, and Google Calendar. It remembers things across sessions, drafts emails in your voice, briefs you each morning, and runs entirely in Claude Code on your machine.
Prerequisites
- Claude Code installed: run
npm install -g @anthropic-ai/claude-codein your terminal - Node.js 18+ installed (
node --versionto check) - A Notion account (free tier works)
- A Google account (for Gmail + Calendar)
- 20 minutes
The file structure
Your agent lives in a folder inside ~/.claude/agents/. Here is what you will build:
~/.claude/agents/my-assistant/
├── CLAUDE.md ← agent instructions (the brain)
├── .mcp.json ← MCP server connections
├── memory/
│ └── MEMORY.md ← persistent memory across sessions
└── .claude/
└── skills/ ← installed skills
Step 1: Create the directory
Open your terminal and run:
mkdir -p ~/.claude/agents/my-assistant/memory
mkdir -p ~/.claude/agents/my-assistant/.claude/skills
cd ~/.claude/agents/my-assistant
Step 2: Create your CLAUDE.md
This is the brain of your agent. It tells Claude who it is, what it has access to, and how to behave.
Create a file called CLAUDE.md inside your agent folder. Copy this template and fill in the My Context section with your own details:
# My Personal Assistant
You are my personal AI assistant. You manage my inbox, calendar,
Notion workspace, and memory. Be proactive, not just reactive.
## Connected Tools (MCP)
- **Notion** -- read and write pages, databases, tasks
- **Gmail** -- read inbox, draft replies, manage labels
- **Google Calendar** -- check availability, create events, morning briefing
- **Memory** -- read from memory/MEMORY.md at session start.
Write back anything worth keeping.
## What You Do
### Daily Briefing (say "good morning" or "what's on today")
1. Pull today's calendar events
2. Flag urgent emails (action needed, time-sensitive)
3. Surface any Notion tasks or content due today
4. Output a clean briefing: schedule first, then email flags, then tasks
### Email Management
- Triage inbox by priority: action needed, FYI, can delete
- Draft replies in my voice: direct, warm, no fluff
- Never send without my explicit confirmation
### Calendar
- Always check availability before suggesting times
- Create events with full details: title, description, location, invitees
- Alert me to upcoming deadlines from Notion
### Notion
- Add ideas and notes to my workspace with the right tags
- Update tasks and projects
- Log anything significant to my daily log
### Memory
- At session start: read memory/MEMORY.md for context
- When I say "remember this": append it to memory/MEMORY.md
- Format for new entries:
## YYYY-MM-DD - Topic
[What to remember. Short and specific.]
## My Context
[Your name, role, current projects, working style, preferences]
## Rules
- Never send emails or create calendar events without my confirmation
- Always read memory before starting a session
- Use bullet points for briefings. Use prose only for email drafts.
- If unsure, ask. Do not guess.
Step 3: Set up your memory file
Create memory/MEMORY.md. This file persists across every session. Your agent reads it at the start of each conversation and writes back anything you tell it to remember.
# My Memory
Read this at the start of every session.
---
## Profile
[Your name, role, what you are currently focused on]
## Preferences
[How you like to work, communication style,
tools you use daily, things that annoy you]
## Ongoing Projects
[Add entries here as projects start]
## Contacts
[Key people: name, role, relationship]
## Session Notes
[Agent appends here. Format: ## YYYY-MM-DD - Topic]
Tip: Fill in your Profile and Preferences now before your first session. The more context you give it, the better it behaves from day one.
Step 4: Install skills
Skills teach your agent specific capabilities. These are the seven I recommend starting with:
anthropics-claude-plugins-official-claude-automation-recommender(Anthropic) — analyzes your setup and recommends automations: hooks, subagents, MCP serversanthropics-claude-plugins-official-mcp-integration(Anthropic) — guides you through adding and configuring MCP server connectionsanthropics-skills-internal-comms(Anthropic) — drafts emails and messages in your voicecomposiohq-awesome-claude-skills-connect(Composio) — connects your agent to Gmail, Notion, Slack, GitHub, and 1,000+ other servicesdavila7-claude-code-templates-agent-memory-mcp(davila7) — persistent, searchable memory architecture so your agent never forgetsshareai-lab-learn-claude-code-agent-builder(shareai-lab) — teaches your agent how to design and build other agents when you want to expandaffaan-m-everything-claude-code-autonomous-agent-harness(affaan-m) — adds scheduled tasks, cron jobs, and autonomous operation to your agent
Install all 7 skills at once:
SKILLS_DIR=~/.claude/agents/my-assistant/.claude/skills
npx -y @lobehub/market-cli skills install anthropics-claude-plugins-official-claude-automation-recommender --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install anthropics-claude-plugins-official-mcp-integration --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install anthropics-skills-internal-comms --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install composiohq-awesome-claude-skills-connect --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install davila7-claude-code-templates-agent-memory-mcp --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install shareai-lab-learn-claude-code-agent-builder --dir $SKILLS_DIR
npx -y @lobehub/market-cli skills install affaan-m-everything-claude-code-autonomous-agent-harness --dir $SKILLS_DIR
Step 5: Set up MCP connections
MCP (Model Context Protocol) is how your agent connects to external services like Notion, Gmail, and Calendar.
Notion
Get your Notion API token:
- Go to notion.so/my-integrations
- Click New integration
- Name it (e.g. "My Assistant") and select your workspace
- Under Capabilities, enable: Read content, Update content, Insert content
- Click Save and copy the Internal Integration Token (starts with
ntn_orsecret_)
Connect your pages to the integration:
For every Notion page or database you want the agent to access:
- Open the page in Notion
- Click ... (top right) → Connections → select your integration
- Repeat for each page (the agent cannot see pages you have not shared with it)
Create .mcp.json in your agent folder:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer YOUR_TOKEN_HERE\", \"Notion-Version\": \"2022-06-28\"}"
}
}
}
}
Replace YOUR_TOKEN_HERE with your integration token.
Gmail + Google Calendar
Option A: Via Claude.ai (easiest, no extra setup)
If you use Claude.ai, Claude Code picks up your connectors automatically as of v2.1.46+.
- Go to claude.ai → Settings → Integrations
- Connect Gmail and Google Calendar
- Open a new Claude Code session: both tools will be available automatically
Option B: Via Composio (for more control)
- Sign up at composio.dev and get your API key
- Connect Gmail and Google Calendar in the Composio dashboard
- Add to your
.mcp.jsonundermcpServers:
"gmail": {
"command": "npx",
"args": ["-y", "composio-mcp@latest", "start", "--tools=gmail"],
"env": {
"COMPOSIO_API_KEY": "YOUR_COMPOSIO_KEY_HERE"
}
}
Verify everything is connected:
cd ~/.claude/agents/my-assistant
claude mcp list
You should see notion (and gmail if using Option B) in the list.
Step 6: First run
cd ~/.claude/agents/my-assistant
claude
Your first session: type this to confirm the setup is working:
"Read my memory and brief me on what you know about me."
The agent will read MEMORY.md and confirm what it knows. If it has access to Notion, it will confirm that too.
Step 7: What to tell your agent
Morning briefing:
"Good morning, what's on today?"
Inbox triage:
"Triage my inbox and flag anything that needs a response."
Add to Notion:
"Add a note to my Notion: [your idea here]"
Remember something:
"Remember that I prefer meeting calls in the afternoon."
Draft an email:
"Draft a reply to [name]'s email about [topic]. Keep it short."
Expand your agent later:
"Search the LobeHub marketplace for skills that can help me manage my Shopify store."
Time check: This setup takes about 20 minutes end to end. The Notion token takes the longest (5 min). Everything else is copy-paste.

