MCP: connect Claude (web, Cowork) to a cluster as a custom connector, without the CLI

オープン
#2,098 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

Start by reading the Studio flows that configure clusters and providers; the issue does not name their files or entry points, so locate them in the repository. Verify whether Claude completes OAuth against Harper’s /mcp without a challenge, and decide whether connectors may access the operations part. Done means Studio gives eligible clusters a no-CLI setup path for Claude’s application tools, explains the public-address requirement where relevant, and retains the CLI route for other cases.

索引モデルが issue の本文から書いたものです。

説明

Why

#2011 (PR #2096) connects an AI tool through the harper CLI: harper login on the user's machine, then a local bridge in the client's config. That works for engineers. A reviewer who isn't one asked whether they could instead paste the cluster's MCP address into Claude (web or Cowork) as a custom connector. For non-engineers that is the lowest-friction way in, and today it isn't possible. This was left out of #2096 on purpose.

What a connector needs

A Claude custom connector signs in with OAuth against the MCP server itself. Harper's built-in MCP server has no OAuth of its own, but the @harperfast/oauth plugin can act as the authorization server for it:

  • With mcp.enabled: true, on a Harper that has server.registerBearerValidator (first tagged in v5.4.0-alpha.1), the plugin registers its token check with Harper, so Harper's own /mcp accepts the plugin's tokens with no custom route (oauth docs/mcp-oauth.md "Option A").
  • No per-cluster registration with Anthropic. claude.ai identifies itself with a Client ID Metadata Document (client_id = https://claude.ai/oauth/mcp-oauth-client-metadata, per HarperFast/oauth#199), and the plugin accepts those by default (docs/mcp-oauth.md#L33).
  • Per-cluster sign-in provider setup is needed. The plugin sends people to a configured provider (GitHub, Google, Okta, …) to log in, and redirectUri must be the cluster's public origin plus /oauth/callback (docs/getting-started.md#L27). So each cluster needs a provider app (or a shared one listing each cluster's callback) and its client id and secret.
  • Each login has to become a Harper user. The token's subject must resolve to an active Harper user with a role, either by provisioning matching users or by mapping identities in an onLogin hook (docs/mcp-oauth.md#L69-L72).

Gaps found in Harper

  1. Only the application part can be reached this way. Harper skips the plugin's token check on the operations server (security/auth.ts#L350: hasActiveValidators = !request.isOperationsServer && …). A connector could use the application part (mcp.application: tables and resources), not the operations part (admin commands). That may be the right limit; it should be a stated decision.
  2. Harper's /mcp doesn't challenge. It answers a request with no token as an anonymous session, and its 401 carries no WWW-Authenticate: Bearer resource_metadata=… header (docs/mcp-oauth.md#L73-L79). A client that waits for that challenge before starting OAuth never signs in. Unverified: whether Claude's connector looks up /.well-known/oauth-protected-resource on its own.

Open questions

  • Does Claude's connector complete sign-in against Harper's /mcp today (gap 2), or does Harper need to send the challenge?
  • Should a connector ever reach the operations part (gap 1)?
  • Who sets this up on Fabric: a Studio page that configures the plugin and provider per cluster, Fabric provisioning it, or docs only?
  • Self-managed clusters: the connector reaches the server from Anthropic's side, not the user's machine, so the address must be public. Verify, and say so where Studio shows it.

Done when

A non-engineer can follow steps in Studio to add a cluster to Claude as a custom connector, sign in through a browser, and use the application part's tools, with no CLI. Studio shows that path only where the cluster can serve it, and keeps the harper login route for everything else.

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Epic: HarperFast/harper#2102 (MCP server & OpenAPI schema generation).

主要言語
TypeScript
スター
5
フォーク
4
平均マージ
2日 13時間
マージ済み PR(30日)
60

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HarperFast/studio のほかの issue

HarperFast/studio の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。