npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lyrashield/mcp

v0.2.14

Published

LyraShield AI MCP server — run bounded security scans, review recorded evidence states, and drive the fix/verify loop from your AI coding tool.

Readme

@lyrashield/mcp

This guide documents @lyrashield/[email protected] and its matching [email protected] CLI setup.

The LyraShield AI Model Context Protocol server. It lets an AI coding tool run bounded security scans, read findings with their recorded evidence states and drive the fix → verify loop against your LyraShield workspace — without leaving the editor.

Built on the official @modelcontextprotocol/sdk. Available two ways: this stdio package (local editors) and a hosted remote (Streamable HTTP) endpoint at /api/mcp for cloud platforms that can't run a local server (Lovable, Bolt.new, Replit, v0). The server is also distributed as a portable Agent Plugin via @lyrashield/agent-plugin (Agent Plugins v1.0.0).

Use hosted OAuth when the client supports remote MCP authorization. For local stdio clients, run npx -y [email protected] login --oauth once and reuse the user-only credential store. Workspace API keys are the explicit CI/headless fallback, not the default interactive setup.

Protocol compatibility

The workspace lock used for this release resolves @modelcontextprotocol/sdk 1.32.0. That installed version reports 2025-11-25 as its latest protocol and also negotiates 2025-06-18, 2025-03-26, 2024-11-05 and 2024-10-07 for older clients. Protocol version 2026-07-28 is not in the pinned SDK's supported-version list, so LyraShield neither advertises nor emulates it — an initialize for it is answered with 2025-11-25 and post-initialization requests bearing the 2026-07-28 header are rejected with the supported-version list.

  • Server identity includes a title, description, website, version and usage instructions.
  • Every tool publishes an input schema, output schema, title, safety annotations and structured content.
  • Only lyrashield_scan_target supports task augmentation, and only when the 2025-11-25 protocol is negotiated. Stdio uses the local task backend; hosted Streamable HTTP enables tasks only for a connected OAuth client. Hosted API-key clients and older protocol versions keep immediate tools/call behavior.
  • An MCP task ID and a LyraShield scan ID are different identifiers. Poll supported tasks with tasks/get and tasks/result, cancel with tasks/cancel, and use lyrashield_get_scan_status when a call returns only the durable scan ID. Hosted task state is derived from the durable operation and scan rows and is re-authorized on each request; stdio task listing lasts only for the process session.
  • Hosted responses use Cache-Control: no-store and vary on authorization and MCP protocol version. The server does not advertise unsupported MCP list-cache metadata.
  • Call arguments are validated against each tool's advertised inputSchema before execution; violations return a structured Invalid tool arguments error naming the offending fields.
  • Tool results are capped at 256 KiB serialized (MCP_RESULT_MAX_BYTES). Oversized text content and structuredContent are truncated with an explicit [… truncated] marker / truncated: true flag so a partial result is never mistaken for a complete one.
  • The hosted transport remains stateless and fail-closed. Its per-request task adapter resolves durable operation and scan rows, binds them to the verified OAuth connection and checks authorization again for reads and cancellation.

See Protocol conformance for tested behavior and unsupported draft gaps. Tool annotations are client hints only; the server always enforces prompt-injection checks and the connection's server-side authorization independently.

What it can do

Every API-backed tool calls the LyraShield REST API with a workspace API key or OAuth bearer; the local-only lyrashield_check_diff tool heuristically checks a caller-supplied diff string argument and needs neither. New write-scoped OAuth consent has one Connect action authorizing the displayed workflows for the workspace, including current and future targets and supported scan profiles. Matching hosted calls run without another LyraShield review and require an idempotency key. Read-only requests remain read-only; existing restricted connections are never silently expanded.

| Tool | Kind | What it does | | ------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------- | | lyrashield_list_workspaces | read | List workspaces this key can access | | lyrashield_list_targets | read | List targets (repos/apps/APIs) in a workspace | | lyrashield_get_scan_status | read | Status, timing and events for a scan | | lyrashield_get_scan_quality | read | Evidence-quality surface for a scan: verification tiers, coverage receipts and labeled heuristics | | lyrashield_get_scan_eligibility | read | Advisory preflight: whether a scan on a target would currently be admitted, with denial codes | | lyrashield_get_setup_health | read | Versioned cross-client setup health with stable reason and recovery codes; never mutates or authorizes a scan | | lyrashield_get_findings | read | Paginated findings (default 50, max 100), filterable by target, scan, status, severity and verification | | lyrashield_explain_finding | read | Full detail + plain-language explanation of a finding | | lyrashield_generate_fix_plan | read | Assemble a remediation plan from a finding | | lyrashield_get_launch_readiness | read | Versioned release-gate state for one target (READY / NOT_READY / INSUFFICIENT_EVIDENCE with applicability detail) | | lyrashield_create_pr_security_recap | read | Markdown recap for a PR comment | | lyrashield_check_diff | read | Fast advisory heuristic pre-filter on a diff (not a scan) | | lyrashield_list_scan_attachments | read | List workspace scan attachments (id, filename, media type, size) | | lyrashield_scan_target | write | Start a scan on a target | | lyrashield_cancel_scan | write | Request cancellation of a queued or running scan | | lyrashield_run_pr_scan | write | Start a PR-focused (CHECK_PR) scan | | lyrashield_record_fix_proposal | write | Record a fix proposal on a finding | | lyrashield_verify_fix | write | Queue a retest to verify a fix | | lyrashield_create_report | write | Generate a shareable report | | lyrashield_upload_scan_attachment | write | Upload text content (~100 KB cap here; 1 MiB via CLI/SDK) as scan input evidence | | lyrashield_delete_scan_attachment | write | Delete a workspace scan attachment | | lyrashield_request_fix_pr | write | Request a fix pull request (approval-bound; never merged automatically) |

lyrashield_check_diff is a lightweight local heuristic (obvious hardcoded secrets, eval, unsafe HTML, SQL concatenation, plus structural WebMCP checks when you pass optional files: [{path, content}] snapshots) meant as a pre-PR pre-filter. It is not a scanner — run lyrashield_run_pr_scan for a bounded repository scan with findings, coverage receipts, evidence states and explicit limitations. Its coverage field states exactly what was analyzed: only the supplied inputs, never the whole repository. Results are not automatically independently verified or exploit-validated.

lyrashield_scan_target and lyrashield_run_pr_scan accept targetId directly or you can pass repo (e.g. ecryptoguru/lyrashield-ai, https://github.com/ecryptoguru/lyrashield-ai.git or [email protected]:ecryptoguru/lyrashield-ai.git) to create or reuse a target automatically. auto: true detects the current git repo only in the local stdio server; hosted MCP clients must pass repo or targetId.

Review-depth guide: choose QUICK for pre-PR and fast repository checks, STANDARD for general repository or launch reviews and DEEP only for explicit deep/compliance work. SAFE is a compatibility alias for repository QUICK. CUSTOM selects only the repository DEEP profile; it does not select a goal. For an authorized repository pentest, send goal: FULL_PENTEST with mode: DEEP or CUSTOM. Deeper modes consume more compute and take longer, so choose the least intensive mode that answers the question. lyrashield_scan_target defaults to STANDARD; lyrashield_run_pr_scan defaults to QUICK.

Setup

  1. Run npx -y [email protected] login --oauth and select one workspace in the browser.
  2. Add npx -y @lyrashield/[email protected] to the client. No secret belongs in a project config file.

For CI or another environment that cannot complete OAuth, create a workspace API key in LyraShield under Settings → API keys (prefer read-only), then inject these through the client's user-level secret or environment configuration:

  • LYRASHIELD_API_KEY — your lsk_… key
  • LYRASHIELD_API_URL — your LyraShield app URL (defaults to https://app.lyrashieldai.com)

The interactive examples below use the OAuth credential store and therefore contain no secret.

Claude Code / Cursor / Gemini CLI (the mcpServers shape)

{
  "mcpServers": {
    "lyrashield": {
      "command": "npx",
      "args": ["-y", "@lyrashield/[email protected]"]
    }
  }
}

Claude Code one-liner: claude mcp add lyrashield -- npx -y @lyrashield/[email protected]

VS Code (note: the root key is servers, not mcpServers)

.vscode/mcp.json:

{
  "servers": {
    "lyrashield": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@lyrashield/[email protected]"]
    }
  }
}

Codex (~/.codex/config.toml)

OpenAI Codex keeps MCP servers under the [mcp_servers.<name>] table. Explicit environment values live in [mcp_servers.<name>.env]; env_vars is an array of names inherited from the parent process.

[mcp_servers.lyrashield]
command = "npx"
args = ["-y", "@lyrashield/[email protected]"]

For the API-key fallback, add explicit values under [mcp_servers.lyrashield.env] or use env_vars = ["LYRASHIELD_API_KEY"] when Codex should inherit the variable from its parent process.

Per-client config for OpenCode, Kilo Code, Cline, Zed and the cloud platforms lives in the LyraShield docs.

Supported-client boundary

The integration registry contains 51 install entries resolving to 48 preferred client surfaces. Entries are COMPATIBLE, EXPERIMENTAL or DEPRECATED and record either documentation, package-conformance or retained runtime evidence. Presence in the registry means LyraShield can render or guide that client's current config shape; it does not claim that every client release completed an authenticated runtime matrix.

  • Preferred Agent Plugin registry entries: Claude Code, Cursor, OpenAI Codex, GitHub Copilot and Kiro. Registry preference does not establish a vendor marketplace listing or authenticated runtime acceptance. Use the direct MCP path below wherever a client-owned plugin install path is not available or verified. Package-conformance checks cover the four generated shims; GitHub Copilot uses the portable root manifest and remains EXPERIMENTAL until a retained client-runtime receipt exists.
  • VS Code's reserved Agent Plugin entry is experimental and not preferred. Use its verified .vscode/mcp.json path.
  • Config or guided setup: VS Code, Zed, Gemini CLI, OpenCode, Kilo Code, Cline, JetBrains, Amp, Roo Code, MiMo Code, Codebuff, Oh-My-Pi, Copilot CLI, Goose, Aider, Devin CLI, Antigravity, Pi (legacy registry ID picode), OpenClaw, Hermes and Devin, subject to each registry entry's support tier.

Follow the client guides with @lyrashield/[email protected] and npx -y [email protected] login --oauth. The CLI provides documented config writers and shared-skill installation; use npx -y [email protected] install <agent> and npx -y [email protected] skills install <agent> where the selected client has a supported path. Do not install from a mutable marketplace preparation branch. Do not reuse a nearby client's JSON/TOML shape: root keys, transport names, credential interpolation and discovery locations differ.

Credentials resolution

The server gives LYRASHIELD_API_KEY or LYRASHIELD_OAUTH_ACCESS_TOKEN precedence over ~/.lyrashield/credentials.json, the credentials file written by lyrashield login (with 0o600 permissions). LYRASHIELD_API_URL independently overrides the API origin without replacing a stored OAuth credential. npx -y @lyrashield/[email protected] works without any env credential after a single npx -y [email protected] login --oauth.

@lyrashield/mcp is an MCP stdio server, not a command-line scanner: start it with npx -y @lyrashield/[email protected] and let your MCP client call its tools. For pull-request CI, use the LyraShield GitHub Action instead.

lyrashield login --oauth opens hosted consent using authorization code flow with PKCE and an issuer-bound loopback callback. It saves the selected workspace and tokens only after successful exchange and authenticated workspace discovery. Failed login preserves existing credentials. lyrashield login accepts an API key instead. packages/credentials owns storage, environment precedence, origin binding, refresh locking and atomic updates for both CLI and MCP.

Remote (Streamable HTTP) — for cloud editors

Point any remote-MCP-capable client at the hosted endpoint. Two authentication methods are supported:

OAuth 2.0 (recommended): remote clients that support OAuth 2.0 (per the MCP spec) can authenticate through the hosted OAuth flow at /oauth/consent with workspace selection and the scopes requested by the client. The discovery endpoints are .well-known/oauth-authorization-server and .well-known/oauth-protected-resource. Read-only scope stays read-only. Write-scoped consent clearly discloses automatic workspace access and potential scan usage before connecting.

Register the endpoint without a static authorization header so the client can follow discovery:

{
  "mcpServers": {
    "lyrashield": {
      "type": "http",
      "url": "https://app.lyrashieldai.com/api/mcp"
    }
  }
}

API key fallback (Bearer token):

{
  "mcpServers": {
    "lyrashield": {
      "type": "http",
      "url": "https://app.lyrashieldai.com/api/mcp",
      "headers": { "Authorization": "Bearer lsk_your_key" }
    }
  }
}

The remote endpoint runs the same guard and tools as stdio. Hosted responses are never cacheable. OAuth automation binds each call to the connection, workspace, user, OAuth client, authorization version, scopes, expiry, operation, target, profile and canonical input hash. Current membership and role are checked before returning a stored operation result as well as before execution. Pausing, revoking, expiring or changing a connection invalidates subsequent calls immediately.

Authorization behavior

  • New delegated OAuth connection: Connect is the authorization. Matching hosted mutations require idempotencyKey; reuse it only for identical retries.
  • Connection outside its grant: the call fails closed. Reconnect to authorize the required access.
  • Hosted mutations using an API key or legacy token without a valid delegation: one structured connect_required response naming the OAuth connect path. Nothing is queued and no mutation executes — connect an OAuth-capable client first. Read-only tools remain available to an authorized read-scoped API key.
  • Local stdio with an API key: the REST API enforces the credential's scope, current role, target authorization and budget without a second LyraShield prompt.
  • Read-only credential: mutations are denied.

Coding-agent hosts may impose their own tool permission dialogs. LyraShield cannot suppress those controls. API-key and local stdio calls do not claim the hosted OAuth operation ledger's replay guarantee. Pull requests never auto-merge.

Compatibility receipts

  • Package: @lyrashield/[email protected]; runtime: Node.js 24 or newer.
  • SDK lock: @modelcontextprotocol/sdk 1.31.0; stable protocol 2025-11-25, with the older negotiated versions listed above.
  • pnpm --filter @lyrashield/mcp exec vitest run src covers protocol negotiation for every SDK-supported version, fail-closed unknown-version and malformed-input handling, bounded request bodies/batches, stdio/HTTP transport, credentials, prompt-injection guards, schemas, structured results and approval policy — including a packed-tarball stdio handshake.
  • A stored OAuth credential is refreshed before the stdio server starts when it is expired or within the one-minute refresh window, including when LYRASHIELD_API_URL overrides the API origin; the rotated credential is atomically persisted. Environment credentials remain immutable and retain precedence.
  • docs/protocol-conformance.md maps protocol claims to focused tests and lists intentionally unsupported draft features.

These are repository compatibility receipts. Production OAuth callbacks, live provider state, client-specific authenticated browser flows and marketplace publication require separate live evidence and are not implied by a green package suite.

License

Apache-2.0 — LyraShield AI client artifact. The hosted LyraShield service remains proprietary.