refactor: remove MCP server, port to CLI commands#50
Merged
Conversation
Replace the MCP server (`archgate mcp`) with direct CLI commands. Skills now invoke `archgate review-context`, `archgate session-context claude-code`, and `archgate session-context cursor` via shell instead of MCP tool calls. New files: - src/helpers/session-context.ts — business logic extracted from MCP tools - src/commands/review-context.ts — replaces MCP review_context tool - src/commands/session-context/ — replaces MCP session context tools Removed: - src/mcp/ (server, resources, 6 tools) - src/commands/mcp.ts - @modelcontextprotocol/sdk dependency - .mcp.json, .cursor/mcp.json - All MCP tests (10 files) Updated: - Editor settings (claude-settings.ts, cursor-settings.ts) — no MCP config - 7 ADRs — removed MCP references - CLAUDE.md — updated command table Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rhuanbarreto
added a commit
that referenced
this pull request
Mar 13, 2026
The `archgate mcp` command was removed in #50, but the VS Code and Copilot settings helpers still generated mcp.json files pointing to it. This caused broken MCP server entries when running `archgate init`. - Remove ARCHGATE_VSCODE_MCP_CONFIG and mcp.json generation from vscode-settings.ts (marketplace URL logic preserved) - Remove ARCHGATE_COPILOT_MCP_CONFIG and mcp.json generation from copilot-settings.ts - Update init-project.ts comment - Update tests to assert mcp.json is no longer created Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
rhuanbarreto
added a commit
that referenced
this pull request
Mar 13, 2026
The `archgate mcp` command was removed in #50, but the VS Code and Copilot settings helpers still generated mcp.json files pointing to it. This caused broken MCP server entries when running `archgate init`. - Remove ARCHGATE_VSCODE_MCP_CONFIG and mcp.json generation from vscode-settings.ts (marketplace URL logic preserved) - Remove ARCHGATE_COPILOT_MCP_CONFIG and mcp.json generation from copilot-settings.ts - Update init-project.ts comment - Update tests to assert mcp.json is no longer created Co-authored-by: Rhuan Barreto <rhuan.barreto@soprasteria.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Merged
This was referenced May 25, 2026
rhuanbarreto
added a commit
that referenced
this pull request
May 25, 2026
- Update ARCH-007 context and consequences to remove outdated "MCP server" framing — the decision (Bun.spawn over Bun.$) is still valid but the rationale cited a deployment mode removed in PR #50 - Remove MCP regression tests from init-project, copilot-settings, and cursor-settings — testing what a function should NOT produce is unnecessary noise eight months after the removal Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
rhuanbarreto
added a commit
that referenced
this pull request
May 25, 2026
Remove test assertions that only existed to guard against re-introduction of features that were removed long ago: - `--prefix` option on `adr import` (replaced by domain-aware remapping) - `defineRules` reference in rules template (removed when satisfies RuleSet replaced it) - `.cursor/rules/archgate-governance.mdc` (removed when Cursor plugin moved to VSIX) - `.cursor/mcp.json` in init-project (MCP server removed in PR #50) These add noise without value — the removed code paths don't exist, TypeScript wouldn't compile references to them, and broader assertions already cover the expected behavior. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
rhuanbarreto
added a commit
that referenced
this pull request
May 25, 2026
* refactor(loader): remove dead module cache-buster from rule imports
The `?t=${Date.now()}` query string was introduced when archgate ran as
a long-lived MCP server process where `loadRuleAdrs()` could be called
multiple times. PR #50 removed the MCP server and ported everything to
CLI commands, but left the cache-buster in place with an updated
comment. Each `archgate check` is now a fresh Bun process — there is no
module cache to bust.
Closes #345 — the broader caching optimization proposed there is not
warranted given current performance (~850ms total, ~188ms rule
execution).
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
* chore: add baseBranch to archgate config
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
* style: format archgate config with oxfmt
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
* chore: remove stale MCP server references and regression tests
- Update ARCH-007 context and consequences to remove outdated
"MCP server" framing — the decision (Bun.spawn over Bun.$) is still
valid but the rationale cited a deployment mode removed in PR #50
- Remove MCP regression tests from init-project, copilot-settings, and
cursor-settings — testing what a function should NOT produce is
unnecessary noise eight months after the removal
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
* test: remove vestigial regression guards for removed features
Remove test assertions that only existed to guard against re-introduction
of features that were removed long ago:
- `--prefix` option on `adr import` (replaced by domain-aware remapping)
- `defineRules` reference in rules template (removed when satisfies
RuleSet replaced it)
- `.cursor/rules/archgate-governance.mdc` (removed when Cursor plugin
moved to VSIX)
- `.cursor/mcp.json` in init-project (MCP server removed in PR #50)
These add noise without value — the removed code paths don't exist,
TypeScript wouldn't compile references to them, and broader assertions
already cover the expected behavior.
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
---------
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
archgate mcp) and all related infrastructure (server, resources, 6 tools, 10 test files,@modelcontextprotocol/sdkdependency)archgate review-contextCLI command — replaces MCPreview_contexttool, with--staged,--run-checks,--domainoptionsarchgate session-contextcommand group withclaude-codeandcursorsubcommands — replaces MCP session context toolssrc/helpers/session-context.tswith clean result typesNet: -803 lines (669 added, 1472 removed)
Test plan
bun run validatepasses (lint, typecheck, format, 236 tests, ADR check, build)archgate review-context --helpshows correct optionsarchgate session-context claude-code --helpshows correct optionsarchgate session-context cursor --helpshows correct options@modelcontextprotocol/sdkorsrc/mcp/remain🤖 Generated with Claude Code