发布

  • 2.1.3 72cffad0dc

    [OPIK-7020] [SDK] feat: configure Comet-hosted MCP server with local fallback (#7201)

    frostbyte_neo 发布于 2026-06-25 12:49:51 +00:00

    • [OPIK-7020] [SDK] feat: configure Comet-hosted MCP server with local fallback

    opik configure / opik mcp configure now prefer the Comet-hosted MCP
    server (HTTP + browser OAuth) when the configured deployment runs one,
    falling back to the local uvx opik-mcp server otherwise. The choice is
    made by probing the deployment's OAuth authorization-server metadata
    endpoint, so a deployment that gains the server later is picked up with
    no code change.

    • detection: probe /.well-known/oauth-authorization-server/opik; reuse
      the already-loaded config's TLS setting (no re-read).
    • spec/install: add a remote (HTTP) server spec and connection mode;
      --local-server forces the uvx fallback.
    • opik mcp status + opik configure status: report the active Opik
      config and each AI assistant's MCP registration, flagging drift from
      ~/.opik.config. Rendering (rich) is isolated in a dedicated view module,
      separate from command orchestration and from the status data layer.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    • fix(mcp): address review feedback on MCP configure/status
    • setup_mcp_server: make check_tls_certificate and force_local_server
      keyword-only with defaults so the original positional call pattern keeps
      working (backward-compatible public API).
    • detection: narrow the probe's exception handling to httpx/OS/JSON errors
      so KeyboardInterrupt/SystemExit and real bugs propagate; fix docstring
      grammar and drop environment-specific wording.
    • status: branch on the recorded transport so an SSE registration is
      labeled "Hosted (SSE)" instead of being reported as HTTP + OAuth.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

    下载附件