Notion Schedule Agent

Notion Schedule Agent

An MCP server that turns your Notion task list into an AI-optimized daily schedule, reading tasks with page content and priorities from an Eisenhower matrix, and writing a clean schedule back to Notion.

Category
访问服务器

README

Notion Schedule Agent

An MCP server that turns your Notion task list into an AI-optimized daily schedule.

Every night you pull tomorrow's tasks from your "Upcoming Tasks" database and manually slot them into half-hour blocks. This agent does that for you — it reads your tasks (including page body content like workout plans and watchlists), understands priorities via the Eisenhower matrix, respects fixed-time commitments parsed from task names, and writes a clean schedule back to Notion.

Demo

1. Tasks in Notion with Eisenhower priorities and weekday assignments

Upcoming Tasks database

2. The agent reads full page content for smarter scheduling

Task detail with body content

3. One command generates an AI-optimized daily schedule

CLI schedule generation

4. Schedule written back to Notion as a half-hour block table

Schedule written to Notion

5. Built as an MCP server — usable from Claude Desktop, Cursor, or any MCP client

MCP server code

How It Works

┌──────────────────┐       ┌──────────────────┐       ┌──────────────────┐
│  Upcoming Tasks  │──────▶│   AI Scheduler   │──────▶│  Schedule Today  │
│  (Notion DB)     │       │   (OpenAI)       │       │  (Notion Table)  │
│                  │       │                  │       │                  │
│  • Task name     │       │  • Reads page    │       │  6:00  Free time │
│  • Priority      │       │    body content  │       │  9:00  LeetCode  │
│  • Weekday       │       │  • Parses times  │       │  9:30  Standup   │
│  • Page content  │       │  • Sorts by      │       │ 10:00  Deep work │
│                  │       │    priority      │       │  ...             │
└──────────────────┘       └──────────────────┘       └──────────────────┘

Priority System (Eisenhower Matrix)

Status Meaning Scheduling
Imp Urg Important & Urgent Peak focus hours first
Urg ~Imp Urgent, not important Soon, lighter slots
Imp ~Urg Important, not urgent Focused time available
In Progress Currently being worked on Dedicated blocks
~Imp ~Urg Neither important nor urgent Fill remaining gaps
Pinned Recurring/daily tasks Spread across the day

Key Features

  • Deep content reading — reads the body of each task page (bullet lists, paragraphs) so the AI understands what "Gym - upper body" actually involves
  • Time-locked tasks — parses times from task names (e.g. "Team standup 9:30am") and locks them to the correct slot
  • Eisenhower priority — schedules Important & Urgent tasks in peak focus hours, lighter tasks in the evening
  • Two-step workflow — preview the schedule before writing it to Notion
  • MCP server — any MCP client can invoke plan_day, get_tasks, and apply_schedule

Setup

1. Install dependencies

pip install -r requirements.txt

2. Create a Notion Integration

  1. Go to notion.so/my-integrations
  2. Click New integration, give it a name (e.g. "Schedule Agent")
  3. Copy the Internal Integration Secret — this is your NOTION_API_KEY

3. Share your Notion pages with the integration

  1. Open your Upcoming Tasks database in Notion
  2. Click ...Connections → select your integration
  3. Do the same for your Getting Things Done page (the one with "Schedule Today")

4. Get your database and page IDs

  • Open Upcoming Tasks in Notion. The URL looks like: https://notion.so/workspace/YOUR_DB_ID?v=... Copy the 32-character hex ID.

  • Open Getting Things Done page. Same format — copy the page ID.

5. Configure environment

cp .env.example .env

Edit .env with your keys:

NOTION_API_KEY=ntn_your_key_here
OPENAI_API_KEY=sk-your_key_here
NOTION_TASKS_DB_ID=your_database_id
NOTION_SCHEDULE_PAGE_ID=your_page_id

Usage

CLI Mode

# List tomorrow's tasks
python -m src.cli tasks tomorrow

# Generate and apply a schedule for tomorrow
python -m src.cli plan tomorrow

# Plan a specific day
python -m src.cli plan monday

The plan command shows a preview and asks for confirmation before writing to Notion.

MCP Server Mode

Run the server for use with Claude Desktop, Cursor, or any MCP client:

python -m src.mcp_server

Claude Desktop configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "notion-schedule-agent": {
      "command": "python",
      "args": ["-m", "src.mcp_server"],
      "cwd": "/path/to/notion-mcp-v2",
      "env": {
        "NOTION_API_KEY": "ntn_...",
        "OPENAI_API_KEY": "sk-...",
        "NOTION_TASKS_DB_ID": "...",
        "NOTION_SCHEDULE_PAGE_ID": "..."
      }
    }
  }
}

Available MCP Tools

Tool Description
get_tasks(day) List tasks for a given day from Notion
plan_day(day) Generate an AI-optimized schedule (preview)
apply_schedule() Write the previewed schedule to Notion

day accepts "today", "tomorrow", or a weekday name like "Monday".

Tech Stack

  • Python — core language
  • Notion API via notion-client — reads task database + page content, writes schedule table
  • OpenAI (gpt-4o-mini) — intelligent scheduling with priority awareness
  • MCP (Model Context Protocol) via mcp SDK — exposes tools to any MCP client

Project Structure

src/
  config.py        — environment config, time slots, priority mapping
  notion_ops.py    — Notion API operations (read tasks + page content, write schedule)
  scheduler.py     — OpenAI-powered schedule generation
  mcp_server.py    — MCP server entry point with tool definitions
  cli.py           — standalone CLI for direct usage

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选