Skip to content

fix(#395): generate per-client MCP configs with cwd and env - #412

Merged
admarble merged 1 commit into
mainfrom
feature/395-mcp-server-fix-config-generation-cwd-env-per-clien
Mar 24, 2026
Merged

admarble merged 1 commit into
mainfrom
feature/395-mcp-server-fix-config-generation-cwd-env-per-clien

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • getSequantMcpConfig() now accepts projectDir and clientType parameters to generate client-appropriate configs
  • Claude Desktop and VS Code + Continue configs include cwd (absolute project path); Cursor omits it
  • env.ANTHROPIC_API_KEY is only included when the env var is actually set (no placeholder that confuses Max plan users)
  • sequant init passes client type through to config generation

Pre-PR AC Verification

AC Description Status Evidence
AC-1 getSequantMcpConfig() accepts projectDir and clientType ✅ src/lib/mcp-config.ts:35-38
AC-2 Claude Desktop config includes cwd ✅ CLIENTS_NEEDING_CWD set, tests verify
AC-3 Cursor config omits cwd ✅ Not in CLIENTS_NEEDING_CWD, tests verify
AC-4 env.ANTHROPIC_API_KEY only when set ✅ mcp-config.ts:50-52, env tests
AC-5 sequant init generates per-client configs ✅ init.ts:565-568 passes client.clientType
AC-6 Docs match generated configs ✅ Updated mcp-server.md note
AC-7 Tests cover per-client config ✅ 17 tests including per-client cases

Test plan

  • npm run build — passes
  • npm run lint — passes
  • npm test — 1843/1843 pass
  • Per-client config tests verify cwd inclusion/omission
  • env.ANTHROPIC_API_KEY tests verify conditional inclusion

Closes #395

- getSequantMcpConfig() accepts projectDir and clientType params
- Claude Desktop and VS Code + Continue configs include cwd
- Cursor config omits cwd (runs from workspace root)
- env.ANTHROPIC_API_KEY only included when set in environment
- sequant init passes client type to config generator
- Docs updated to reflect automatic cwd setup

Entire-Checkpoint: aaf7c3f94d79
@admarble
admarble merged commit a4fa5b2 into main Mar 24, 2026
5 checks passed
@admarble
admarble deleted the feature/395-mcp-server-fix-config-generation-cwd-env-per-clien branch March 24, 2026 14:55
admarble added a commit that referenced this pull request May 3, 2026
Mirrors the --testgen pattern from #557 to remove the only --phases
emission /assess was still forced to produce for non-resume cases.

- bin/cli.ts: register --security-review next to --testgen
- types.ts: add RunOptions.securityReview
- phase-mapper.ts: extend PhaseMapperOptions and insert security-review
  after spec when flag set; idempotent vs label-based auto-detection
- batch-executor.ts: SEQUANT_SECURITY_REVIEW env override and runtime
  injection block (handles --resume after spec already ran)
- assess/SKILL.md (×3 mirrors): rewrite Rule 8 — drop "asymmetry"
  clause, list both --testgen and --security-review as additive flags;
  example commands at #412 and #500 switch from --phases to
  --security-review (Flags annotations updated to match)
- docs/features/assess-minimal-flags.md: update for new flag
- assess-skill.test.ts: extend rejection regex to also catch
  --phases ...,security-review patterns
- phase-mapper.test.ts: 5 new tests covering insertion, idempotency,
  composition with --testgen, and absence of spec
- CHANGELOG: [Unreleased] / Added entry

Closes #559
admarble added a commit that referenced this pull request Sep 9, 2026
Mirrors the --testgen pattern from #557 to remove the only --phases
emission /assess was still forced to produce for non-resume cases.

- bin/cli.ts: register --security-review next to --testgen
- types.ts: add RunOptions.securityReview
- phase-mapper.ts: extend PhaseMapperOptions and insert security-review
  after spec when flag set; idempotent vs label-based auto-detection
- batch-executor.ts: SEQUANT_SECURITY_REVIEW env override and runtime
  injection block (handles --resume after spec already ran)
- assess/SKILL.md (×3 mirrors): rewrite Rule 8 — drop "asymmetry"
  clause, list both --testgen and --security-review as additive flags;
  example commands at #412 and #500 switch from --phases to
  --security-review (Flags annotations updated to match)
- docs/features/assess-minimal-flags.md: update for new flag
- assess-skill.test.ts: extend rejection regex to also catch
  --phases ...,security-review patterns
- phase-mapper.test.ts: 5 new tests covering insertion, idempotency,
  composition with --testgen, and absence of spec
- CHANGELOG: [Unreleased] / Added entry

Closes #559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP server: fix config generation (cwd, env, per-client differences)

1 participant