你的代理在会话间丢失了计划,所以 saga-mcp 给它提供了一个基于 SQLite 的跟踪器,涵盖项目、 epics、任务、子任务、依赖和备注:33 个 MCP 工具、活动日志和一个一调用......
概览
你的编码代理在会话间丢失了计划。你明天回来时,它根本不知道你同意的五件事中哪一项已经完成,哪一项被阻碍了,或者为什么你拒绝了第二种方法——因为计划存在于上下文窗口,或者在没人更新的 TODO.md 里。 Saga-MCP 给代理提供了一个真正的跟踪器:你的项目中的 SQLite 文件,里面存放项目、史诗、任务、子任务、依赖、注释、笔记和决策,作为 33 个 MCP 工具公开。代理在运行时写入,并在它返回时读取仪表盘。没有账户,没有外部服务,没有网络调用——数据库是你拥有的文件。 Claude代码——为你的项目.mcp.json添加内容: 重启客户端。DB_PATH 是唯一的设置;文件和模式是在首次使用时创建的。 “为电商API设置跟踪并规划认证。” 任务2和3会回归——它们的依赖关系还没完成。完成任务1,任务2就会解锁。
概述(AI 翻译)
你的编码代理在会话间丢失了计划。你明天回来,它根本不知道是哪一个
你们达成共识的五件事中,有哪一项被阻碍了,或者你为什么拒绝了
第二种方法——因为计划存在于上下文窗口,或者处于TODO.md无人更新的状态。
Saga-MCP 给代理提供了一个真正的跟踪器:一个位于你项目中 SQLite 的文件,承载项目, EPIC、任务、子任务、依赖、注释、笔记和决策,作为41个MCP工具公开展示。该 代理在运行时写入,返回时读取。没有账户,没有外部服务, 没有网络调用——数据库是你拥有的文件。
安装
将 saga-mcp 添加到你的 MCP 客户端。同样的模块适用于 Claude Code([.mcp.json)在你的
项目)、Claude 桌面(claude_desktop_config.json)以及其他任何MCP客户端:
重启客户端。DB_PATH 是唯一需要的设置;文件及其模式是在
首先使用。更喜欢全局安装?npm install -g saga-mcp,然后用saga-mcp作为命令
而不是npx。
在Node 20、22和24上测试,Linux、macOS和Windows上。
设定
|变量 |必需 |描述 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
saga-mcp
Your coding agent loses the plan between sessions. You come back tomorrow and it has no idea which
of the five things you agreed on are done, which one is blocked on which, or why you rejected the
second approach — because the plan lived in the context window, or in a TODO.md nobody updates.
saga-mcp gives the agent a real tracker instead: a SQLite file in your project holding projects, epics, tasks, subtasks, dependencies, comments, notes and decisions, exposed as 41 MCP tools. The agent writes to it as it works and reads it back when it returns. No accounts, no external service, no network calls — the database is a file you own.
Install
Add saga-mcp to your MCP client. The same block works for Claude Code (.mcp.json in your
project), Claude Desktop (claude_desktop_config.json), and any other MCP client:
{
"mcpServers": {
"saga": {
"command": "npx",
"args": ["-y", "saga-mcp"],
"env": { "DB_PATH": "/absolute/path/to/your/project/.tracker.db" }
}
}
}
Restart the client. DB_PATH is the only required setting; the file and its schema are created on
first use. Prefer a global install? npm install -g saga-mcp, then use saga-mcp as the command
instead of npx.
Tested on Node 20, 22 and 24, on Linux, macOS and Windows.
Settings
| Variable | Required | Description |
|---|---|---|
DB_PATH |
Yes | Path to the .tracker.db SQLite file. Created on first use. |
SAGA_PROJECT |
No | Scope every tool to one project, by id or name. Set this per repo when several repos share one database. |
SAGA_DESCRIPTION_LOCK |
No | on_progress locks a task’s description the moment work starts on it. Off by default. See keeping agents on the rails. |
SAGA_TOOLS |
No | full (default) lists all 41 tools. core lists only the 13 an ordinary tracking session needs, saving ~4,300 tokens per session. See token cost. |
No API keys, no accounts, no external services.
Your first session
You: “Set up tracking for the e-commerce API and plan out auth.”
tracker_init({ project_name: "E-Commerce API" })
epic_create({ project_id: 1, name: "Authentication", priority: "high" })
task_create({ epic_id: 1, title: "Design auth schema", priority: "critical" })
task_create({ epic_id: 1, title: "Implement JWT auth", depends_on: [1] })
task_create({ epic_id: 1, title: "Add OAuth2 Google login", depends_on: [2] })
安装
npx -y saga-mcp配置
{
"mcpServers": {
"saga": {
"command": "npx",
"args": ["-y", "saga-mcp"],
"env": { "DB_PATH": "/absolute/path/to/your/project/.tracker.db" }
}
}
}