Skip to content

[feature] 一鍵「在 Claude 中連接」:MCP 設定頁按鈕與首頁提示卡 - #90

Merged
YJack0000 merged 1 commit into
mainfrom
feat/connect-claude
Oct 18, 2026
Merged

YJack0000 merged 1 commit into
mainfrom
feat/connect-claude

Conversation

@YJack0000

@YJack0000 YJack0000 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

這張 PR 做了什麼

  • MCP 設定頁:只屬於一個組織時頂端一顆按鈕;多組織時每一列一顆,網址帶該組織的 ?org=,connector 名稱「Pathors Internal (組織名)」。
  • Dashboard 首頁:引導卡片,用目前組織的網址;找不到目前組織就導去 MCP 設定頁。
  • claudeConnectorUrl helper+測試;把 request origin 的邏輯抽成 lib/request-origin.ts。
  • 自己補的文案待看:關閉鈕「關閉」、頂端按鈕下的說明句。

畫面(示意)

internal:MCP 設定頁每個組織一顆在 Claude 中連接按鈕,以及 Dashboard 上方的引導卡片

照分支裡的實際文案畫的示意,不是實機截圖;左邊是設定頁的常駐按鈕,右邊是首頁可關掉的引導卡片。

驗證

tsc、bun run lint、bun test(291 pass)、bun run build 都通過。

共通做法(internal、main-app、pstudio、slides 四個服務一起做)

  • 用 claude.ai 的深層連結 claude.ai/customize/connectors?modal=add-custom-connector&connectorName=…&connectorUrl=…,點下去直接跳出「新增自訂 connector」視窗,名稱和網址已經填好,使用者只要按新增、走一次 OAuth。
  • 第一層:MCP/連線設定頁放常駐的「在 Claude 中連接」按鈕(真的 Claude logo,#D97757),手動網址與指令改成次要。
  • 第二層:登入後的首頁放一張可以關掉的引導卡片,關掉的狀態記在 localStorage pathors.connectClaude.dismissed.v1,storage 壞掉時照樣顯示、不會 crash。
  • 沒有 landing 那一層:pstudio/slides 還沒有對外產品頁,pathors.com 不為 MCP 跳 dialog。

還沒驗證

  • 還沒在瀏覽器裡實際看過(需要登入與後端);dark mode 的按鈕對比待看。
  • 深層連結格式不是 Anthropic 公開文件(參考 Higgsfield 的用法),Team/Enterprise 組織可能要管理員先開放自訂 connector。

@github-actions

Copy link
Copy Markdown

✅ SonarQube Quality Gate passed — pathorsAI_internal

0 open issues on this PR.

@YJack0000
YJack0000 merged commit 376e1d9 into main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants