Prerequisites
Before you set up Claude Code, make sure you have:- Claude Code installed on your machine
- Node.js 20+ — required for the CLI install
- A Sparkle account — sign up for free
- The Sparkle CLI installed — see Install CLI
Set up Claude Code
1
Sign in
Authenticate with Sparkle via browser OAuth:Your session is stored locally under
~/.sparkle/.2
Configure Claude Code
Wire Claude Code to Sparkle:This connects Claude Code to the Sparkle MCP server, configure sparkle hooks, and registers guardrail rules for your machine.
3
Verify status
Confirm you are logged in and Claude Code is configured:
Verify guardrails
1
Open a project
Open the repository you want to protect with Sparkle in Claude Code.
2
Run a prompt
Use Claude Code in that project. Sparkle applies guardrails on every prompt before code generation.
What setup configures
When you runsparkle setup, the CLI:
- Connects Claude Code to the Sparkle MCP server
- Installs and wires up hooks
- Registers guardrail rules for your workspace
Remove configuration
To remove Sparkle configuration from Claude Code only:Next steps
Using the CLI
Learn the full CLI workflow.
Commands
Full command reference with options.

