day-planner-mcp

day-planner-mcp

An MCP App that renders an interactive dashboard in Claude conversations to unify calendar events, emails, and documents into a single interface. It enables users to manage their daily schedule and perform actions like meeting preparation through bidirectional communication between the UI and the model.

Category
访问服务器

README

day-planner-mcp

An MCP App that renders an interactive day-planning dashboard directly inside Claude conversations — showing your calendar, inbox, and docs unified in one UI with live clock, expandable events, and one-click meeting prep.

Built as a reference implementation of the MCP Apps spec. Works with Claude Desktop and Claude.ai.

What this demonstrates

MCP Apps live inside a single parent MCP. When you need data from Calendar and Gmail and Drive, you can't simply compose three existing MCPs — each is isolated. The common workaround is hitting those APIs directly from the parent.

This implementation takes a different approach: the model itself as the composition layer. The MCP App provides the UI shell and initial data load. updateModelContext then injects structured day data into the conversation, enabling the model to orchestrate follow-up tool calls against whichever MCPs are available. The MCP App is the persistent UI surface; the model is the orchestration engine.

This maps to an insight from Jack Ivers' MCP Apps writeup: the composability gap (MCPs can't call each other) can be bridged by designing the model as the composition layer, with updateModelContext as the handoff mechanism for multi-step workflows.

Features

  • Unified day view — calendar, inbox, and docs in a single dashboard
  • Smart cross-referencing — emails and docs auto-matched to calendar events by attendee and keyword
  • Expandable event cards — click any event to reveal related emails, docs, and meeting prep
  • Priority inbox — important unread emails surfaced with Mark Done / Snooze actions
  • Live clock — real-time, updates every second
  • Bidirectional communication — UI actions fire back to the model via app.callServerTool()
  • updateModelContext — structured day data injected into conversation context after load

Architecture

┌─────────────────────────────────────────────────────┐
│                    Claude (model)                   │
│                                                     │
│  1. User: "Show me my day"                          │
│  2. Model calls load_day_planner tool               │
│  3. MCP fetches Calendar + Gmail + Drive in parallel│
│  4. Cross-references data (emails/docs → meetings)  │
│  5. Returns tool result + MCP App HTML resource     │
│  6. Claude renders interactive dashboard in chat    │
│                                                     │
│  7. User clicks "Start Meeting Prep"                │
│  8. UI fires → model calls handle_action tool       │
│  9. Model gets guidance + calls Gmail/Drive MCPs    │
│  10. Model synthesizes meeting brief in chat        │
└─────────────────────────────────────────────────────┘
day-planner-mcp/
├── src/
│   ├── index.ts              # MCP server (stdio + HTTP transports)
│   ├── mcp-app.ts            # UI logic — App class, render, actions
│   ├── tools/
│   │   └── dayPlanner.ts     # registerAppTool + handle_action tool
│   ├── services/
│   │   └── mockData.ts       # Drop-in replacement for real MCP calls
│   └── types.ts              # Shared domain types
├── mcp-app.html              # UI entry point (bundled by Vite)
└── vite.config.ts            # Single-file bundle config

The MockDataService maps 1:1 to real MCP tool calls — each fetch* method is where you substitute a call to the Gmail MCP, Calendar MCP, or Drive MCP. The aggregation, cross-reference, UI, and action handling are unchanged.

Prerequisites

  • Node.js 18+
  • Claude Desktop or any MCP Apps-compatible host

Setup

git clone https://github.com/ryaker/day-planner-mcp
cd day-planner-mcp
npm install
npm run build

Connecting to Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "day-planner": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/day-planner-mcp/src/index.ts"]
    }
  }
}

Restart Claude Desktop. Ask Claude: "Show me my day" or "Load the day planner".

Connecting to Claude.ai (web)

The web client requires HTTPS. Run the HTTP server and expose via tunnel:

# Terminal 1
TRANSPORT=http npm run serve

# Terminal 2
npx cloudflared tunnel --url http://localhost:3456

Add the generated URL as a custom connector in Claude Settings → Connectors (paid plan required).

Replacing mock data with real integrations

The mock service is a thin wrapper. In production, replace the parallel fetches in src/tools/dayPlanner.ts with real MCP calls, or let the model orchestrate them via updateModelContext:

// Mock (current)
const [events, emails, docs] = await Promise.all([
  svc.fetchCalendarEvents(date),
  svc.fetchEmailThreads(maxEmails),
  svc.fetchRecentDocs(maxDocs),
]);

// Production: model orchestrates calls to
// Google Calendar MCP, Gmail MCP, Drive MCP
// then passes results into the same DayPlannerData shape

Scripts

Command Description
npm run build Build UI (Vite) + compile server (tsc)
npm run build:ui Build UI only → dist/mcp-app.html
npm run build:server Compile TypeScript server only
npm run serve Start server (stdio by default)
TRANSPORT=http npm run serve Start HTTP server on port 3456

MCP Apps spec

Implements the official MCP Apps spec:

  • registerAppTool — declares _meta.ui.resourceUri so hosts can preload the UI
  • registerAppResource — serves bundled HTML at ui://day-planner/app.html
  • App class from @modelcontextprotocol/ext-apps — postMessage bridge between iframe and host
  • app.ontoolresult — receives initial tool result data when UI renders
  • app.callServerTool() — fires user actions back to the server

Contributing

PRs welcome. Key areas:

  • Real MCP integrations (Google Calendar, Gmail, Drive)
  • Additional action types
  • Mobile layout
  • Theme variants

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选