JavaScript 및 TypeScript 코드베이스에서 아키텍처 경계를 강제하고 AI 코딩 에이전트에게 프로젝트 컨텍스트를 제공합니다.
다른 이름 codapult/codapult-guard, codapult-guard, @codapult/guard
- 스타
- 4
- Tools
- —
- 다운로드, 30일
- 3,407
- 최신 버전
- 0.14.1
- 마지막 커밋
- 2026년 11월 10일
- 라이선스
- MIT
Guard MCP란?
Guard은(는) MCP server입니다. JavaScript 및 TypeScript 코드베이스에서 아키텍처 경계를 강제하고 AI 코딩 에이전트에게 프로젝트 컨텍스트를 제공합니다.
프로젝트 README에서 생성된 요약
Guard MCP server 정보
Guard는 개발 팀이 JavaScript 및 TypeScript 코드베이스의 아키텍처 무결성을 유지할 수 있도록 지원합니다. 특정 프로젝트 구조를 매핑하여 의존성과 경계를 식별하며, 잘못된 import나 구조적 회귀를 방지하는 사용자 정의 규칙을 승인할 수 있습니다. 표준 타입 체커와 달리 클라이언트 컴포넌트와 영속성 모듈을 분리하는 것과 같은 프로젝트별 요구 사항을 이해합니다.
개발자는 이 도구를 로컬에서 사용하거나, GitHub과 같은 CI 환경에서 pull request 또는 merge queue용 프리셋을 사용하여 사용할 수 있습니다. MCP server는 호스트 관리형 로컬 stdio를 통해 작동하므로 네트워크 리스너나 애플리케이션 수준의 인증이 필요하지 않습니다. ESLint, Biome 또는 TypeScript와 같은 기존 도구를 대체하는 대신 함께 작동합니다. AI 에이전트와 통합하려면 install-agent command를 사용하여 검증에 필요한 컨텍스트를 제공할 수 있습니다.
결정론적인 CLI, JSON 및 SARIF 결과를 제공함으로써 AI 코딩 에이전트가 인간 개발자와 동일한 아키텍처 컨텍스트 및 검증 결과를 받을 수 있도록 보장합니다. 이를 통해 에이전트가 설정된 프로젝트 계약을 위반하는 변경 사항을 도입하는 것을 방지할 수 있습니다.
활용 사례
- 1아키텍처 회귀 방지새로운 import가 설정된 프로젝트 경계를 위반하는지 AI에게 확인하도록 요청합니다.
- 2에이전트에게 아키텍처 컨텍스트 제공AI 에이전트에게 프로젝트 구조와 승인된 규칙을 제공하여 특정 디자인 패턴을 따르도록 합니다.
- 3Pull request 리뷰 자동화모든 pull request가 아키텍처 계약을 준수하는지 확인하기 위해 자동화된 검사를 설정합니다.
- 4변경 영향 분석코드 변경이 기존 프로젝트 구조에 어떤 영향을 미치는지 이해하기 위해 도구를 사용합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Guard MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 Guard MCP 설치
$ claude mcp add codapult-guard -- npx -y @codapult/guardCursor에 Guard MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}VS Code에 Guard MCP 설치
.vscode/mcp.json
{
"servers": {
"codapult-guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}VS Code CLI에 Guard MCP 설치
$ code --add-mcp '{"name":"codapult-guard","type":"stdio","command":"npx","args":["-y","@codapult/guard"]}'Claude Desktop에 Guard MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Codex에 Guard MCP 설치
$ codex mcp add codapult-guard -- npx -y @codapult/guardCodex config.toml에 Guard MCP 설치
~/.codex/config.toml
[mcp_servers.codapult-guard] command = "npx" args = ["-y", "@codapult/guard"]
Gemini CLI에 Guard MCP 설치
$ gemini mcp add -s user codapult-guard npx -- -y @codapult/guardGemini settings.json에 Guard MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능codapult/codapult-guard is public and reachablegithub.com/codapult/codapult-guard ↗통과
- 패키지가 이 저장소를 소스로 명시@codapult/guard names codapult/codapult-guard as sourcenpmjs.com/package/@codapult/guard ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for @codapult/guardnpmjs.com/package/@codapult/guard/v/0.14.1#provenance ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-10github.com/codapult/codapult-guard ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from @codapult/guard통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음115 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기@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 질문
Guard MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add codapult-guard -- npx -y @codapult/guard를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Guard MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Guard는 어떻게 아키텍처 회귀를 방지합니까?
팀이 프로젝트별 경계를 승인할 수 있도록 하며, 규칙이 트리거될 때 변경된 파일에서 경계를 위반하는 import를 감지합니다.
Guard는 코드 검사를 위해 LLM을 사용합니까?
아니요, Guard는 로컬 우선 방식으로 작동하며 LLM을 호출하지 않습니다. 모델 액세스 및 편집은 AI 호스트가 담당합니다.
Guard의 시스템 요구 사항은 무엇입니까?
Node.js 버전 20.19 이상과 JavaScript 또는 TypeScript 프로젝트가 필요합니다.
MCP server는 인증을 어떻게 처리합니까?
MCP server는 호스트 관리형 로컬 stdio를 사용하며, 네트워크 리스너나 애플리케이션 수준의 인증을 사용하지 않습니다.