pub struct ClientConfigs {
pub claude_code_json: String,
pub cursor_json: String,
pub cline_json: String,
pub omp_json: String,
pub opencode_json: String,
pub generic_json: String,
pub claude_cli: String,
}Expand description
4 种客户端配置 + 一个 CLI 一行命令。
所有字段是可直接复制粘贴的最终字符串(JSON 已 pretty-print,CLI 是单行 shell)。
token 形如 ygg_...,已嵌入各片段的 Authorization 头中。
Fields§
§claude_code_json: StringClaude Code(.mcp.json / ~/.claude.json)。注意 type 值是 "http"
(不是 "streamable-http"——Claude Code 用 "streamable-http" 会静默失败/卡在
“connecting”,2026 官方文档明确要求 http)。字段:type,url,headers.Authorization。
cursor_json: StringCursor(~/.cursor/mcp.json)。与 Claude Code 的关键差异:不带 type 字段——
Cursor 按远程 URL 自动识别 streamable-http;仅需 url + headers.Authorization。
cline_json: StringCline(cline_mcp_settings.json)。type: "streamableHttp"(注意驼峰,非 sse),
额外带 disabled / autoApprove 字段。
omp_json: StringOh-My-Pi(项目根 .mcp.json / 全局 ~/.omp/agent/mcp.json 或 ~/.mcp.json)。
omp 的协议字段是 type: "http"(与 Claude Code 同形),不识别 transport /
streamable-http——后者会让 omp 退化为 stdio 并因缺 command 字段报错丢弃。
opencode_json: StringOpenCode(opencode.json 全局 ~/.config/opencode/opencode.json / 项目根)。
关键差异:schema 根键是 mcp(非 mcpServers),远程端点用 type: "remote"
(非 streamable-http),并带 $schema 与 enabled 字段(2026 opencode.ai 官方文档)。
generic_json: String通用原始 JSON:一个 server entry 的纯净形式,供其它兼容客户端粘贴。
claude_cli: StringClaude Code CLI 一行命令:claude mcp add --transport http <name> <url> --header ...。
Trait Implementations§
Source§impl Clone for ClientConfigs
impl Clone for ClientConfigs
Source§fn clone(&self) -> ClientConfigs
fn clone(&self) -> ClientConfigs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more