Skip to main content
Glama

agentdraft-mcp — 面向 AgentDraft 的 MCP 服务器

PyPI License: MIT

一个 MCP 服务器,将 AgentDraft —— 面向 AI 代理的运维 API,提供收件箱、无冲突日历和审计工具 —— 以一组工具的形式暴露出来,任何支持 MCP 的 AI 客户端都可以调用。

如果你的代理运行时是 Claude Desktop、Claude Code、Cursor、 Cline、OpenAI Agents SDK 应用或任何其他 MCP 主机,都可以使用本服务器。该服务器是 agentdraft Python SDK 的轻量封装 —— 与 REST API 和语言 SDK 具有相同的认证、相同的错误、相同的语义。

安装

pip install agentdraft-mcp

需要 Python 3.10+ 以及来自 AgentDraft 控制台的有效 avs_live_… 代理密钥。

Related MCP server: Labradoc MCP Server

升级

pip install -U agentdraft-mcp

发布说明:https://agentdraft.io/changelog

配置你的 MCP 客户端

agentdraft-mcp 已发布在 PyPI 上,因此安装后,下面的 JSON 配置 即可在任何 MCP 主机上立即生效 —— 无需额外下载。

Claude Desktop / Claude Code —— JSON 配置(推荐)

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 Windows/Linux 上的对应文件:

{
  "mcpServers": {
    "agentdraft": {
      "command": "agentdraft-mcp",
      "env": {
        "AGENTDRAFT_API_KEY": "avs_live_..."
      }
    }
  }
}

Cursor / Cline / 通用 stdio 主机

{
  "mcpServers": {
    "agentdraft": {
      "command": "python",
      "args": ["-m", "agentdraft_mcp"],
      "env": {
        "AGENTDRAFT_API_KEY": "avs_live_..."
      }
    }
  }
}

如需针对开发后端进行本地开发,还需设置 AGENTDRAFT_BASE_URL=http://localhost:8080

Claude Desktop —— .mcpb 桌面扩展(拖放)

每个版本还会在 GitHub Releases 上发布一个 .mcpb 桌面扩展包。将 agentdraft-mcp.mcpb 拖入 Claude Desktop → 设置 → 扩展,然后粘贴你的 avs_live_… API 密钥 —— 无需编辑 JSON,也无需 pip install

工具

工具

用途

whoami

确认 API 密钥,并返回代理的身份、优先级、作用域以及所有者的 timezone

get_availability

列出在 [start, end) 时间段内对调用代理开放的时段

create_hold

暂时保留一个时段(30 秒 TTL);可选的 title / invitee

release_hold

释放一个保留时段,以便其他代理可以认领它

commit_booking

最终确定预订 —— 原子比较并交换;可选的 title / invitee

cancel_booking

取消调用代理拥有的已提交预订

所有时间均为 ISO 8601 字符串(2026-06-01T14:00:00Z)。所有写入 工具都接受 idempotency_key 以便安全重试。create_holdcommit_booking 还接受可选的 titleinvitee{name, email, notes}),用于记录该时段是为谁预留的 —— 会在控制台中显示给所有者。

冲突如何呈现

当两个代理竞争同一个时段时,恰好只有一个获胜。落败的 代理会收到一个结构化的 outranked 负载 —— 而不是字符串错误:

{
  "error": "outranked",
  "winning_booking_id": "bkg_…",
  "winning_agent_id": "agt_…",
  "winning_agent_priority": 1,
  "your_priority": 3,
  "message": "Your booking was outranked. Read winning_agent_id and propose an alternate slot rather than retrying."
}

你的代理应基于此进行分支处理并提出替代方案,而不是重试 同一个时段。

与 AgentDraft SDK 的区别

Python/TS SDK

MCP 服务器

调用方

你编写的应用代码

AI 客户端(Claude Desktop 等)

传输

直接 HTTPS 到 api.agentdraft.io

MCP 主机与此进程之间的 stdio

认证

Client(api_key=…)

AGENTDRAFT_API_KEY 环境变量

语义

相同

相同

错误

类型化的 Python 异常

工具结果中的结构化 JSON

当你自己编写代理时,请使用 SDK。当别人的代理运行时(Claude Desktop、Cursor、Cline、 通用 MCP 主机)需要代表用户调用 AgentDraft 而无需自定义代码时,请使用此 MCP 服务器。

链接

安全

发现漏洞?请参阅 SECURITY.md不要为安全报告 打开公开问题。

贡献

请参阅 CONTRIBUTING.mdryabinski-labs/agentdraft-mcp 是 AgentDraft 私有应用仓库中某个目录的公开镜像 —— 问题和拉取请求会在那里被阅读,并通过下一次发布同步合并回来。

许可证

MIT —— 请参阅 LICENSE

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryabinski-labs/agentdraft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server