
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@graneth/mcp-server
Advanced tools
Account-free MCP server: catch AI-hallucinated packages (npm, PyPI, crates.io, RubyGems, Go, Packagist), risk-score the dependencies an AI agent introduces, and find hardcoded secrets before you commit. Exposes the free pre_flight_check tool over stdio.
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.
Zero runtime dependencies (verify: npm view @graneth/mcp-server dependencies). A
supply-chain security tool should be auditable in full — so the MCP/JSON-RPC layer is a
small hand-rolled core, not a framework, and npm audit on a fresh install is clean.
It exposes a single, always-free tool over stdio:
pre_flight_checkGive it your staged files (path + content). It will:
package.json,
requirements*.txt, Cargo.toml, go.mod, Gemfile, composer.json) is
checked live against six registries: npm, PyPI, crates.io, RubyGems, the
Go module proxy, and Packagist. 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, and an unreachable registry is reported as "could not verify" —
never as clean. → REVIEW_REQUIRED.report_hallucination below) ship to every user at the next
release.dependency_risk_shape warning surfaces that stacked shape at
generation time — explicitly a risk assessment, never a malware claim.
→ REVIEW_REQUIRED.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 package registries (npm, PyPI, crates.io, RubyGems, proxy.golang.org, Packagist).
npx -y @graneth/mcp-server
Most clients take this exact JSON block; only the file it goes in (or the CLI
command) differs. Codex is the exception — it configures MCP in TOML — and Zed
names the block context_servers:
{
"mcpServers": {
"graneth": {
"command": "npx",
"args": ["-y", "@graneth/mcp-server"]
}
}
}
| Client | Add it via | Config location |
|---|---|---|
| Claude Code (CLI) | claude mcp add --transport stdio graneth -- npx -y @graneth/mcp-server | Writes to ~/.claude.json (local scope, default). Add --scope project to write a shareable .mcp.json at the repo root instead. |
| OpenAI Codex (CLI) | codex mcp add graneth -- npx -y @graneth/mcp-server · verify with codex mcp list | ~/.codex/config.toml — TOML, not JSON: [mcp_servers.graneth] with command = "npx" and args = ["-y", "@graneth/mcp-server"] |
| Gemini CLI | gemini mcp add graneth npx -y @graneth/mcp-server — or paste the snippet above | ~/.gemini/settings.json (user) or .gemini/settings.json (this project only) |
| Cursor | Paste the snippet above | ~/.cursor/mcp.json (global) or <project-root>/.cursor/mcp.json (this project only) |
| VS Code (GitHub Copilot, agent mode) | One-click "Add to VS Code" on graneth.com | VS Code's own MCP registry (Copilot reads it; Claude Code does not) |
| Windsurf | Paste the snippet above | ~/.codeium/windsurf/mcp_config.json (macOS/Linux) · %USERPROFILE%\.codeium\windsurf\mcp_config.json (Windows) |
| Zed | Paste into settings — the block is context_servers, with "source": "custom" | settings.json (user) or <project-root>/.zed/settings.json |
| Claude Desktop | Paste the snippet above | macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json |
| Any other MCP host | Point it at npx -y @graneth/mcp-server | Nothing here is client-specific: the server speaks MCP over stdio and answers initialize + tools/list like any other. |
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.
| Verdict | Meaning |
|---|---|
CLEAR | No issues — safe to commit. |
REVIEW_REQUIRED | Warnings to confirm (new packages, lower-confidence). |
BLOCKED | Critical issues (non-existent package / secret) — do not commit. |
report_hallucination (opt-in contribution)When pre_flight_check catches a name that doesn't exist, you can donate it to
Graneth's public threat feed — one tool
call, only after the human explicitly agrees (the tool description
instructs the agent to ask first). What you get back: the name stays caught for
every user even if an attacker registers the package later, and the feed
entry can carry your public handle (reporter, optional).
Privacy is structural, not a promise:
graneth.com, and only when invoked;
pre_flight_check itself stays local + public registries.vendor/ pairs are
rejected by the server — that's where company-internal names live, and a
public feed must not leak them.This server shares its detection core with the hosted
Graneth scanner via the @graneth/core-checks module —
published in full alongside this package at
zubovartemiy/graneth-mcp — so
local pre-flight results match what the full PR scan would find.
The release script itself lives in the private monorepo, not in this tree — but what it refuses to do is worth stating, because it is the reason a supply-chain tool can be trusted with its own supply chain. Every step fails CLOSED:
private:true;@graneth/mcp-server;master, clean working tree;dist/, README.md, LICENSE, package.json aborts the publish;repository link cannot point at older code
than the package.Guard 5 is what makes "accidentally publish the whole repository" structurally impossible rather than merely unlikely — this project has the incident that taught it.
MIT
FAQs
Account-free MCP server: catch AI-hallucinated packages (npm, PyPI, crates.io, RubyGems, Go, Packagist), risk-score the dependencies an AI agent introduces, and find hardcoded secrets before you commit. Exposes the free pre_flight_check tool over stdio.
We found that @graneth/mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.