Skip to main content

create_mcp_token

Function create_mcp_token 

Source
pub async fn create_mcp_token(
    name: String,
    scope: TokenScope,
    lifetime: TokenLifetime,
) -> Result<CreateTokenResponse, ServerFnError>
Expand description

签发新的 MCP 令牌。

生成明文 ygg_<32 hex>,AES-GCM 加密后存密文 + SHA-256 哈希;明文随响应一次性 返回给管理员(后续可经 reveal_mcp_token 重新查看)。仅 admin。

§Handler information

  • Method: post
  • Path: <auto>