MCP Tools
The Archgate MCP server exposes tools and resources that AI coding agents use to read ADRs, validate code against rules, and access review context. Start the server with archgate mcp.
Run ADR compliance checks against the codebase.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
adrId | string | No | Only check a specific ADR by ID |
staged | boolean | No | Only check git-staged files |
Returns a JSON object with check results:
{ "pass": false, "total": 4, "passed": 3, "failed": 1, "warnings": 0, "errors": 1, "infos": 0, "ruleErrors": 0, "truncated": false, "results": [ { "adrId": "ARCH-001", "ruleId": "register-function-export", "description": "Command file must export a register*Command function", "status": "fail", "totalViolations": 1, "shownViolations": 1, "violations": [ { "message": "Command file must export a register*Command function", "file": "src/commands/broken.ts", "severity": "error" } ], "durationMs": 12 } ], "durationMs": 42}When no rules are found, returns { "pass": true, "total": 0, "results": [], "message": "No rules to check" }.
Violations are capped at 20 per rule to keep responses concise. When a rule has more violations than the cap, totalViolations reflects the true count while shownViolations and the violations array only include the first 20. The top-level truncated field is set to true when any rule was capped.
list_adrs
Section titled “list_adrs”List all ADRs in the project with their metadata.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | No | Filter by domain (backend, frontend, data, architecture, general) |
Returns a JSON array of ADR objects:
[ { "id": "ARCH-001", "title": "Command Structure", "domain": "architecture", "rules": true }, { "id": "BE-001", "title": "API Response Envelope", "domain": "backend", "rules": true }]review_context
Section titled “review_context”Get changed files grouped by domain with applicable ADR briefings. This is the primary tool agents use before writing code — it provides a condensed view of all relevant ADR decisions and constraints without reading each ADR file individually.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
staged | boolean | No | When true, only include git-staged files. Default: false (all changed files). |
runChecks | boolean | No | When true, run compliance checks and include results. Default: false. |
domain | string | No | Filter to a single domain (backend, frontend, data, architecture, general). |
Returns a JSON object with domain-grouped briefings:
{ "allChangedFiles": ["src/commands/init.ts", "src/helpers/log.ts"], "truncatedFiles": false, "domains": [ { "domain": "architecture", "changedFiles": ["src/commands/init.ts", "src/helpers/log.ts"], "adrs": [ { "id": "ARCH-001", "title": "Command Structure", "domain": "architecture", "files": ["src/commands/**/*.ts"], "rules": true, "decision": "Commands export register*Command(program)...", "dosAndDonts": "### Do's\n- Export a register function..." } ] } ], "checkSummary": null}Each domain group includes the changed files that match its ADRs, and condensed ADR briefings with only the Decision and Do’s and Don’ts sections.
When runChecks is true, checkSummary contains the full check results (same format as the check tool response). When false or omitted, checkSummary is null.
claude_code_session_context
Section titled “claude_code_session_context”Read the current Claude Code session transcript for the project. Useful for recovering session context that may have been compacted from the conversation.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
maxEntries | number | No | 200 | Maximum number of relevant entries to return. Returns the most recent entries. |
Returns a JSON object with session metadata and filtered transcript:
{ "sessionFile": "abc123.jsonl", "totalEntries": 450, "relevantEntries": 180, "transcript": [ { "type": "user", "role": "user", "contentPreview": "Add a dark mode toggle..." }, { "type": "assistant", "role": "assistant", "contentPreview": "[tool_use: edit_file] | Updated styles..." } ]}Only user and assistant message types are included. Content previews are truncated to 500 characters for user messages and 300 characters per content block for assistant messages.
cursor_session_context
Section titled “cursor_session_context”Read Cursor agent session transcripts for the project. Works the same way as claude_code_session_context but reads from Cursor’s agent-transcripts directory.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
maxEntries | number | No | 200 | Maximum number of relevant entries to return. |
sessionId | string | No | — | Specific session UUID to read. If omitted, reads the most recent session. |
Returns a JSON object with session metadata and filtered transcript:
{ "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "sessionFile": "a1b2c3d4-e5f6-7890-abcd-ef1234567890.jsonl", "totalEntries": 320, "relevantEntries": 140, "transcript": [ { "role": "user", "contentPreview": "Fix the build error..." }, { "role": "assistant", "contentPreview": "The error is caused by..." } ]}If the specified sessionId is not found, the response includes a list of available session IDs.
Resources
Section titled “Resources”adr://{id}
Section titled “adr://{id}”Read the full content of an ADR by its ID. Returns the complete markdown including YAML frontmatter and body.
URI format: adr://\{id\} where \{id\} is the ADR identifier (e.g., ARCH-001, BE-003).
Example:
Requesting adr://ARCH-001 returns the full markdown content of the ARCH-001 ADR file with MIME type text/markdown.
If the requested ADR is not found, the resource returns a plain text message: ADR ARCH-001 not found.