feat(ui): show both stdio and HTTP mode MCP config in settings
Build and Deploy / build-and-push (push) Successful in 54s

This commit is contained in:
2026-07-27 02:25:48 +08:00
parent 6709c4ed77
commit 334152417b
+27 -6
View File
@@ -290,24 +290,45 @@ export default function Settings() {
</Button>
</div>
<div className="rounded-md border border-[var(--border)] bg-[var(--bg-secondary)] p-3 text-xs leading-5 text-[var(--text-secondary)]">
<div className="mb-1 font-medium text-[var(--text-primary)]">MCP ServerHermes / OpenClaw</div>
<div className="mb-2 font-medium text-[var(--text-primary)]">MCP ServerAI Agent </div>
<p className="mb-2">
OpenAPI REST AI Agent 使 <code className="rounded bg-[var(--bg-tertiary)] px-1">taskpool mcp</code> MCP
Server //
OpenAPI REST AI Agent 使 MCP Server //
</p>
<pre className="overflow-x-auto whitespace-pre-wrap rounded-md border border-[var(--border)] bg-[var(--bg-primary)] p-2 font-mono text-[11px] text-[var(--text-primary)]">{`{
<div className="mb-3 space-y-2">
<div className="rounded border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-2">
<div className="mb-1 text-xs font-medium text-[var(--text-primary)]">stdio </div>
<p className="mb-2 text-[var(--text-muted)]"> Agent 使 taskpool Claude Desktop / Cursor</p>
<pre className="overflow-x-auto whitespace-pre-wrap rounded border border-[var(--border)] bg-[var(--bg-primary)] p-2 font-mono text-[11px] text-[var(--text-primary)]">{`{
"mcpServers": {
"taskpool": {
"command": "taskpool",
"args": ["mcp"],
"env": {
"TASKPOOL_URL": "${window.location.origin}",
"TASKPOOL_TOKEN": "${siteForm.openapi_token || '在设置页生成 OpenAPI Token'}"
"TASKPOOL_TOKEN": "${siteForm.openapi_token || '在设置页生成 Token'}"
}
}
}
}`}</pre>
<p className="mt-2 text-[var(--text-muted)]"> docs/guide/mcp.md skills/taskpool/SKILL.md</p>
</div>
<div className="rounded border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-2">
<div className="mb-1 text-xs font-medium text-[var(--text-primary)]">HTTP </div>
<p className="mb-2 text-[var(--text-muted)]"> Agent 使 URL 访Hermes / OpenClaw</p>
<div className="mb-2 text-[var(--text-muted)]">1. MCP HTTP </div>
<pre className="mb-2 overflow-x-auto whitespace-pre-wrap rounded border border-[var(--border)] bg-[var(--bg-primary)] p-2 font-mono text-[11px] text-[var(--text-primary)]">{`TASKPOOL_URL=${window.location.origin} \\
TASKPOOL_TOKEN=${siteForm.openapi_token || '你的Token'} \\
taskpool mcp --http :8053`}</pre>
<div className="mb-2 text-[var(--text-muted)]">2. Agent </div>
<pre className="overflow-x-auto whitespace-pre-wrap rounded border border-[var(--border)] bg-[var(--bg-primary)] p-2 font-mono text-[11px] text-[var(--text-primary)]">{`{
"mcpServers": {
"taskpool": {
"url": "http://你的服务器:8053/mcp"
}
}
}`}</pre>
</div>
</div>
<p className="text-[var(--text-muted)]"> docs/guide/mcp.md skills/taskpool/SKILL.md</p>
</div>
<h3 className="pt-2 text-sm font-medium text-[var(--text-secondary)]"></h3>
<p className="text-xs text-[var(--text-muted)]"></p>