description: "为Streamable HTTP加入per-request credential-backed Bearer authentication的official MCP client behavior。" kind: "package-reference"
@sparkelf/dsh-plugin-mcp-credentials
English | 中文
概述
该Host plugin保留official MCP connection、reconnect、tool publication、image-result及lifecycle behavior,同时增加一个Streamable HTTP option:bearerTokenRef。Transport会在每次network request前立即resolve该DSH credential,并把current value作为Bearer token发送。
目录
- 使用此软件包
- 模型体验
- 已知限制和延期工作
- 开发备注
使用此软件包
使用与official MCP client相同的stdio或streamable-http configuration。对于credential-backed HTTP,设置bearerTokenRef并compose Credentials;literal headers.Authorization与bearerTokenRef互斥。DataOps会在内部mount该plugin,因此token rotation无需profile remount即可到达下一次MCP request。
模型体验
Credential-backed MCP transport
模型看到什么
模型只看到通过bearerTokenRef认证的当前namespaced MCP tool schemas及其results。Credential references及values不会出现在tool arguments、results、prompts、Session events、manifests或deployment locks中。
Token 影响
Authentication增加零token。MCP tool schemas及calls保留upstream MCP client持有的token effects。
KV Cache 影响
Credential rotation不改变model-visible schemas。Tool discovery或connection loss可能增加或移除schemas,从而改变tool prefix。
已知限制和延期工作
- 仅Bearer authentication:其他HTTP authorization schemes需要proven provider extension point;profile files不得携带literal secret headers。
开发备注
该开发备注是maintainer working context;shipped behavior、limits及rationale以以上sections、package code及linked Agent Note为准。
src/index.ts持有credential resolution及MCP transport composition。Distribution Agent Note记录它作为complete internal DataOps dependency的原因。
- 该package不发布
./invariant companion,因为MCP generation与tool contributions由MCP Client和tool registry观测;该adapter没有independent generation view。