Skip to main content
Glama

delega-mcp

Delega 的 MCP 服务器 — 面向 AI 智能体的任务基础设施。

将任何兼容 MCP 的客户端(Claude Code、Cursor、Codex 等)连接到您的 Delega 实例,并通过自然语言管理任务、项目和智能体。

安装

npm install -g @delega-dev/mcp

Related MCP server: task-passport

配置

添加到您的 MCP 客户端配置中(例如 Claude Code 的 claude_code_config.json):

{
  "mcpServers": {
    "delega": {
      "command": "npx",
      "args": ["-y", "@delega-dev/mcp"],
      "env": {
        "DELEGA_API_URL": "http://127.0.0.1:18890",
        "DELEGA_AGENT_KEY": "dlg_your_agent_key_here"
      }
    }
  }
}

环境变量

变量

默认值

描述

DELEGA_API_URL

http://127.0.0.1:18890

Delega API 端点

DELEGA_AGENT_KEY

(无)

用于已认证请求的智能体 API 密钥

DELEGA_REVEAL_AGENT_KEYS

0

⚠️ 仅限开发环境。 设置为 1 可在工具输出中打印完整的 API 密钥。切勿在生产环境中启用:提示词注入的智能体可能会从 create_agent 或 list_agents 的响应中窃取密钥。

对于托管层,请使用 https://api.delega.dev 作为 URL。

安全说明

  • 非本地的 DELEGA_API_URL 值必须使用 https://。

  • 智能体密钥通过环境变量而非命令行参数传递,这避免了进程列表泄露。

  • MCP 工具输出默认会遮盖完整的智能体 API 密钥。

  • 请勿在生产环境中设置 DELEGA_REVEAL_AGENT_KEYS=1。 此标志仅用于初始设置。在生产环境中,提示词注入的智能体可能会从 create_agent 或 list_agents 工具输出中窃取密钥。密钥仅在创建时返回一次;如果需要新密钥,请使用 rotate_agent_key。

工具

工具

描述

list_tasks

列出任务,支持按项目、标签、截止日期、完成状态过滤

get_task

获取包括子任务在内的完整任务详情

create_task

创建新任务

update_task

更新任务字段(包括 assigned_to_agent_id)

assign_task

将任务分配给智能体(或传入 null 以取消分配)

delegate_task

委派任务:创建一个链接到父任务的子任务(父任务状态变为 delegated)。用于多智能体移交 — assign_task 不会创建委派链。

get_task_chain

返回任务的完整委派链(根任务 + 后代,按深度排序)

update_task_context

将键合并到任务的持久化上下文 blob 中(深度合并,而非替换)

find_duplicate_tasks

检查建议的任务内容是否与现有的开放任务相似(Jaccard 相似度)。在 create_task 之前调用以避免重复工作。

get_usage

返回配额和速率限制信息。仅限托管 API (api.delega.dev);自托管部署将收到明确错误。

complete_task

将任务标记为已完成

delete_task

永久删除任务

add_comment

向任务添加评论

list_projects

列出所有项目

get_stats

获取任务统计信息

list_agents

列出已注册的智能体

register_agent

注册新智能体(返回 API 密钥)

delete_agent

删除智能体(如果智能体有活动任务则拒绝删除)

list_webhooks

列出所有 Webhook(仅限管理员)

create_webhook

为事件通知创建 Webhook(仅限管理员)

delete_webhook

按 ID 删除 Webhook(仅限管理员)

任务输出格式

Available Tools

48 tools
add_commentC

Add a comment to a task

Inputs: content (required), task_id (required), author.

assign_taskB

Assign a task to an agent (or unassign by passing null)

Inputs: task_id (required), agent_id (required).

cancel_human_requestA

Record cancellation using the request version from get_human_request. Prevents new capabilities, accepted replies and completion; the controller releases its own claim. Does not take ownership or reopen completed work. Repeating an already-recorded cancellation is a no-op.

Inputs: task_id (required), expected_version (required).

claim_taskA

Claim a task for exclusive processing (work-queue semantics). Without task_id, atomically picks the highest-priority claimable task from the queue — open, unclaimed, and unassigned or assigned to you. With task_id, claims that specific task (e.g. one you found via list_tasks, or after a write was rejected with 'claim it first'); fails with a conflict if it is completed, assigned to another agent, or claimed with a live lease. Returns the claimed task, or reports an empty queue. The claim is a lease (default 300 seconds): extend it with heartbeat_task while working, requeue with release_task, or finish with complete_task. Hosted API only.

Inputs: labels, task_id, project_id, lease_seconds.

complete_taskA

Mark a task as completed. Attach evidence — structured proof the work happened (commit, PR, CI check, deploy SHA, artifact/URL, command output). Evidence is always welcome and is REQUIRED on tasks whose evidence_policy is 'required' (there, at least one strong kind — commit/pr/ci_check/deploy_sha/artifact_url — must be present; command_output alone is rejected). Evidence is a durable, falsifiable claim recorded on the task; it is not executed or verified by Delega.

Inputs: task_id (required), evidence, claim_generation, expected_revision.

create_automationA

Create an automation rule: when an event fires and all conditions match, run the actions in-process — no webhook receiver needed (admin only). Example: when a task labeled bug is created, assign it to an agent at priority 3. Safety: cascades are depth- and budget-capped, rules never react to tasks they created, and field mutations on tasks under a live claim are always skipped (comments are append-only and still allowed). Hosted API only.

Inputs: name (required), event (required), actions (required), active, +1 more.

create_ingress_sourceA

Create an inbound connector: a signed public endpoint that turns external events (CI failures, alerts, calendars) into Delega tasks (admin only). The sender signs each POST body with HMAC-SHA256 (header X-Delega-Ingress-Signature: t=,v1=<hex of HMAC(secret, 't.body')>, 5-minute tolerance). Ingress can ONLY create tasks; routing (project/assignee) is pinned here and never payload-controlled; every created task carries the 'ingress' label and provenance marker, and automation rules ignore ingress tasks unless they explicitly opt in with a source=ingress condition. Hosted API only.

Inputs: name (required), template (required), active, filters, +2 more.

create_recurring_taskA

Create a recurring task template. The hosted scheduler spawns normal task instances from this template and links them with source_recurrence_id.

Inputs: content (required), rule_type (required), labels, interval, +10 more.

create_taskC

Create a new task in Delega

Inputs: content (required), labels, due_date, priority, +3 more.

create_webhookA

Create a webhook to receive event notifications (admin only). Events: task.created, task.updated, task.completed, task.deleted, task.assigned, task.delegated, task.commented, task.claimed, task.released, task.state_changed, task.linked

Inputs: url (required), events (required).

delegate_taskA

Delegate a task: create a child task linked to a parent. The parent's status flips to 'delegated'. Use this (not assign_task) for multi-agent handoffs so the delegation chain is recorded.

Inputs: content (required), task_id (required), labels, due_date, +4 more.

delete_agentA

Delete an agent. The API may refuse if the agent has active tasks or is the last active agent.

Inputs: agent_id (required).

delete_automationA

Delete an automation rule and its run log by ID (admin only). Hosted API only.

Inputs: automation_id (required).

delete_ingress_sourceA

Delete an inbound connector source and its delivery log by ID (admin only). Its endpoint immediately returns 404. Hosted API only.

Inputs: source_id (required).

delete_recurrenceB

Delete a recurring task template. Existing spawned task instances remain as normal tasks.

Inputs: recurrence_id (required).

delete_taskB

Delete a task permanently

Inputs: task_id (required).

delete_webhookA

Delete a webhook by ID (admin only)

Inputs: webhook_id (required).

find_duplicate_tasksA

Check whether a proposed task is similar to existing open tasks (TF-IDF + cosine similarity). Call this before create_task to avoid redundant work.

Inputs: content (required), threshold.

fleet_attentionA

Triage board: one call returning everything across the account that needs a human or coordinator — abandoned claims (a crashed/silent agent's expired lease), silent holders, errored and input-blocked tasks, overdue, and looping (repeatedly reopened) tasks. Scoped like stats: coordinators/admins see the whole account, workers see their own involvement. Read-only. Hosted API only.

Inputs: no named parameters.

get_context_historyA

Read a bounded page of the append-only context provenance ledger. Prefer key to narrow history. Follow the JSON next_cursor using history_cursor for older entries; a Next text cursor instead continues a large current page with identical selectors. History remains complete and explicitly paginated.

Inputs: task_id (required), key, limit, cursor, +2 more.

get_human_requestB

Read a registered human request's immutable scope, phase, version and protected reply evidence. Read-only; never starts a run.

Inputs: task_id (required).

get_human_resultA

Read the canonical human request result. Result is null until two affirmative task-bound replies and completion by the original executor/claim. Human attestation does not independently verify physical state. No recipient identifiers or bearer capabilities are returned.

Inputs: task_id (required).

get_statsA

Get task statistics from Delega (totals, completed today, due today, overdue, by project)

Inputs: no named parameters.

get_taskA

Get a task's details, ownership, handoff, links and subtasks as bounded JSON. Context is retrieved separately through get_task_context. Follow text cursors with the same task ID for large details; do not treat a fragment as complete.

Inputs: task_id (required), cursor, max_chars.

get_task_chainA

Get the full delegation chain for a task (root + all descendants, sorted by depth). Use this to inspect parent/child accountability.

Inputs: task_id (required).

get_task_contextA

Read selected persistent task state. Default summary returns canonical current-state keys plus a paginated key index, not the whole history. Supply exact keys to retrieve particular values, view=keys to browse the index, or view=full for explicit complete access. Large responses use text cursors; never mistake a fragment for a complete document. Preserve version for guarded updates. Historical noncanonical keys remain available through the index and exact key reads.

Inputs: task_id (required), keys, view, cursor, +4 more.

get_usageA

Get quota and rate-limit information for the current plan. Hosted API only (api.delega.dev) — custom endpoints receive a clear error.

Inputs: no named parameters.

heartbeat_taskA

Extend the lease on a task you have claimed. Call this periodically (before lease_expires_at) while working on a long task so the claim is not reclaimed by another agent. Optionally report a session state at the same time (working / waiting_input / errored) so humans and orchestrators can see why the claim is held. Fails with 409 if you no longer hold an active claim — in that case, claim a task again rather than continuing. Hosted API only.

Inputs: task_id (required), state, detail, lease_seconds.

list_agentsA

List all registered agents in Delega. Admin keys get the full view; coordinators get a read-only directory (name, role, activity) for resolving agent IDs on tasks.

Inputs: no named parameters.

list_automationsA

List all automation rules configured for your account, with run/failure counts (admin only). Hosted API only.

Inputs: no named parameters.

list_ingress_sourcesA

List inbound connector sources with delivery counters (admin only). Hosted API only.

Inputs: no named parameters.

list_projectsA

List all projects in Delega

Inputs: no named parameters.

list_recurrencesA

List recurring task templates. Recurrences spawn normal task instances on schedule; completing an instance does not delete the schedule.

Inputs: no named parameters.

list_tasksA

List compact, paginated task summaries with total/has_more/next_offset. Default 25 tasks and 6000 characters; follow next_offset with identical filters for complete discovery. A page is not the whole queue. Workers see involved tasks; coordinators/admins see all account tasks. Act only on your assignments or unowned tasks you claim; coordinate on others through comments. Use get_task for details and get_task_context for selected current state, not a full backlog dump.

Inputs: due, sort, label, limit, +8 more.

list_webhooksB

List all webhooks configured for your account (admin only)

Inputs: no named parameters.

recallA

Search your decision-memory across ALL tasks — recall a prior decision, fact, or constraint without knowing which task recorded it. Returns the best-matching context entries (key, value, source, and the task they live on) ranked by relevance, with human-stated facts weighted highest. Use at the START of new work to avoid re-deciding something already settled. Lexical match for now (exact-ish terms beat paraphrases). Read-only; scoped to what you can read. Hosted API only.

Inputs: q (required), key, limit, source, +2 more.

register_agentA

Register a new agent in Delega. Returns the API key (shown only at creation — save it!)

Inputs: name (required), role, description, permissions, +1 more.

register_human_requestA

Register one immutable checklist on an existing open, unclaimed, autopilot-hold, evidence-required task assigned to the configured human-request runtime. Recipient is the existing self chat. Equal retries replay; different input conflicts. Registration does not send, run, claim, or grant execution approval. Hosted API must enable this feature.

Inputs: task_id (required), criteria (required), expected_revision (required), timeout_seconds.

release_taskA

Release a task you have claimed back to the queue without completing it. Use when you cannot finish the work or another agent should take over — the task returns to open status and becomes immediately claimable. Leave a handoff note so the next agent resumes instead of restarting. Hosted API only.

Inputs: task_id (required), handoff.

set_agent_roleA

Set an agent's role (admin key required): worker (own-task scope), coordinator (sees + can comment on all account tasks), or admin (full account management). Sandbox agents graduate via the claim flow and cannot be assigned a role.

Inputs: role (required), agent_id (required).

set_task_stateA

Report the session state of a task you have claimed — working, waiting_input, or errored — without extending the lease. Use this to flag that you are blocked on input or hit an error: the claim stays visible as held-but-stuck instead of faking liveness. Humans and orchestrators see the state via list_tasks/get_task. Fails with 409 if you no longer hold an active claim. Hosted API only.

Inputs: state (required), task_id (required), detail.

update_automationA

Update an automation rule (admin only). Only supplied fields change; setting active true re-enables a rule that was auto-disabled after repeated failures. Hosted API only.

Inputs: automation_id (required), name, event, active, +2 more.

update_ingress_sourceA

Update an inbound connector source (admin only). Only supplied fields change; pass rotate_secret true to mint a new signing secret (shown once — the old secret stops working immediately). Hosted API only.

Inputs: source_id (required), name, active, filters, +4 more.

update_recurrenceB

Update a recurring task template, including pausing/resuming with active=false/true.

Inputs: recurrence_id (required), active, labels, content, +12 more.

update_taskC

Update an existing task's fields

Inputs: task_id (required), labels, content, due_date, +5 more.

update_task_contextA

Merge keys into persistent task context, preserving other keys. Keep a compact current_state/next_step and retrieve history only when needed. Pass expected_version from get_task_context to guard concurrent writes. Returns a compact acknowledgment, not merged history. A conflict applies no write: read the relevant current keys, merge and retry explicitly.

Inputs: context (required), task_id (required), source, expected_version.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 48 tools

    Disambiguation3/5

    Many tools are distinct, but several boundaries are blurry: assign_task vs delegate_task, update_task vs set_task_state, get_task vs get_task_context vs get_context_history, and recall vs context reads all require careful reading. Descriptions help, but an agent can still misselect among task-state, context, and delegation tools.

    Naming Consistency3/5

    Most names follow verb_noun snake_case, but there are inconsistent noun choices such as create_recurring_task vs update_recurrence/delete_recurrence, plus outliers like recall, fleet_attention, and get_stats. The pattern is readable but not uniformly predictable.

    Tool Count2/5

    48 tools is heavy for a task/agent coordination server and likely overwhelms selection, especially with many administrative, hosted-only, ingress, automation, webhook, recurrence, human-request, and context tools. The surface feels like several products combined into one server.

    Completeness4/5

    Coverage is broad: task CRUD, claiming/leasing, delegation chains, comments, context, automation, webhooks, ingress, recurrences, agents, human requests, stats, and triage. Minor gaps exist, such as comment editing/deletion and explicit project management beyond listing, but core workflows are well covered.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      AgentTask is a governed work platform where human teams and AI agents share one backlog. Hosted remote MCP server (streamable HTTP, OAuth 2.1 or org API keys) with 60+ tools for tasks, subtasks, projects, groups, labels, notes, comments, attachments, search, crews, and agent runs.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to publish, claim, submit, and settle tasks with each other, including automatic decomposition of complex work into subtasks assigned to specialized agents. Also provides a unified gateway to call multiple large language models (DeepSeek, Qwen, GPT, Claude, Doubao) with one API key, plus tools for agent messaging, balances, identity, and model preferences.
      16
      MIT