Files
DeepTutor/web/components/mcp/McpDeploymentList.tsx
Bingxi Zhao (Frank) 740ec413a0 release: v1.5.7
Per-account MCP Services and CLI Apps — the two ways a deployment plugs in
tools DeepTutor never shipped — plus the isolation that makes them safe on a
shared install.

- MCP Services: a 45-entry curated store of hosted servers each account
  installs for itself, OAuth 2.1 (PKCE + dynamic client registration) for the
  servers that require it, static keys held by reference and resolved in memory
  at connect time, stdio refused for self-service. Settings no longer
  configures MCP; /settings/mcp redirects to the store.
- CLI Apps: 101 tools snapshotted from the two CLI-Anything registries.
  Installs are admin-only, the registry's install_cmd is parsed into an argv we
  build rather than executed, npm install scripts are forced off, and 66
  first-party entries are pinned to one reviewed commit. Apps land in
  data/cli-apps, one environment each, mounted read-only into the runner.
- Credentials that authorise a person move to data/system, the one branch the
  exec sandbox never mounts: Codex tokens relocate themselves on first use
  (refusing to follow a symlink), per-user MCP configs and keys land beside
  them.
- Grants gain a cli_apps whitelist with the same deny-by-default posture as
  MCP tools; a per-turn registry view keeps one owner's provider tools out of
  the process-global registry and refuses an unauthorised tool at execute, not
  just in the manifest.
- The composer reports what filled this turn's context window, a gutter rail
  jumps back through long conversations, and the workspace collapses to a
  drawer on small screens.
- The composer keeps focus after sending and across tab switches (#720);
  released images carry provenance and SBOM attestations (#722).

README prose, all ten translated READMEs, and the docs-site pages that named
Settings → MCP are updated to match. Release notes:
assets/releases/ver1-5-7.md
2026-07-31 00:25:48 +08:00

66 lines
2.1 KiB
TypeScript

"use client";
import { Plug } from "lucide-react";
import { useTranslation } from "react-i18next";
import McpStatusBadge from "@/components/mcp/McpStatusBadge";
import type { McpStatusRow } from "@/lib/mcp-api";
/**
* The deployment's own MCP servers, read-only.
*
* They are listed here — on a page about *your* servers — so "which tools do I
* have?" has one answer instead of two. Nothing is editable: these belong to the
* administrator's registry.
*/
export default function McpDeploymentList({
names,
statusRows,
}: {
names: string[];
statusRows: McpStatusRow[];
}) {
const { t } = useTranslation();
if (names.length === 0) return null;
const statusByName = new Map(statusRows.map((row) => [row.name, row]));
return (
<section className="space-y-2">
<div className="flex items-baseline justify-between gap-3">
<h3 className="text-[13px] font-semibold text-[var(--foreground)]">
{t("Provided by this deployment")}
</h3>
<span className="text-[11.5px] text-[var(--muted-foreground)]">
{t("Read-only")}
</span>
</div>
<ul className="overflow-hidden rounded-xl border border-[var(--border)]/60 bg-[var(--card)]/30">
{names.map((name, idx) => {
const row = statusByName.get(name);
return (
<li
key={name}
className={`flex items-center gap-3 px-5 py-3 ${
idx > 0 ? "border-t border-[var(--border)]/50" : ""
}`}
>
<Plug className="h-3.5 w-3.5 shrink-0 text-[var(--muted-foreground)]" />
<span className="min-w-0 flex-1 truncate font-mono text-[13px] text-[var(--foreground)]">
{name}
</span>
<span className="shrink-0 text-[11.5px] text-[var(--muted-foreground)]">
{t("{{count}} tools", { count: row?.tools.length ?? 0 })}
</span>
<McpStatusBadge
status={row?.status ?? "connecting"}
error={row?.error}
/>
</li>
);
})}
</ul>
</section>
);
}