Token导航 LogoToken导航TokenDH.com
Focusmate MCP logo
浏览器工具stdio官方级别未说明来源级核验

Focusmate MCP

MCP Server

playwright

Focusmate MCP服务器是一个允许Claude预订、取消和查询Focusmate监督会话的服务,适用于需要时间管理和协作的用户。

工具数

4

提示词数

0

GitHub Stars

2

资源数

0
时间管理TypeScriptClaude协作工具Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

goodgravy

提供方

goodgravy

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx playwright install chromium

详细介绍

Focusmate MCP服务器

MCP(模型上下文协议)服务器,使Claude能够预订、取消和查询Focusmate责任会话。

特性

  • 预订会议 -为特定日期和时间安排Focusmate会议
  • 取消会话 -按ID取消现有会话
  • 列出会话 -查询日期范围内即将举行和过去的会话
  • 交互式身份验证 -基于浏览器的安全登录,具有cookie持久性

安装

# Clone the repository
git clone https://github.com/goodgravy/focusmate-mcp.git
cd focusmate-mcp

# Install dependencies
npm install

# Build
npm run build

# Install Playwright browsers
npx playwright install chromium

配置

克劳德桌面

添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):

{
  "mcpServers": {
    "focusmate": {
      "command": "node",
      "args": ["/path/to/focusmate-mcp/build/index.js"]
    }
  }
}

替换 /path/to/focusmate-mcp 安装的实际路径。

API密钥(用于list_sessions)

要使用 list_sessions 工具,您需要Focusmate API密钥:

  1. 首选 焦点设置
  2. 滚动到API部分并生成API密钥
  3. 创建配置文件:
mkdir -p ~/.focusmate-mcp
echo '{"apiKey": "your-api-key-here"}' > ~/.focusmate-mcp/config.json
chmod 600 ~/.focusmate-mcp/config.json

用法

初始身份验证

在预订或取消会议之前,请向Focusmate进行身份验证:

Use the focusmate_auth tool to log in

这将打开一个浏览器窗口,您可以在其中登录Focusmate。登录后,您的会话将自动保存。

可用工具

focusmate_auth

打开浏览器窗口登录Focusmate。Cookie已保存以备将来使用。

参数:

  • force (布尔值,可选):即使存在有效Cookie,也强制重新身份验证

例子:

Authenticate with Focusmate

book_session

预订Focusmate责任会议。

参数:

  • startTime (字符串,必填):会话开始的ISO 8601日期时间
  • duration (字符串,可选):会话持续时间-“25”、“50”或“75”分钟(默认值:“50”)

例子:

Book a 50-minute Focusmate session for tomorrow at 2pm

注意:会议必须在15分钟的时间范围内开始(例如,14:00、14:15、14:30、14:45)。

cancel_session

取消现有的Focusmate会话。

参数:

  • sessionId (string,必填):要取消的会话的ID

例子:

Cancel my Focusmate session with ID abc123

list_sessions

列出某个日期范围内的Focusmate会话。

参数:

  • startDate (字符串,必填):日期范围的开始(ISO 8601)
  • endDate (字符串,可选):日期范围结束(默认为从startDate开始的7天)

例子:

Show my Focusmate sessions for this week

错误代码

代码含义解决方案
AUTH_EXPIRED会话Cookie已过期运行 focusmate_auth 重新登录
SLOT_UNAVAILABLE请求的时隙已占用请选择其他时间
SESSION_CONFLICT您当时已经有一个会话取消现有会话或选择其他时间
INVALID_TIME时间与有效的15分钟时段不匹配请使用类似于:00、:15、:30或:45的时间
SESSION_NOT_FOUND会话ID不存在请检查会话ID list_sessions
CONFIG_ERROR未配置API密钥将API密钥添加到 ~/.focusmate-mcp/config.json
AUTOMATION_FAILED浏览器自动化错误检查屏幕截图 ~/.focusmate-mcp/screenshots/

文件位置

  • Cookie: ~/.focusmate-mcp/cookies.json
  • 配置: ~/.focusmate-mcp/config.json
  • 截图: ~/.focusmate-mcp/screenshots/

发展

# Run in development mode
npm run dev

# Run tests
npm test

# Type check
npm run lint

故障排除

“身份验证已过期”错误

focusmate_auth 再次登录。Focusmate会话通常在几个小时不活动后过期。

预订失败,无明显错误

检查中的屏幕截图 ~/.focusmate-mcp/screenshots/。当自动化失败时,它会捕获屏幕截图,这可以帮助诊断UI更改或意外状态。

list_sessions的“未配置API密钥”

list_sessions 该工具使用Focusmate的官方API,这需要一个API密钥。预订和取消操作使用浏览器自动化,只需要来自的Cookie focusmate_auth.

浏览器未打开进行身份验证

确保安装了Playwright浏览器:

npx playwright install chromium

局限性

  • 只读API:Focusmate的官方API仅支持读取数据。预订和取消使用浏览器自动化,如果Focusmate更改其UI,则可能会中断。
  • 速率限制:API限制为每分钟100个请求。浏览器自动化自然较慢,不应该达到极限。
  • 会话持续时间:仅支持25、50和75分钟的会话(Focusmate的标准选项)。

许可证

麻省理工学院

目录标签

目录标签

时间管理TypeScriptClaude协作工具本地部署会话调度自动化

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

playwright

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP