铸渊: MCP Server 添加 /config 路由 — 一键获取连接配置

This commit is contained in:
bingshuo 2026-05-14 00:48:24 +08:00
parent 19a03b8f89
commit 7e452c6113

View File

@ -898,6 +898,20 @@ app.get('/health', (req, res) => {
});
});
// MCP 配置获取(无需认证)— 用于 WorkBuddy 换账号后一键获取配置代码
app.get('/config', (req, res) => {
res.json({
mcpServers: {
guanghulab: {
url: 'https://guanghulab.com/mcp',
headers: {
Authorization: 'Bearer ' + ACCESS_KEY,
},
},
},
});
});
// ─── 启动前自检测 ─────────────────────────────────────────────
async function selfCheck() {
const result = { giteaOk: false, authOk: false, vaultOk: false, errors: [] };