# Codehabits

> Codehabits is an open-source MCP server. Team conventions, anti-patterns, and domain knowledge from .codehabits/ for AI coding agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Website:** https://codehabits.dev/docs/mcp
- **Repository:** https://github.com/codehabits-dev/codehabits
- **MCP Registry name:** io.github.codehabits-dev/codehabits-mcp
- **Listing updated:** 2026-11-13

## About

Team conventions, anti-patterns, and domain knowledge from .codehabits/ for AI coding agents.

## Install

### Claude Code (Terminal)

```sh
claude mcp add codehabits-mcp -- npx -y @codehabits/mcp
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

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

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

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

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

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

## FAQ

### Is Codehabits free?

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

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

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

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