JavaScript ve TypeScript kod tabanlarında mimari sınırları zorunlu kılar ve yapay zeka kodlama ajanları için proje bağlamı sağlar.
Ayrıca bilinen adı codapult/codapult-guard, codapult-guard, @codapult/guard
- Yıldızlar
- 4
- Araçlar
- —
- İndirmeler, 30 gün
- 3.407
- En son sürüm
- 0.14.1
- Son commit
- 10 Kas 2026
- Lisans
- MIT
Guard MCP nedir?
Guard bir MCP sunucusudur. JavaScript ve TypeScript kod tabanlarında mimari sınırları zorunlu kılar ve yapay zeka kodlama ajanları için proje bağlamı sağlar.
Özet, projenin README dosyasından oluşturuldu
Guard MCP sunucusu hakkında
Guard, JavaScript ve TypeScript kod tabanlarında mimari bütünlüğü korumayı geliştirme ekipleri için mümkün kılar. Bağımlılıkları ve sınırları belirlemek için özel proje yapınızı haritalandırır; böylece geçersiz importları veya yapısal gerilemeleri önleyen özel kuralları onaylamanıza olanak tanır. Standart tip denetleyicilerinin aksine, istemci bileşenlerini kalıcılık modüllerinden ayrı tutmak gibi projeye özgü gereksinimleri anlar.
Geliştiriciler bu aracı yerel olarak veya GitHub gibi CI ortamlarında, pull request'ler veya merge kuyrukları için ön ayarlar kullanarak kullanabilirler. MCP server, host tarafından yönetilen yerel stdio üzerinden çalışır; bu da herhangi bir ağ dinleyicisi veya uygulama düzeyinde kimlik doğrulama gerektirmediği anlamına gelir. ESLint, Biome veya TypeScript gibi mevcut araçların yerini almak yerine onlarla birlikte çalışır. Bir AI ajanına entegre etmek için, doğrulama için gerekli bağlamı sağlamak amacıyla install-agent komutunu kullanabilirsiniz.
Belirlenmiş CLI, JSON ve SARIF sonuçları sunarak, AI kodlama ajanlarının insan geliştiricilerle aynı mimari bağlamı ve doğrulama bulgularını almasını sağlar. Bu, ajanların yerleşik proje sözleşmelerinizi ihlal eden değişiklikler yapmasını önlemeye yardımcı olur.
Neler yapabilirsiniz
- 1Mimari gerilemeleri önleyinYeni bir importun belirlenmiş proje sınırlarını ihlal edip etmediğini kontrol etmesi için AI'dan talepte bulunun.
- 2Ajanlara mimari bağlam sağlayınBir AI ajanına proje yapısını ve onaylanmış kuralları vererek belirli tasarım desenlerinize uymasını sağlayın.
- 3Pull request incelemelerini otomatize edinHer pull request'in mimari sözleşmelerinize uygun olduğundan emin olmak için otomatik kontroller kurun.
- 4Değişiklik etkisini analiz edinBir kod değişikliğinin mevcut proje yapısını nasıl etkilediğini anlamak için aracı kullanın.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Guard MCP nasıl yüklenir
Biçimler 10 Kas 2026 tarihinde doğrulandıCursor'a ekleGoose'a ekleGuard MCP'yi Claude Code içine yükleyin
$ claude mcp add codapult-guard -- npx -y @codapult/guardGuard MCP'yi Cursor içine yükleyin
~/.cursor/mcp.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP'yi VS Code içine yükleyin
.vscode/mcp.json
{
"servers": {
"codapult-guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP'yi VS Code CLI içine yükleyin
$ code --add-mcp '{"name":"codapult-guard","type":"stdio","command":"npx","args":["-y","@codapult/guard"]}'Guard MCP'yi Claude Desktop içine yükleyin
claude_desktop_config.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Guard MCP'yi Codex içine yükleyin
$ codex mcp add codapult-guard -- npx -y @codapult/guardGuard MCP'yi Codex config.toml içine yükleyin
~/.codex/config.toml
[mcp_servers.codapult-guard] command = "npx" args = ["-y", "@codapult/guard"]
Guard MCP'yi Gemini CLI içine yükleyin
$ gemini mcp add -s user codapult-guard npx -- -y @codapult/guardGuard MCP'yi Gemini settings.json içine yükleyin
~/.gemini/settings.json
{
"mcpServers": {
"codapult-guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Otomatik kontroller
Çalıştırıldı 14 Kas 2026Tam rapor →Otomatik kontrollerimizden geçti. Bu bir güvenlik denetimi değildir: kodu okuyun ve sunucuya ihtiyaç duyduğu en dar erişimi verin. Kontroller nasıl çalışır
- Kaynak deposu bağlantılı ve erişilebilircodapult/codapult-guard is public and reachablegithub.com/codapult/codapult-guard ↗Geçti
- Paket, bu depoyu kaynağı olarak gösteriyor@codapult/guard names codapult/codapult-guard as sourcenpmjs.com/package/@codapult/guard ↗Geçti
- Derleme kökeni (Sigstore onayı)Sigstore attestation for @codapult/guardnpmjs.com/package/@codapult/guard/v/0.14.1#provenance ↗Geçti
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit or release 2026-11-10github.com/codapult/codapult-guard ↗Geçti
- OpenSSF ScorecardKontrol edilmedi
- Paket adı popüler bir pakete yakın değilNo popular package one edit away from @codapult/guardGeçti
- Pakette veya bağımlılıklarında kritik uyarı yok115 resolved dependencies checked; no critical advisoryosv.dev ↗Geçti
- Modele yönelik gizli talimat yok0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersGeçti
- Yıkıcı araçlar etiketlenmişKontrol edilmedi
- Uzak uç nokta MCP el sıkışmasına yanıt veriyorKontrol edilmedi
@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 soruları
Guard MCP'yi Claude Code'a nasıl eklerim?
Terminalinizde claude mcp add codapult-guard -- npx -y @codapult/guard komutunu çalıştırın. Her projede kullanılabilir olması için --scope user ekleyin.
Guard MCP'yi Cursor'a nasıl eklerim?
~/.cursor/mcp.json dosyasını açın ve yukarıdaki yükleme bölümünde gösterilen Cursor yapılandırmasını kullanarak sunucuyu mcpServers altına ekleyin.
Guard mimari gerilemeleri nasıl önler?
Ekiplerin projeye özel sınırları onaylamasına olanak tanır ve bir kural tetiklendiğinde değiştirilen dosyalardaki ihlal edilen importları tespit eder.
Guard kod kontrolü için LLM kullanıyor mu?
Hayır, Guard yerel önceliklidir ve bir LLM çağırmaz; model erişimi ve düzenlemelerden AI host sorumludur.
Guard için sistem gereksinimleri nelerdir?
Node.js sürüm 20.19 veya üzeri ile bir JavaScript veya TypeScript projesine ihtiyacınız vardır.
MCP server kimlik doğrulamasını nasıl yönetiyor?
MCP server, host tarafından yönetilen yerel stdio kullanır; ağ dinleyicileri veya uygulama düzeyinde kimlik doğrulama kullanmaz.