Mcp Server Celery

io.github.taltal-beep由 GitHub 帳號 taltal-beep 發布v0.1.0更新於 Oct 25, 2026

唯讀的 Celery 除錯:worker、佇列深度和卡住任務的診斷。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Read-only Celery debugging: workers, queue depths and stuck-task diagnosis.

已驗證STDIO僅桌面

概覽

Mcp Server Celery 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Server Celery,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-server-celery

[PyPI] [CI]

An MCP server that lets AI agents debug a running Celery deployment. It checks which workers are alive, what each one consumes, and where messages are piling up — the checks you'd otherwise run by hand with celery inspect and rabbitmqctl every time something gets stuck.

It is read-only by default. Broker passwords are masked in every response, including the broker info that Celery's own inspect stats sends back in plain text.

Works with RabbitMQ (amqp://) and Redis (redis://, rediss://).

Tools

ToolWhat it answers
list_workersWhich workers respond, their pool and concurrency, uptime, prefetch count, tasks processed, and the queues each one listens to.
queue_depthsHow many messages are waiting in each queue and which workers consume it. With no arguments it checks your configured queues plus every queue a live worker consumes.

Coming next: active_tasks, reserved_tasks, scheduled_tasks, task_status, and diagnose_stuck, which cross-references the above to flag queues no worker listens to, tasks routed to queues with no consumer, and workers that stopped responding. See the roadmap.

Install

Requires Python 3.10+ and uv.

bash
uvx mcp-server-celery

Configuration

All configuration is through environment variables.

VariableDefaultPurpose
CELERY_BROKER_URLamqp://guest:guest@localhost:5672//Broker to inspect.
CELERY_RESULT_BACKEND—Result backend (used by task_status, coming in the next release).
CELERY_APP—Import path of your app, e.g. proj.celery:app. Lets the server see your task_queues and routes. CELERY_BROKER_URL still overrides the app's broker if both are set.
CELERY_INSPECT_TIMEOUT1.0Seconds to wait for worker replies. Raise it for large or slow clusters.

CELERY_APP has to be importable, so run the server from your project's directory and environment:

bash
uv run --with mcp-server-celery mcp-server-celery

Connect it

Claude Code

bash
claude mcp add celery -e CELERY_BROKER_URL=redis://localhost:6379/0 -- uvx mcp-server-celery

Cursor

In .cursor/mcp.json:

json
{  "mcpServers": {    "celery": {      "command": "uvx",      "args": ["mcp-server-celery"],      "env": { "CELERY_BROKER_URL": "redis://localhost:6379/0" }    }  }}

Claude Desktop

In claude_desktop_config.json, use the same command, args and env block as Cursor, under mcpServers.

Example

Ask the agent "why are my email tasks not running?" and it can call queue_depths:

json
{  "broker": "amqp://app:****@rabbit:5672//",  "queues": [    { "queue": "celery", "exists": true, "messages": 0, "consumers": 2, "workers_consuming": ["w1@web", "w2@web"] },    { "queue": "emails", "exists": true, "messages": 1843, "consumers": 0, "workers_consuming": [] }  ]}

emails has a backlog and no worker consumes it: the workers were started without -Q emails.

Notes on the data

  • Redis has no notion of consumers, so consumers is null; use workers_consuming, which comes from the workers themselves. Redis also deletes a queue's key once it is empty, so a drained queue shows "messages": 0, "exists": null.
  • RabbitMQ checks use a passive declare, so the server never creates a queue. A queue that doesn't exist shows "exists": false.
  • Workers that are too busy to answer within CELERY_INSPECT_TIMEOUT don't appear in list_workers. If a worker you expect is missing, try a larger timeout argument before assuming it's dead.

Safety

  • Every tool is annotated readOnlyHint: true. Write actions (revoke, retry, purge) will only be available behind an explicit opt-in flag.
  • URL credentials and password/secret/token fields are masked in all output and error messages.

Roadmap

v0.1 — list_workers, queue_depths ✅

v1 — active_tasks, reserved_tasks, scheduled_tasks, task_status(task_id), diagnose_stuck

v2 — summarize_failures: groups recent failures by task name and exception type. Celery keeps no failure history by default, so this needs an event listener.

Development

bash
uv syncuv run pytest tests/unituv run ruff check . && uv run ruff format --check .

Integration tests start a real worker and need a broker:

bash
CELERY_BROKER_URL=redis://localhost:6379/0 uv run pytest tests/integration -m integration

CI runs them against Redis and RabbitMQ on every push.

Releasing

Bump the version in pyproject.toml and in both version fields of server.json, commit, then push a vX.Y.Z tag. The Release workflow checks that all three versions match the tag, publishes to PyPI, and then publishes server.json to the MCP registry.

License

MIT

來源:README.md,提交 50254df

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Oct 19, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分