# Guard

> Guard is an open-source MCP server for developer tools. Local MCP server giving JS/TS coding agents architecture rules and project context. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/codapult/codapult-guard
- **GitHub stars:** 4
- **License:** MIT
- **MCP Registry name:** io.github.codapult/guard
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add guard -- npx -y @codapult/guard
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "guard": {
      "command": "npx",
      "args": [
        "-y",
        "@codapult/guard"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "guard": {
      "command": "npx",
      "args": [
        "-y",
        "@codapult/guard"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "guard": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@codapult/guard"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "guard": {
      "command": "npx",
      "args": [
        "-y",
        "@codapult/guard"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "guard": {
      "command": "npx",
      "args": [
        "-y",
        "@codapult/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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/guard
