You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BACK-558 - Resolve MCP project root from client workspace roots
The MCP server froze its project root at startup and only consulted MCP
roots in fallback mode, so a shared/user-scope server (or one launched in
the main checkout while working in a git worktree) wrote tasks to the
wrong backlog directory.
Unify startup and fallback resolution into one request-scoped resolver:
a --cwd/BACKLOG_CWD pin wins; otherwise client workspace roots are
authoritative and re-resolved on roots/list_changed; a launch-directory
project is kept only when nested inside an advertised root; clients
without the roots capability keep process.cwd() behavior.
Closes#558
The init wizard will ask how you want to connect AI tools:
57
+
59
58
-**MCP connector** (recommended) — auto-configures Claude Code, Codex, Gemini CLI, Kiro or Cursor and adds workflow instructions for your agents.
60
59
-**CLI commands** — creates instruction files (CLAUDE.md, AGENTS.md, etc.) so agents use Backlog via CLI.
61
60
-**Skip** — no AI setup; use Backlog.md purely as a task manager.
@@ -72,6 +71,7 @@ After running `backlog init` and choosing the MCP or CLI integration, work in th
72
71
**Step 1 — Describe your idea.** Tell the agent what you want to build and ask it to split the work into small tasks with clear descriptions and acceptance criteria.
73
72
74
73
**🤖 Ask your AI Agent:**
74
+
75
75
> I want to add a search feature to the web view that searches tasks, docs, and decisions. Please decompose this into small Backlog.md tasks.
76
76
77
77
> [!NOTE]
@@ -82,6 +82,7 @@ After running `backlog init` and choosing the MCP or CLI integration, work in th
82
82
**Step 3 — Plan before coding.** Ask the agent to research and write an implementation plan in the task. Do this right before implementation so the plan reflects the current state of the codebase.
83
83
84
84
**🤖 Ask your AI Agent:**
85
+
85
86
> Work on BACK-10 only. Research the codebase and write an implementation plan in the task. Wait for my approval before coding.
86
87
87
88
> [!NOTE]
@@ -137,6 +138,7 @@ backlog browser --no-open
137
138
```
138
139
139
140
**Features:**
141
+
140
142
- Interactive Kanban board with drag-and-drop
141
143
- Task creation and editing with rich forms
142
144
- Interactive acceptance criteria editor with checklists
@@ -161,43 +163,56 @@ You can run `backlog init` (even if you already initialized Backlog.md) to set u
161
163
<details>
162
164
<summary><strong>Claude Code</strong></summary>
163
165
164
-
```bash
165
-
claude mcp add backlog --scope user -- backlog mcp start
166
-
```
166
+
```bash
167
+
claude mcp add backlog --scope user -- backlog mcp start
Use the shared `backlog` server name everywhere – the MCP server auto-detects whether the current directory is initialized and falls back to `backlog://init-required` when needed.
199
+
Use the shared `backlog` server name everywhere. The MCP server follows your editor's active workspace: it reads the client's MCP roots to locate the project, re-resolves when you switch workspace or git worktree, and falls back to `backlog://init-required` when the workspace has no backlog project yet. A single user-scope server therefore works across all your projects.
198
200
199
201
### Manual config
200
202
203
+
```json
204
+
{
205
+
"mcpServers": {
206
+
"backlog": {
207
+
"command": "backlog",
208
+
"args": ["mcp", "start"]
209
+
}
210
+
}
211
+
}
212
+
```
213
+
214
+
Pinning to one project: set `BACKLOG_CWD` (or pass `--cwd`) to fix the server on a single backlog and turn off workspace following. This is useful when you want every session to target the same backlog (for example one global backlog), or when your client does not advertise MCP roots and cannot set the process working directory.
215
+
201
216
```json
202
217
{
203
218
"mcpServers": {
@@ -212,15 +227,13 @@ Use the shared `backlog` server name everywhere – the MCP server auto-detects
212
227
}
213
228
```
214
229
215
-
If your IDE can't set the process working directory for MCP servers, set `BACKLOG_CWD` as shown above.
216
-
If your IDE supports custom args but not env vars, you can also use `["mcp", "start", "--cwd", "/absolute/path/to/your/project"]`.
230
+
If your client supports custom args but not env vars, use `["mcp", "start", "--cwd", "/absolute/path/to/your/project"]` instead.
217
231
218
232
> [!IMPORTANT]
219
233
> When adding the MCP server manually, you should add some extra instructions in your CLAUDE.md/AGENTS.md files to inform the agent about Backlog.md.
220
234
> This step is not required when using `backlog init` as it adds these instructions automatically.
221
235
> Backlog.md's instructions for agents are available at [`/src/guidelines/mcp/agent-nudge.md`](/src/guidelines/mcp/agent-nudge.md).
222
236
223
-
224
237
Once connected, agents can read the Backlog.md workflow instructions via the resource `backlog://docs/task-workflow`.
225
238
Use `/mcp` command in your AI tool (Claude Code, Codex, Kiro) to verify if the connection is working.
226
239
@@ -249,6 +262,7 @@ Backlog.md merges the following layers (highest → lowest):
249
262
### Interactive wizard (`backlog config`)
250
263
251
264
Run `backlog config` with no arguments to launch the full interactive wizard. This is the same experience triggered from `backlog init` when you opt into advanced settings, and it walks through the complete configuration surface:
265
+
252
266
- Cross-branch accuracy: `checkActiveBranches`, `remoteOperations`, and `activeBranchDays`.
253
267
- Git workflow: `autoCommit` and `bypassGitHooks`.
254
268
- ID formatting: enable or size `zeroPaddedIds`.
@@ -257,6 +271,7 @@ Run `backlog config` with no arguments to launch the full interactive wizard. Th
257
271
- Web UI defaults: choose `defaultPort` and whether `autoOpenBrowser` should run.
258
272
259
273
Skipping the wizard (answering "No" during init) applies the safe defaults that ship with Backlog.md:
0 commit comments