# Groundrule

> Groundrule is an open-source MCP server for developer tools. Gives coding agents your repo's engineering standards and checks their changes. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Website:** https://docs.groundrule.dev/developers/agents/mcp/
- **Repository:** https://github.com/metricall-ai-lab/groundrule-oss
- **MCP Registry name:** io.github.Metricall-AI-Lab/groundrule
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

Groundrule's MCP server runs from the CLI inside your repository and reads `.groundrule/config.yaml`. It gives an agent three tools: `list_standards` shows the rules in effect, `check` tests the agent's changes against them locally, and `propose_rule` sends a suggested rule to your team's inbox for review. The idea is that a correction you make in a session can turn into a proposed standard.

Standards are small YAML files kept in git. The wider tool writes AGENTS.md, CLAUDE.md, Cursor rules and Copilot instructions containing only the standards that apply, and runs deterministic checks, Semgrep and optional AI checks in CI. Offline mode needs no account and nothing leaves your machine; proposing rules requires a connected workspace with a sign-in or token.

Node.js 22 or later is required. A hosted server at mcp.groundrule.dev is also offered for cloud agents and web IDEs that cannot run the CLI. The README labels the project 0.x with a format that may still change.

## Features

- **List rules in effect:** `list_standards` returns the standards that apply in the repository.
- **Check own changes:** `check` tests an agent's changes against the standards before it finishes.
- **Rule proposals:** `propose_rule` sends a rule to the team inbox for review.
- **Offline mode:** With no platform set, checks run locally and nothing is uploaded.
- **Hosted option:** A hosted server serves a workspace's latest rules to agents that cannot run the CLI.
- **Agent instruction files:** `sync` writes AGENTS.md, CLAUDE.md, Cursor and Copilot instructions.

## Good for

- Keep an agent within a team's dependency and import rules
- Check an agent's diff before it opens a PR
- Turn a code-review correction into a reusable standard
- Generate consistent agent instruction files across tools
- Enforce the same rules locally and in CI

## Install

### Claude Code (Terminal)

```sh
claude mcp add groundrule -- npx -y @groundrule/cli
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

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

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

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

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

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

## Tools

- `list_standards`: Reads the rules in effect in the repository.
- `check`: Checks the agent's changes against the standards.
- `propose_rule`: Sends a proposed rule to the team's inbox for review.

## FAQ

### What does it need to run?

Node.js 22 or later on the agent's PATH, started from inside the repository.

### Does it send my code anywhere?

In offline mode nothing leaves your computer. In a connected workspace only per-rule counts are reported from checks.

### Which agents are covered?

Claude Code, Cursor and VS Code have setup steps, and any client that can start a stdio server works.

### Is there a hosted version?

Yes, at https://mcp.groundrule.dev/mcp.

### Is Groundrule free?

Yes. Groundrule is open source, so you can use and self-host it for free.

### How do I add Groundrule to Claude Code?

Run this command in your terminal: claude mcp add groundrule -- npx -y @groundrule/cli

### What are the best alternatives to Groundrule?

The closest alternatives to Groundrule are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

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