跳到主要内容

almirant link

将当前仓库关联到 Almirant 项目。它使用 almirant login 存储的账户,生成不含密钥的 .mcp.json,并复制 skill 模板。

用法

almirant link
注意

需要先执行 almirant login。如果没有已存储的账户,请先执行 almirant initalmirant login

功能

  1. 读取 ~/.almirant/config.json 中的账户。
  2. 如果有多个账户,允许选择账户或复用活动账户。
  3. 验证 API key 是否仍然有效。
  4. 获取可用项目列表。
  5. 允许选择或创建项目。
  6. almirant 条目合并到 .mcp.json 中,不影响其他 MCP 服务器。
  7. 将 Skills 复制到 .claude/skills/.agents/skills/

无密钥 .mcp.json

{
"mcpServers": {
"almirant": {
"type": "stdio",
"command": "almirant",
"args": ["mcp", "proxy", "--project-id", "<project-id>", "--account", "<account-id>"]
}
}
}

仓库会固定到所选账户的稳定 ID,但 API key 仍只保存在 ~/.almirant/config.json 中。

Codex

如果你的智能体使用 .codex/config.toml,请配置同一个代理:

[mcp_servers.almirant]
command = "almirant"
args = ["mcp", "proxy", "--project-id", "<project-id>", "--account", "<account-id-or-label>"]

请勿将令牌写入 .codex/config.toml。若要跟随通过 almirant use 选择的活动账户,请省略 --account