queue-mcp
Task queue MCP server for Claude Code that allows adding, listing, and completing tasks from an external CLI, enabling Claude to drain a queue of follow-up work without disturbing a running turn.
README
queue-mcp
A task queue for Claude Code. Line up work from another terminal, and Claude drains it one item at a time.
The problem
Type at the Claude Code prompt while a turn is running and your message gets steered into that turn at the next tool boundary. It does not wait. That is the right behaviour for "no, use the other file" mid-edit, but it makes it impossible to line up three follow-ups and walk away.
This queue lives outside the conversation, so nothing you add can disturb the running turn. Wanted upstream too: #50246 (217 reactions), #73661, #82348, #63190.
Install
Via mcp-orchestrator, which also keeps it running:
mcp_install("queue")
Or by hand:
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\run.ps1
claude mcp add --transport http --scope user queue http://127.0.0.1:8766/mcp
Tell Claude to use it
This step is what makes it automatic. Installing the server only provides
the queue; Claude will not use it for anything until told to. Add this to your
CLAUDE.md, then talk to Claude exactly as usual and every task you give it
goes through the queue.
## Task queue (queue-mcp)
The `queue` MCP server holds a per-session work queue. Drain it in order.
**Your session id** is the UUID in your scratchpad path. Pass it as
`session_id` to every queue tool. Never guess it, and never reuse one from an
earlier conversation.
**Everything the user asks you to do goes in the queue first, single tasks
included.** Do not weigh up whether a request is big enough to be worth
queueing. That judgment is exactly what fails: under momentum it always comes
out "this one is small, just start", and the rule quietly stops existing.
The test is **do vs say**, and it is the only judgment you make:
- If fulfilling the request means *doing* something, writing, editing, running,
building, investigating, it goes in the queue before any of it starts.
- If it means only *saying* something, a question about this conversation, an
opinion, a design you are discussing, answer inline and queue nothing.
On receiving a request that passes the test:
1. `queue_add` each step as its own item, in order, before doing any work. A
chain ("do X, then Y") is one item per step.
2. Check `queue_current`. If nothing is in progress, `queue_next` immediately
and start the first item.
3. If something is already in progress, just append and say so. Never jump the
queue or run two items at once.
**The loop:**
1. `queue_next` claims one item and marks it in progress.
2. Do the work.
3. `queue_complete` with a one-line result. Mark `failed: true` if it did not
work; do not silently mark it done.
4. Back to step 1. Stop when `queue_next` returns `drained: true`.
**Rules that matter:**
- **One at a time.** Never claim a new item while one is in progress.
- **`drained: true` means stop**, not "go look for more work".
- **A failed item does not block the queue.** Record it, report it, move on,
and flag it in the final summary.
- **The queue records the user's intent, not yours.** Never queue work they did
not ask for, beyond splitting their request into steps.
- **If the queue server is unreachable, say so and do the work anyway.** The
queue is a coordination aid, not a gate.
Trim it to taste, but keep the do vs say test and the one-at-a-time rule. Those two carry most of the behaviour.
Adding work while it runs
.\q.ps1 add "fix the failing auth test"
.\q.ps1 add --next "urgent: revert the migration"
.\q.ps1 list
Claude claims one item, works it, marks it done, then claims the next. It stops
when the queue reports drained.
Tools
| Tool | Purpose |
|---|---|
queue_add |
Append or insert an item |
queue_list / queue_current |
What is queued, what is running |
queue_next |
Claim the next item |
queue_complete |
Mark done or failed |
queue_remove / queue_move / queue_clear |
Edit the queue |
queue_sessions / queue_history |
Every known queue, and past work |
Worth knowing
- Queues are per session. Every tool takes
session_id, because an MCP server cannot tell which session is calling it. - Data lives in
~/.queue-mcp. Restarting the server loses nothing. - The CLI writes the same files as the server, so adding work does not depend on the server being up.
- The loop is model-mediated, not enforced. Claude queues and drains
because
CLAUDE.mdtells it to, not because anything makes it. AStophook would make it strict.
Config: QUEUE_MCP_PORT, QUEUE_MCP_HOST, QUEUE_MCP_HOME.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。