# landmine

landmine — an MCP server that tracks open bugs in exact npm and PyPI versions from your lockfile and stops the agent before it writes code that hits a known issue.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 10 repo stars
- Author: devanshranjan10
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/devanshranjan10/landmines
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/landmine

## What it does

Two-stage workflow: `landmine scan` reads the lockfile, finds open GitHub issues filed against the pinned versions, picks useful workarounds from the comment threads, and writes an index to `.landmine/index.json`. The `landmine install --rules` command adds a pre-edit hook and writes known-bugs sections into `AGENTS.md` and `CLAUDE.md`.

The hook runs offline in a fraction of a second before each edit, and fires only if the file contains a symbol from the index and meets the issue's extra conditions — for example, it also uses the database driver mentioned in the bug report. The agent sees the issue link and a quoted workaround. If the agent retries the same edit, the hook lets it through.

For large projects with dozens of dependencies, the issue list in `CLAUDE.md` may not fit in context. In that case, keep just the hook or use the hosted MCP server at `https://landmine.tech/mcp`, which the agent queries on demand — no GitHub token required.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://landmine.tech/mcp`
- Environment variables: `GITHUB_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http landmine https://landmine.tech/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env GITHUB_TOKEN=<GITHUB_TOKEN> --transport stdio landmine -- npx -y landmines
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add landmine --url https://landmine.tech/mcp
```

2. **Platform CLI**
```bash
codex mcp add landmine --env GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y landmines
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "landmine": {
            "url": "https://landmine.tech/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "landmine": {
            "command": "npx",
            "args": [
                "-y",
                "landmines"
            ],
            "env": {
                "GITHUB_TOKEN": "<GITHUB_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "landmine": {
            "type": "http",
            "url": "https://landmine.tech/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "landmine": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "landmines"
            ],
            "env": {
                "GITHUB_TOKEN": "<GITHUB_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http landmine https://landmine.tech/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e GITHUB_TOKEN=<GITHUB_TOKEN> landmine npx -y landmines
```
Replace <…> with your own values

## When to use it
- stop the agent before an edit that uses an API with an open bug in the exact lockfile version
- extract a workaround from issue comments and hand it to the agent
- check whether an error has an open bug in the pinned library version
- add a known-bugs section to agent documentation

## Example prompts
- Run `npx landmines scan` and then `npx landmines install --rules` to add the hook and section to `CLAUDE.md`.
- Check if there's an open bug in `drizzle-orm` version 0.36.0 for the `$client.end()` method.
- Find workarounds for issues in `react-hook-form` that apply to the version in `package-lock.json`.

## Similar
- [git-workflow](https://affpapa.org/en/nevibecode/skills/netresearch-dtt-gmbh-git-workflow.md) — skill · 759 installs
- [Vynix](https://affpapa.org/en/nevibecode/mcp/vynix.md) — MCP server · ★ 10 repo stars
- [shellcheck-configuration](https://affpapa.org/en/nevibecode/skills/shellcheck-configuration.md) — skill · 11533 installs
- [SnagRelay](https://affpapa.org/en/nevibecode/mcp/snagrelay.md) — MCP server
- [static-code-analysis](https://affpapa.org/en/nevibecode/skills/static-code-analysis.md) — skill · 624 installs
- [implementing-secret-scanning-with-gitleaks](https://affpapa.org/en/nevibecode/skills/implementing-secret-scanning-with-gitleaks.md) — skill · 577 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
