个人生活管理协议服务器

一个连接AI助手与Day Keeper个人生活管理API的MCP服务器,提供日历、任务、联系人、购物清单等管理功能。

  • by DayKeeperApp
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 DayKeeperApp/day-keeper-mcp

使用说明

日托中心主任mcp

一个MCP(模型上下文协议)服务器,将AI助手连接到 日间看护人 个人生活管理API。作为a建造 学习项目,展示MCP的全部功能——工具、资源和提示。

特性

工具(约30个动作)

域 工具 描述
日历 calendar-list, calendar-create, calendar-update, calendar-delete, event-list, event-get, event-create, event-update, event-delete, events-for-range 具有重复支持的完整日历和事件管理
任务 project-list, project-create, project-update, task-list, task-get, task-create, task-update, task-complete, task-delete, task-assign-category, task-remove-category 任务和项目分类管理
人们 person-list, person-get, person-create, person-update, person-add-contact, person-add-address, person-add-date 联系人管理,包括方法、地址和重要日期
购物 shopping-list-list, shopping-list-get, shopping-list-create, shopping-item-add, shopping-item-update, shopping-item-delete 购物清单和物品管理
空间 space-list, space-get, space-add-member, space-update-member-role 多租户空间和会员管理
同步 sync-pull 通过同步协议拉取最近的更改

资源(~12个只读数据源)

  • 静态列表: daykeeper://spaces, daykeeper://calendars, daykeeper://projects, daykeeper://categories, daykeeper://event-types
  • 动态模板: daykeeper://space/{spaceId}, daykeeper://calendar/{calendarId}, daykeeper://event/{eventId}, daykeeper://task/{taskId}, daykeeper://person/{personId}, daykeeper://shopping-list/{listId}
  • 架构引用: daykeeper://schema/entities

提示(6个交互模板)

提示 描述
daily-planning 用日历事件和打开的任务计划你的一天
weekly-review 回顾本周的成就并提前计划
meeting-prep 与背景和与会者一起为特定会议做准备
shopping-assistant 交互式构建和管理购物清单
contact-lookup 查找并总结联系方式
upcoming-birthdays 检查联系人中即将到来的重要日期

技术栈

工具 目的
包子 运行时、包管理器、测试运行器
TypeScript 语言(严格模式)
@模型上下文协议/sdk MCP TypeScript官方SDK
黄道带 工具输入和API响应的模式验证
生物群系 Linter和格式化器
布置 版本管理器和任务运行器
左钩 Git挂钩并行执行

快速开始

先决条件

  • 布置 安装
  • 正在运行的Day Keeper API实例

安装

# Install Bun via mise
mise install

# Install dependencies
bun install

# Copy environment config
cp .env.example .env

配置

编辑 .env 使用您的Day Keeper API详细信息:

DAY_KEEPER_API_URL=http://localhost:8080
DAY_KEEPER_TENANT_ID=your-tenant-uuid

跑

# Start in stdio mode (default)
mise run dev

# Start in HTTP mode
mise run dev-http

# Open MCP Inspector for interactive testing
mise run inspect

配置

变量 必填 默认 描述
DAY_KEEPER_API_URL 是 - Day Keeper API的基本URL
DAY_KEEPER_TENANT_ID 是 -- 租户UUID X-Tenant-Id 头球
DAY_KEEPER_API_KEY 否 -- 不记名代币 Authorization 头球
MCP_TRANSPORT 没有 stdio 运输: stdio 或 http
MCP_HTTP_PORT 没有 3001 使用HTTP传输时的端口
DAY_KEEPER_DEFAULT_SPACE_ID 否 -- 工具的默认空间ID
DAY_KEEPER_DEFAULT_TIMEZONE 没有 UTC 日期操作的默认时区
LOG_LEVEL 没有 info 日志记录级别: debug, info, warn, error

连接到客户

克劳德代码

添加 ~/.claude/mcp_servers.json:

{
  "day-keeper": {
    "command": "bun",
    "args": ["run", "/path/to/day-keeper-mcp/src/index.ts"],
    "env": {
      "DAY_KEEPER_API_URL": "http://localhost:8080",
      "DAY_KEEPER_TENANT_ID": "your-tenant-uuid"
    }
  }
}

克劳德桌面

添加 claude_desktop_config.json:

{
  "mcpServers": {
    "day-keeper": {
      "command": "bun",
      "args": ["run", "/path/to/day-keeper-mcp/src/index.ts"],
      "env": {
        "DAY_KEEPER_API_URL": "http://localhost:8080",
        "DAY_KEEPER_TENANT_ID": "your-tenant-uuid"
      }
    }
  }
}

发展

# Run tests
mise run test

# Type-check
mise run typecheck

# Lint
mise run lint

# Lint with auto-fix
mise run lint-fix

# Interactive MCP Inspector
mise run inspect

看 docs/DEVELOPMENT.md 查看完整的开发人员指南。

建筑

看 docs/ARCHITECTURE.md 对于完整的架构文档, 包括:

  • MCP服务器设计与传输策略
  • DayKeeper API映射(GraphQL与REST)
  • 实体分组和工具设计理念
  • 错误处理和测试策略

美国存托凭证

ADR 决定
0001 FastMCP上的官方@modelcontextprotocol/sdk
0002 stdio默认值,可流式传输HTTP可选
0003 使用手写GraphQL查询的直接HTTP
0004 面向领域的独立工具(共约30个)
0005 bun:使用分层模拟进行测试

许可证

麻省理工学院