deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
通过官方 Notion MCP 服务器,用 OAuth 2.0(授权码 + PKCE)把 DeepSeek Harness(dsh)连接到 Notion。完成一次性浏览器授权后,你的 dsh agent 就能通过标准的 mcp__notion__* 工具搜索、读取和写入 Notion 的页面、数据库与评论。
中文 | English
装上 dsh-notion-mcp 后,你的 dsh agent 即可直接读写 Notion。你只需要在浏览器里完成一次授权,剩下的事插件都会自动打理:跑完整套 OAuth 2.0(授权码 + PKCE)流程、把 token 安全保存到 dsh 的凭据层、在后台静默刷新保持有效,并把 Notion 的搜索、页面、数据库、评论等工具以 mcp__notion__* 的形式挂载给 agent。
client_id 或密钥。dsh notion login 打印授权 URL,并在 127.0.0.1:53007 等待回调。invalid_grant 终态处理 —— 过期或已被轮换作废的 refresh token 绝不重试;插件会清掉它并提示你重新授权。让 dsh agent 总结一段技术架构并写入 Notion:

写好的 Notion 页面:

dsh notion login
│ 1. OAuth 发现(RFC 9470 / RFC 8414)
│ 2. 动态客户端注册(RFC 7591)
│ 3. PKCE S256 + state → 授权 URL
▼
浏览器批准 → 回调到 127.0.0.1:53007
│ 4. 用 code(加 PKCE verifier)换取 token
▼
token 落盘 → Notion MCP 挂载为 mcp__notion__*
启动时插件会读取已存 token 并挂载 MCP 客户端;临近过期时在后台刷新(串行化,避免并发重放已轮换的 refresh token)。
dsh plugin --profile web add dsh-notion-mcp
把 web 换成你运行 agent 所用的 profile(web、headless、tui 等)。
notion 命令需要在一个「最小 profile」里运行——像 web 这类 UI app 会独占自己的命令行,不会把 notion 转发给插件。token 是全局存储的,所以在任意最小 profile 里授权一次,所有安装了本插件的 profile 都能直接使用:
dsh plugin --profile notion add dsh-notion-mcp
dsh --profile notion notion login
该命令会注册一个动态 OAuth 客户端,在 127.0.0.1:53007 起一个临时本地 HTTP 服务,并打印授权 URL。在浏览器里打开并批准后,Notion 会重定向到 http://127.0.0.1:53007/callback,插件校验 state、用 code(加 PKCE verifier)换取 token、落盘并挂载客户端。
授权完成后,Notion 工具即以 mcp__notion__* 形式可用。
dsh plugin --profile web remove dsh-notion-mcp
| 键 | 默认值 | 说明 |
|---|---|---|
mcpUrl |
https://mcp.notion.com/mcp |
Notion MCP 服务器 URL |
port |
53007 |
本地 OAuth 回调端口(127.0.0.1) |
ctx.credentials)以单条原子记录存储,绝不提交到本仓库;也不嵌入任何 client_id 或密钥——客户端在运行时通过动态客户端注册。invalid_grant(refresh token 过期或被轮换作废),插件会清掉已存 token 并停止重试——用 dsh notion login 重新授权即可。dsh)npm install
npm run build # tsdown → lib/
npm run typecheck # tsc --noEmit
npm test # vitest
MIT © 2026 mingzeng
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。