dsh-peak-scheduler
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dsh-peak-schedulerDefer my background analysis to the next off-peak window"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsh-peak-scheduler
一个 DeepSeek 峰谷计费的任务调度器(MCP server)。它让 agent 把非紧急任务延迟到 空闲(便宜)时段执行,省约 50%,同时绝不阻碍用户。
背景:DeepSeek API 自 2026-08-17 00:00(北京时间) 起实行峰谷定价,高峰时段价格是 空闲时段的 2 倍。
官方峰谷时段(北京时间)
时段 | 时间 |
高峰 | 09:00–12:00、14:00–18:00 |
空闲 | 00:00–09:00、12:00–14:00、18:00–24:00 |
价格表(get_prices 工具可查,元/百万 tokens):
模型 | 档位 | 输出价格 |
deepseek-v4-flash | 空闲 / 高峰 | 4.5 / 9.0 |
deepseek-v4-pro | 空闲 / 高峰 | 13.5 / 27.0 |
Related MCP server: Context Guardian
设计原则:绝不阻碍用户
这是一个顾问式延迟层,不是拦截器:
用户/agent 主动决定某个任务"可以延迟"才调用
defer_task;紧急任务(
urgency >= 0.5)或 deadline 早于下一个空闲时段的任务,立即执行;它只提供"现在贵,建议推迟到 X 点(省 50%)"的建议 + 一个延迟队列,从不拦截任何输入。
显式开关(默认关)
整个功能默认关闭。config.json 的 enabled 控制:
{ "enabled": false }enabled: false(默认)→defer_task返回"未启用,任务正常立即执行",功能等于不存在;enabled: true→ 才进入峰谷判断。
自动模式(可选,旁路观察者)
auto.mjs 是自动代理形态:启用后,后台进程旁路观察会话,不拦截、不改变任何对话:
高峰时段:把用户消息攒进
pending.jsonl(一份副本,对话照常);空闲时段:用 DeepSeek(此时 2 倍便宜)把攒的消息整理成任务清单,写
summary.json,清空队列。
一键开关(控制面板)
不用手动跑 auto.mjs,有一个带开关按钮的控制面板:
start-control.bat # 或: node control.mjs config.json打开 http://127.0.0.1:3280 ,一个大按钮:自动模式 开/关。点击即切换 config.enabled
并自动启动/停止 auto.mjs 后台进程,状态实时显示(当前峰/谷 + 队列 + 是否运行中)。
紧急任务天然不受影响——因为它是旁路观察者,从不延迟或拦截任何用户 turn。
工具
工具 | 作用 |
| 当前是否高峰 + 下一个空闲时段何时开始 |
| 延迟一个非紧急任务(task / deadline / urgency) |
| 列出延迟队列 |
| 峰谷价格表 |
运行(作为 MCP server)
零依赖,标准 MCP stdio 协议,任何 MCP 客户端可接:
node index.mjs在 MCP 客户端配置里指向 node index.mjs(工作目录为本目录)。例如 Claude Desktop:
{
"mcpServers": {
"dsh-peak-scheduler": {
"command": "node",
"args": ["D:/path/to/dsh-peak-scheduler/index.mjs"]
}
}
}核心逻辑
scheduler.mjs
isPeak(date) → 北京时间 9-12 / 14-18 判峰谷
nextOffPeakStart(date) → 下一个空闲时段起点(午休/傍晚/深夜/清晨)
planTask({deadline, urgency}) → {defer, runAt, reason}
紧急(urgency>=0.5) → 立即
空闲时段 → 立即
高峰 + deadline 早于空闲 → 立即
否则 → 延迟到下一个空闲时段测试:node test.mjs(19 项断言,含时段边界、时区换算、deadline、队列)。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceAn MCP-native server that enables intelligent task delegation from advanced AI agents like Claude to more cost-effective LLMs, optimizing for cost while maintaining output quality.157
- Alicense-qualityCmaintenanceMCP server that cuts cloud LLM costs 36-42% by indexing context locally and giving agents precision retrieval tools instead of raw context dumps.147MIT
- Flicense-qualityDmaintenanceAn MCP server that reduces token usage by lazily loading skills and tools only when needed, and routing repetitive subtasks to ML backends instead of the LLM.
- AlicenseAqualityCmaintenanceAn MCP server that reduces AI API costs by up to 97% through token measurement, compression, caching, and pruning, all without changing prompts.101Apache 2.0
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Cloud-hosted MCP server for durable AI memory
MCP server for MiniMax H3 multimodal video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/keyiadiannao/dsh-peak-scheduler'
If you have feedback or need assistance with the MCP directory API, please join our Discord server