feat(dashboard): OpenCode MCP 配置改用原生 Streamable HTTP,移除 mcp-remote 中转;bump 0.5.11
All checks were successful
Secrets MCP — Build & Release / 检查 / 构建 / 发版 (push) Successful in 6m10s
Secrets MCP — Build & Release / 部署 secrets-mcp (push) Successful in 1m36s

This commit is contained in:
2026-04-07 09:03:46 +08:00
committed by voson
parent 59084a409d
commit dfe282095c
3 changed files with 10 additions and 14 deletions

2
Cargo.lock generated
View File

@@ -2065,7 +2065,7 @@ dependencies = [
[[package]] [[package]]
name = "secrets-mcp" name = "secrets-mcp"
version = "0.5.10" version = "0.5.11"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"askama", "askama",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "secrets-mcp" name = "secrets-mcp"
version = "0.5.10" version = "0.5.11"
edition.workspace = true edition.workspace = true
[[bin]] [[bin]]

View File

@@ -577,20 +577,16 @@ function buildSecretsConfigText(apiKey, encKey) {
return lines.length < 3 ? wrapped : lines.slice(1, -1).join('\n'); return lines.length < 3 ? wrapped : lines.slice(1, -1).join('\n');
} }
/** OpenCode: local stdio bridge to Streamable HTTP MCP (mcp-remote --transport http-only). */ /** OpenCode: native Streamable HTTP transport (no mcp-remote bridge needed). */
function buildOpencodeEntry(apiKey, encKey) { function buildOpencodeEntry(apiKey, encKey) {
return { return {
type: 'local', type: 'remote',
command: [ enabled: true,
'npx', '-y', 'mcp-remote', url: BASE_URL + '/mcp',
BASE_URL + '/mcp', headers: {
'--header', 'Authorization': 'Bearer ' + apiKey,
'Authorization: Bearer ' + apiKey, 'X-Encryption-Key': encKey
'--header', }
'X-Encryption-Key: ' + encKey,
'--transport',
'http-only'
]
}; };
} }