Guard
Local MCP server giving JS/TS coding agents architecture rules and project context
The repository was last updated 9 days ago and is published under MIT.
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- GitHub stars
- 4
- Last commit
- 9 days ago
- Language
- TypeScript
Similar MCP servers
About Guard
Guard is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Guard learns a JavaScript or TypeScript repository's structure, dependencies and boundaries, then checks changes against rules the team has approved. The README's example is a project that requires client components to stay away from persistence modules: once that boundary is approved, an import that crosses it in a changed file is flagged along with the rule that triggered.
It writes a project model, proposed rules, contracts and a baseline under .codapult/guard/ for review, and proposed rules are not active until approved. Results come as deterministic CLI, JSON and SARIF output, so the same checks run locally and in CI, with presets for plain pull request checks, trusted PR verification and merge queues.
Guard does not call an LLM; the AI host owns model access and edits. The MCP server runs over host-managed stdio with no network listener or application-level authentication. It needs Node.js 20.19 or newer, is MIT licensed, and the install-agent command adds managed instructions for hosts including Codex, Cursor, Claude Code, Copilot and Gemini CLI.
Install
Run in a terminal
claude mcp add guard -- npx -y @codapult/guardAdd to claude_desktop_config.json
{
"mcpServers": {
"guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"guard": {
"command": "npx",
"args": [
"-y",
"@codapult/guard"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
What it does
- Architecture boundary checks
- Detects imports that break team-approved rules in changed files.
- Approval before activation
- Proposed rules do not take effect until the team approves them.
- CI-ready output
- Produces CLI, JSON and SARIF results with GitHub presets.
- Change impact context
- Prepares bounded, redacted context for AI review.
- Agent instructions
- install-agent adds a managed instruction block for a chosen host.
Good for
- Stop AI-generated code from importing the database from client components
- Run architecture checks as a required pull request check
- Give a coding agent project context before it edits
- Review change impact on a TypeScript monorepo
Pricing
Open source
MIT licensed
Guard FAQ
Does Guard call an LLM?
No. It is local-first and the AI host owns model access.
What does it need?
Node.js 20.19 or newer and a JavaScript or TypeScript project.
Does it replace linters or tests?
No. The README says it complements TypeScript, ESLint or Biome, tests, SAST and dependency scanners.
What licence is it?
MIT.
Is Guard free?
Yes. Guard is open source, so you can use and self-host it for free.
How do I add Guard to Claude Code?
Run this command in your terminal: claude mcp add guard -- npx -y @codapult/guard
What are the best alternatives to Guard?
The closest alternatives to Guard are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


