原来的 headers.Authorization: "Bearer ${VAR}" 是字符串模板插值写法,
Codex 官方文档(config.toml 场景)没有支持这种写法,正式字段是
bearer_token_env_var(只放变量名,不放值)。openai/codex#24401 目前
仍在讨论插件级 MCP server 用户密钥配置路径未定案的问题,环境变量注入
是当前唯一可用的路径,README 补充了对应免责声明和排查提示。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVyxoP4cDXeoQ3uAqLcEd2
10 lines
193 B
JSON
10 lines
193 B
JSON
{
|
|
"mcpServers": {
|
|
"huanxi-admin": {
|
|
"type": "http",
|
|
"url": "https://huanxi.office.yixiong-tech.com/admin-mcp/",
|
|
"bearer_token_env_var": "HUANXI_ADMIN_TOKEN"
|
|
}
|
|
}
|
|
}
|