Skip to content
LyraShield AIOpen beta

Updated

Claude Code

Claude Code reads MCP servers from a .mcp.json file in your project root, or you can register a server with the claude mcp add CLI command.

Option A — .mcp.json (recommended for teams)

Create or open .mcp.json in your project root and add the following. Commit the file to share the configuration with your team; each developer supplies their own API key via the environment variable.

{
  "mcpServers": {
    "lyrashield": {
      "command": "npx",
      "args": ["-y", "@lyrashield/mcp"],
      "env": {
        "LYRASHIELD_API_KEY": "lsk_your_key_here",
        "LYRASHIELD_API_URL": "https://app.lyrashieldai.com"
      }
    }
  }
}
API key: Create a workspace key under Settings → API keys in the LyraShield app. Keys begin with lsk_. Use a read-only key for inspection tools and a read-and-write key if you need to trigger scans or submit findings.

Option B — claude mcp add CLI

Run the following command in a terminal. Claude Code stores this globally and it applies across all projects for the current user.

claude mcp add lyrashield \
  --command npx \
  --args "-y,@lyrashield/mcp" \
  --env LYRASHIELD_API_KEY=lsk_your_key_here \
  --env LYRASHIELD_API_URL=https://app.lyrashieldai.com

Verify the connection

After reloading Claude Code, open the MCP servers panel. You should see lyrashield listed as connected. Ask Claude: "What LyraShield tools are available?" to confirm the tools surface correctly.

Agent rules

Add a CLAUDE.md snippet to teach Claude when to run LyraShield checks automatically. See the Agent Rules Snippets page for ready-to-paste instructions.

Requirements: Node.js 20+ and a LyraShield workspace API key. The@lyrashield/mcp package is published on npm, sonpx -y @lyrashield/mcp resolves directly.