# Guard MCP server

> Enforces architectural boundaries and provides project context for AI coding agents in JavaScript and TypeScript codebases.

- Repository: https://github.com/codapult/codapult-guard
- Page: https://hostedmcp.org/servers/codapult/codapult-guard
- Transport: stdio
- Stars: 4
- License: MIT
- Latest version: 0.14.1

## Install

### Claude Code

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

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

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

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

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

### VS Code CLI

```sh
code --add-mcp '{"name":"codapult-guard","type":"stdio","command":"npx","args":["-y","@codapult/guard"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

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

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.codapult-guard]
command = "npx"
args = ["-y", "@codapult/guard"]
```

### Gemini CLI

```sh
gemini mcp add -s user codapult-guard npx -- -y @codapult/guard
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## FAQ

### How does Guard prevent architectural regressions?

It allows teams to approve project-specific boundaries and detects violating imports in changed files when a rule is triggered.

### Does Guard use an LLM to check code?

No, Guard is local-first and does not call an LLM; the AI host is responsible for model access and edits.

### What are the system requirements for Guard?

You need Node.js version 20.19 or higher and a JavaScript or TypeScript project.

### How does the MCP server handle authentication?

The MCP server uses host-managed local stdio and does not use network listeners or application-level authentication.
