Erzwingt Architektur-Grenzen und liefert Projektkontext für AI Coding Agents in JavaScript- und TypeScript-Codebases.
Auch bekannt als codapult/codapult-guard, codapult-guard, @codapult/guard
- Stars
- 4
- Tools
- —
- Downloads, 30 Tage
- 3.407
- Neueste Version
- 0.14.1
- Letzter Commit
- 10. Nov. 2026
- Lizenz
- MIT
Was ist Guard MCP?
Guard ist ein MCP server. Erzwingt Architektur-Grenzen und liefert Projektkontext für AI Coding Agents in JavaScript- und TypeScript-Codebases.
Zusammenfassung generiert aus dem README des Projekts
Über Guard MCP server
Guard ermöglicht es Entwicklungsteams, die architektonische Integrität in JavaScript- und TypeScript-Codebases aufrechtzuerhalten. Es bildet deine spezifische Projektstruktur ab, um Abhängigkeiten und Grenzen zu identifizieren. So kannst du eigene Regeln genehmigen, die illegale Imports oder strukturelle Regressionen verhindern. Im Gegensatz zu Standard-Type-Checkern versteht es projektspezifische Anforderungen, wie zum Beispiel die Trennung von Client-Komponenten und Persistence-Modulen.
Entwickler nutzen dieses Tool lokal oder in CI-Umgebungen wie GitHub, wobei Presets für Pull Requests oder Merge Queues zur Verfügung stehen. Der MCP server arbeitet über host-verwaltetes lokales stdio, was bedeutet, dass kein Network Listener oder Authentifizierung auf Anwendungsebene erforderlich ist. Es arbeitet neben bestehenden Tools wie ESLint, Biome oder TypeScript, anstatt sie zu ersetzen. Um es in einen AI Agent zu integrieren, kannst du den Befehl install-agent nutzen, um den notwendigen Kontext für die Verifizierung bereitzustellen.
Durch die Bereitstellung von deterministischen CLI-, JSON- und SARIF-Ergebnissen stellt es sicher, dass AI Coding Agents denselben architektonischen Kontext und dieselben Verifizierungsergebnisse erhalten wie menschliche Entwickler. Dies hilft zu verhindern, dass Agents Änderungen einführen, die gegen deine etablierten Projekt-Contracts verstoßen.
Was du damit machen kannst
- 1Architektur-Regressionen verhindernFrage die AI, ob ein neuer Import gegen die festgelegten Projektgrenzen verstößt.
- 2Architektur-Kontext für Agents bereitstellenGib einem AI Agent die Projektstruktur und die genehmigten Regeln, damit er deine spezifischen Design-Patterns einhält.
- 3Pull Request Reviews automatisierenRichte automatisierte Checks ein, um sicherzustellen, dass jeder Pull Request deine Architektur-Contracts einhält.
- 4Auswirkungen von Änderungen analysierenNutze das Tool, um zu verstehen, wie eine Code-Änderung die bestehende Projektstruktur beeinflusst.
Geschrieben aus dem README des Projekts. Jeder Use Case wurde gegen ein Zitat daraus geprüft.
So installierst du Guard MCP
Formate geprüft am 10. Nov. 2026Zu Cursor hinzufügenZu Goose hinzufügenGuard MCP in Claude Code installieren
$ claude mcp add codapult-guard -- npx -y @codapult/guardGuard MCP in Cursor installieren
~/.cursor/mcp.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP in VS Code installieren
.vscode/mcp.json
{
"servers": {
"codapult-guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP in VS Code CLI installieren
$ code --add-mcp '{"name":"codapult-guard","type":"stdio","command":"npx","args":["-y","@codapult/guard"]}'Guard MCP in Claude Desktop installieren
claude_desktop_config.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP in Codex installieren
$ codex mcp add codapult-guard -- npx -y @codapult/guardGuard MCP in Codex config.toml installieren
~/.codex/config.toml
[mcp_servers.codapult-guard] command = "npx" args = ["-y", "@codapult/guard"]
Guard MCP in Gemini CLI installieren
$ gemini mcp add -s user codapult-guard npx -- -y @codapult/guardGuard MCP in Gemini settings.json installieren
~/.gemini/settings.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Automatisierte Checks
Geluften am 14. Nov. 2026Vollständiger Bericht →Unsere automatisierten Checks bestanden. Das ist kein Security-Audit: Lies den Code und gib dem Server nur den minimal notwendigen Zugriff. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbarcodapult/codapult-guard is public and reachablegithub.com/codapult/codapult-guard ↗Bestanden
- Paket nennt dieses Repository als Quelle@codapult/guard names codapult/codapult-guard as sourcenpmjs.com/package/@codapult/guard ↗Bestanden
- Build-Provenienz (Sigstore-Attestierung)Sigstore attestation for @codapult/guardnpmjs.com/package/@codapult/guard/v/0.14.1#provenance ↗Bestanden
- Open Source Lizenz (OSI)MITspdx.org/licenses/MIT.html ↗Bestanden
- Commit oder Release im letzten JahrLast commit or release 2026-11-10github.com/codapult/codapult-guard ↗Bestanden
- OpenSSF ScorecardNicht geprüft
- Package-Name ähnelt keinem populären PackageNo popular package one edit away from @codapult/guardBestanden
- Keine kritischen Advisories im Paket oder seinen Abhängigkeiten115 resolved dependencies checked; no critical advisoryosv.dev ↗Bestanden
- Keine versteckten Anweisungen an das Modell0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersBestanden
- Destruktive Tools sind markiertNicht geprüft
- Remote-Endpoint beantwortet den MCP-HandshakeNicht geprüft
README
Auf GitHub ansehen@codapult/guard
Architecture guardrails for AI-assisted development
Codapult Guard helps teams preserve the architecture that makes their project work as it changes. It maps a JavaScript or TypeScript codebase, lets the team approve project-specific boundaries, and checks future changes locally and in CI. AI agents can use the same project context and verification results as developers.
Catch project-specific regressions
A type checker can confirm that code is valid TypeScript. It cannot know that this project requires client components to stay away from persistence modules. Once the team approves that boundary, Guard can detect a violating import in changed files and show which rule was triggered.
Project boundary: Client → Server Action → Service → Repository → Database
Possible regression: Client ─────────────────────────────────────→ Database
Guard discovers the architecture in the repository; it does not prescribe one universal structure or activate proposed rules without approval.
Get started
Requirements: Node.js >=20.19 and a JavaScript or TypeScript project.
# pnpm
pnpm add -D @codapult/guard
pnpm exec codapult-guard init
# npm
npm install --save-dev @codapult/guard
npx codapult-guard init
Review the generated project model, proposed rules, contracts, and baseline under
.codapult/guard/ before relying on the results. Then run Guard's architecture checks:
pnpm exec codapult-guard verify --no-project-checks --tools off
verify can run your configured project checks and detected adapters. The flags above limit this
run to Guard's built-in checks. With npm, run npx codapult-guard verify --no-project-checks --tools off.
See the complete guide for initialization and daily workflows.
Use Guard with an AI agent
Install a managed instruction block for your agent so it knows when to load Guard context and run verification:
pnpm exec codapult-guard install-agent codex
Supported hosts and MCP setup are in the AI-agent integration guide and host integration guides.
The MCP server uses host-managed local stdio, with no network listener or application-level authentication. The host and operating system control process access and workspace permissions; see the security model.
Choose a GitHub setup
Choose a preset from the existing workflow templates and follow only the hosting steps for that level of protection. Most projects can start with standard PR checks.
| Preset | Use it when | Guide |
|---|---|---|
| PR checks | You want Guard findings and a required check on ordinary pull requests. | GitHub PR checks |
| Trusted PR verification | The Guard check must come from a protected workflow source, including for fork PRs. | Trusted PR setup |
| Merge queue | Your repository merges through a GitHub merge queue. | Merge queue setup |
If you are unsure, use PR checks first. It is useful CI feedback, but its workflow lives in the project being checked and can be changed by a pull request. Choose trusted verification when the check itself must be protected from that change.
What Guard does
- Learns project-specific structure, dependencies, boundaries, and existing findings.
- Checks approved architecture rules and contracts without imposing a universal architecture.
- Shows change impact and prepares bounded, redacted context for AI review.
- Runs configured project checks and adapters when enabled; it does not replace them.
- Produces deterministic CLI, JSON, and SARIF results for local use and CI.
Guard is local-first and does not call an LLM. The AI host owns model access, edits, and its repair loop. Guard complements TypeScript, ESLint or Biome, tests, SAST, and dependency scanners; it does not replace them.
Documentation
- GitHub setup presets — choose and configure the CI level you need.
- Complete Guard guide — commands, policy, results, security, and advanced workflows.
- AI-agent integration — managed instructions and MCP workflow.
- Host integrations — Codex, Cursor, Claude Code, Copilot, Gemini CLI, and generic MCP clients.
- Policy mutation controls — approval and protected policy behavior.
- Extensions — adapters, output formats, and integration boundaries.
For contributors
Maintainer checks and project fixture coverage are documented in the fixture guide and release guide.
More from Codapult
Starting a SaaS from scratch? Codapult is a production-ready Next.js SaaS foundation built for AI-assisted development, with modular architecture, built-in AI, MCP context, and source code under your control.
License
MIT. See LICENSE.
Guard MCP Fragen
Wie füge ich Guard MCP zu Claude Code hinzu?
Führe claude mcp add codapult-guard -- npx -y @codapult/guard in deinem Terminal aus. Füge --scope user hinzu, damit der Server in jedem Projekt verfügbar ist.
Wie füge ich Guard MCP zu Cursor hinzu?
Öffne ~/.cursor/mcp.json und füge den Server unter mcpServers hinzu, mit der Cursor-Config aus dem Installationsabschnitt oben.
Wie verhindert Guard Architektur-Regressions?
Es ermöglicht Teams, projektspezifische Grenzen zu genehmigen, und erkennt verstoßende Imports in geänderten Dateien, sobald eine Regel ausgelöst wird.
Nutzt Guard ein LLM, um Code zu prüfen?
Nein, Guard ist local-first und ruft kein LLM auf; der AI Host ist für den Modellzugriff und die Edits verantwortlich.
Was sind die Systemanforderungen für Guard?
Du benötigst Node.js Version 20.19 oder höher und ein JavaScript- oder TypeScript-Projekt.
Wie handhabt der MCP server die Authentifizierung?
Der MCP server nutzt host-verwaltetes lokales stdio und verwendet keine Network Listener oder Authentifizierung auf Anwendungsebene.