# pinright

The pinright Claude Code MCP server supplies docs for the exact library version in use and checks dependencies before installation. Its hook can stop an install command when a package version has known advisories.

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

## What it does

pinright gives the agent documentation matched to a library version and checks a package before its install command runs. Its MCP tools report known advisories and suggest a version to pin; the pre-install hook can block the command.

Checks also cover malware, misleading package names, and versions that do not exist. For a full dependency-tree audit, pinright includes `check-manifest`, SARIF, and a GitHub Action.

Node 20.9 or newer is required. The install hook is available in six clients, including Claude Code. The `init` command connects the MCP server and writes a starter `.pinright.json` file.

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

## Install

### Claude Code (native platform)

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

### Codex

**Platform CLI**
```bash
codex mcp add pinright --env GITHUB_TOKEN=<GITHUB_TOKEN> --env PINRIGHT_GH_CLI=<PINRIGHT_GH_CLI> -- npx -y pinright
```
Replace <…> with your own values

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GITHUB_TOKEN=<GITHUB_TOKEN> -e PINRIGHT_GH_CLI=<PINRIGHT_GH_CLI> pinright npx -y pinright
```
Replace <…> with your own values

## When to use it
- check a package for known advisories before installing it
- find a safer dependency version to pin
- retrieve documentation for a specific library version
- audit the dependency tree from a lockfile

## Example prompts
- Check `lodash@4.17.20` for advisories and suggest a safer version.
- Show the docs for the version of this library in the project.
- Audit the project manifest for vulnerable dependencies.

## Similar
- [ghost-repo-context](https://affpapa.org/en/nevibecode/skills/ghost-repo-context.md) — skill · 4200 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 89500 installs
- [adding-dependencies](https://affpapa.org/en/nevibecode/skills/adding-dependencies.md) — skill · 25500 installs
- [ghost-scan-deps](https://affpapa.org/en/nevibecode/skills/ghost-scan-deps.md) — skill · 4700 installs
- [dependabot](https://affpapa.org/en/nevibecode/skills/dependabot.md) — skill · 4400 installs
- [dependency-checker](https://affpapa.org/en/nevibecode/hooks/dependency-checker.md) — hook · 2314 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
