mcpoauth

A skill to diagnose and fix WorkBuddy MCP connector connection failures. Use it to handle MCP connector issues such as periodic disconnections, ‘not in index’ indexing errors, or unexpected OAuth authorization pop-ups (for example, recurring disconnections of connectors like Dida365/Tick or flomo).

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mcpoauth" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-58f573b615a069607aa3639f7b413ec346d917f0fee39676a2a0d9e8d73efa06. Verify the upstream source and version against https://skillhub.cn/skills/user_0d52066a/mcp-connection-doctor before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A skill to diagnose and fix WorkBuddy MCP connector connection failures. Use it to handle MCP connector issues such as periodic disconnections, ‘not in index’ indexing errors, or unexpected OAuth authorization pop-ups (for example, recurring disconnections of connectors like Dida365/Tick or flomo).

0 Downloads

Introduction source: third_party · user_0d52066a · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: MCP 连接医生(诊断与修复掉线/OAuth弹窗)
description: 诊断并修复 WorkBuddy MCP 连接器连接故障(如滴答/dida365、flomo 反复掉线、报 "not in index"、意外弹出 OAuth 授权窗)。当某个 MCP 连接器周期性断开、返回索引错误、或触发非预期的 OAuth 弹窗时,应使用本技能。
slug: mcp-connection-doctor
version: 1.0.0
agent_created: true
displayName: MCP 连接医生:诊断与修复连接器掉线/OAuth弹窗
summary: 诊断并修复 WorkBuddy MCP 连接器反复掉线、报 not in index、误弹 OAuth 授权窗的问题,附滴答/flomo 兜底直连方案。
tags: [mcp, troubleshooting, workbuddy, dida365, flomo]

MCP 连接医生

诊断 MCP 连接器反复断连的根因,并给出修复路径。适用于 dida365、flomo 等基于 HTTP 的 MCP server,也适用于任何"能初始化一次但随后报 not in index / 索引丢失 / 工具列表为空"的连接器。

触发信号

  • 用户报告 MCP 工具"时好时坏""总断""要重连"
  • 调用 MCP 工具报 not in index、索引错误、会话丢失
  • 连接器管理页反复弹出 OAuth 自动授权请求(本应是 token 版)
  • 同一连接器在多次操作中时而可用时而不在可用工具列表里

诊断流程(按顺序)

1. 读取当前连接器配置

读取 ~/.workbuddy/mcp.json,逐条核对出问题的连接器:

  • type 字段值(重点:http vs streamableHttp)
  • 是否带 transport 字段
  • url 是裸域名还是带 /mcp /sse 路径
  • headers.Authorization 是否为写死的 Bearer <token>(token 版)还是 OAuth 残留

2. 对比一个稳定可用的同类配置

例如 flomo 通常是最稳的参照:

  • flomo = "type": "streamableHttp" + "transport": "streamable-http" + 裸 Bearer token 若问题连接器是 "type": "http"(无 transport),协议声明不匹配是首因——服务端是 Streamable HTTP,但客户端按老式 http 模式建会话,会话保活/断线恢复对不上,周期性掉线。

3. 直连验证 token 是否有效(排除凭证过期)

关闭沙箱(走主机网络)用 curl 直连该服务的 OpenAPI 或 MCP 端点,带同一个 Bearer token:

TOKEN=$(python -c "import json,os;print(json.load(open(os.path.expanduser('~/.workbuddy/mcp.json')))['mcpServers']['<name>']['headers']['Authorization'])")
curl -s -o /dev/null -w "%{http_code}\n" "<openapi-or-mcp-url>" -H "Authorization: $TOKEN"
  • 返回 200 → token 有效,问题在连接层(协议/会话),不是凭证。
  • 返回 401/403 → token 失效或被踢,需刷新/换独立 token。

4. 探测 MCP 端点实际协议

向 url 发 initialize 请求,看服务端自报的协议与返回格式:

curl -s -i -X POST "<mcp-url>" -H "Authorization: $TOKEN" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"1.0"}}}'
  • 返回 application/json + 会话头 → 标准 Streamable HTTP,确认服务端要的是 streamable-http。
  • 若响应头含 oauth-protected-resource 元数据,说明端点声明 OAuth,但实际仍接受静态 Bearer(token 版可用)。

5. 修复协议错配

将问题连接器的配置改为与稳定配置对齐:

  • "type": "streamableHttp"
  • 新增 "transport": "streamable-http"
  • url 与 headers(token)保持不变 改完不会自动生效。

6. 重启并验证握手

指导用户:

  1. 打开连接器管理页,对该连接器点 Trust(启用新配置);
  2. 完全退出并重启 WorkBuddy 客户端(非仅点重连),让客户端按新协议重建会话。 重启后做完整 streamable-http 握手验证(建立会话并复用同一会话 cookie 发 tools/list):
    curl -s -c /tmp/cj.txt -X POST "<mcp-url>" -H "Authorization: $TOKEN" \
    -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"1.0"}}}'
    curl -s -b /tmp/cj.txt -X POST "<mcp-url>" -H "Authorization: $TOKEN" \
    -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

    若 tools/list 用同一会话返回工具列表,说明服务端会话保持正常。

7. 客户端内最终确认

开新对话(让客户端重新加载工具列表),直接调用一个该连接器的 MCP 工具(如 list_projects / memo_search)。成功返回即证明根治。

8. 排查次因:多设备同 token 互踢

若协议已修仍偶发断,确认是否有其他设备/AI(如另一台机器、共享 AI)使用同一个 token 连接同一服务。滴答等服务的 OAuth/token 常有单点会话约束,同 token 多端会互踢。给每个设备/AI 分配独立 token。

关键铁律(来自用户约定)

  • flomo / dida365 等第三方 MCP 一律 token 版(Bearer 写死),绝不走 OAuth 弹窗。
  • 弹窗 = OAuth 判据:只要还弹 MCP 自动授权窗,说明仍走 OAuth(旧实例未清),须删旧连接→完全重启→重新 token 配置。
  • dida365 必须 type: streamableHttp + transport: streamable-http;旧 type: "http" 必周期性掉会话。flomo 已是该配置,作参照。
  • token 版凭证静态、可见可排查;OAuth 会刷新凭证、双设备互斥、难排查。

兜底方案(连接器仍不稳定时)

滴答等服务的 OpenAPI 直连(关闭沙箱走主机网络)稳定可用,可作为 MCP 断连时的兜底:

  • 端点 https://api.dida365.com/open/v1,Bearer <token> 直连
  • 可用:POST /task 建、POST /task/{id} 改、置 status=2 删、GET /project/{id}/data 列任务
  • 不可用:DELETE 动词、GET /task/{id}、/task/{id}/move(404);移动任务须「隐藏旧+目标清单新建」
  • 收集箱真实 projectId = inbox1011787789

注意事项

  • curl 探测务必 dangerouslyDisableSandbox: true(直连需主机网络),否则沙箱拦截。
  • 读取 token 用 python 解析 mcp.json,避免 shell 变量展开路径问题(用 os.path.expanduser)。
  • 修复后必须完全重启客户端,仅"重连"按钮不足以让新协议生效。
  • 本 skill 由 Write 工具直接落盘创建(当前环境 SkillManage 不可达);若后续 SkillManage 可用,仍可用其修改/删除。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 针对 MCP 连接器反复掉线、OAuth 弹窗等具体技术痛点提供完整解决方案
  • 包含滴答/flomo 等主流服务的兜底直连方案,实用性强
Trigger Precision90/100

Highlights

  • 触发信号清晰覆盖典型故障场景(not in index、周期性断连、OAuth 弹窗)
  • 边界明确,未与其他 Skill 功能重叠
Structure and Standards95/100

Areas to improve

  • 缺少显式 When to Use 章节 Reported severity: Minor

    文档使用'触发信号'替代标准'When to Use'章节

    Recommendation: 建议增加标准'When to Use'章节以提升规范性

Highlights

  • 8 步诊断流程结构清晰,每步含操作指令和判断条件
  • 提供完整可执行的 curl 探测命令示例
Execution Reliability90/100

Highlights

  • 覆盖 token 失效、协议错配、多设备互踢等主要异常场景
  • 提供 OpenAPI 直连兜底方案确保故障时仍有可用路径
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • api.dida365.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.