New:Socket for Asana Is Now Available.Learn more
Get Started

@graneth/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graneth/mcp-server

Account-free MCP server: catch AI-hallucinated packages and hardcoded secrets before you commit. Exposes the free pre_flight_check tool over stdio.

Source
npmnpm
Version
0.3.1
Version published
Weekly downloads
118
24.21%
Maintainers
1
Weekly downloads
 
Created
Source

@graneth/mcp-server

An account-free Model Context Protocol server that catches AI-hallucinated dependencies and hardcoded secrets in your staged changes before you commit — straight inside your AI coding agent.

It exposes a single, always-free tool over stdio:

pre_flight_check

Give it your staged files (path + content). It will:

  • Detect hallucinated / slopsquatted packages — every package referenced in import statements and declared in manifests (package.json, requirements*.txt) is checked live against the npm and PyPI registries. A package that doesn't exist (404) is the hallmark of an AI-invented dependency an attacker may have pre-registered. → BLOCKED. A manifest that cannot be parsed is reported, never silently skipped. → REVIEW_REQUIRED.
  • Flag brand-new packages (published < 30 days ago) — the prime slopsquatting attack window. → REVIEW_REQUIRED.
  • Catch hardcoded secrets — known credential patterns (AWS, GitHub, Slack, OpenAI sk-…/sk-proj-…, Anthropic sk-ant-…, Stripe sk_live_…, PEM private keys) plus Shannon-entropy analysis with semantic variable-name context. → BLOCKED / REVIEW_REQUIRED. Vendor-documented sample keys and secrets in test/fixture files are downgraded to warnings — surfaced, but they won't block a commit.

No Graneth account, API key, or hosted backend is required. The checks run locally; the only network calls are to the public npm/PyPI registries.

Install / run

npx -y @graneth/mcp-server

Configure your agent

The snippet is the same everywhere; only the file it goes in (or the CLI command) differs per client:

{
  "mcpServers": {
    "graneth": {
      "command": "npx",
      "args": ["-y", "@graneth/mcp-server"]
    }
  }
}
ClientAdd it viaConfig location
Claude Code (CLI)claude mcp add --transport stdio graneth -- npx -y @graneth/mcp-serverWrites to ~/.claude.json (local scope, default). Add --scope project to write a shareable .mcp.json at the repo root instead.
CursorPaste the snippet above~/.cursor/mcp.json (global) or <project-root>/.cursor/mcp.json (this project only)
WindsurfPaste the snippet above~/.codeium/windsurf/mcp_config.json (macOS/Linux) · %USERPROFILE%\.codeium\windsurf\mcp_config.json (Windows)
Claude DesktopPaste the snippet abovemacOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json

Then ask your agent to run pre_flight_check before suggesting a commit. A BLOCKED verdict means: do not commit until the CRITICAL findings are fixed.

Verdicts

VerdictMeaning
CLEARNo issues — safe to commit.
REVIEW_REQUIREDWarnings to confirm (new packages, lower-confidence).
BLOCKEDCritical issues (non-existent package / secret) — do not commit.

How it relates to Graneth

This server shares its detection core with the hosted Graneth scanner via the internal @graneth/core-checks module, so local pre-flight results match what the full PR scan would find.

License

MIT

Keywords

mcp

FAQs

Package last updated on 10 Jul 2026

Related posts