# Add Fingerprint to your app Set up Fingerprint device intelligence in this project using the Fingerprint CLI. ## Before you start Do not read or print `.env` files. The CLI writes the API keys itself. ## Step 1: Check for an app Look for a project in the current directory: a `package.json`, a lockfile, or a framework config file. If the directory is empty, ask which framework to scaffold, defaulting to Next.js, create the app, then continue. ## Step 2: Check whether Fingerprint is already installed Search for dependencies starting with `@fingerprint/` or `@fingerprintjs/`, for `FingerprintProvider`, `useVisitorData`, `getData()` or `getEvent`, and for a Fingerprint API key in the environment. If Fingerprint is already installed, say what you found and ask before changing anything. ## Step 3: Run the Fingerprint CLI Run `npx fingerprint`. The CLI opens a browser to sign the user in. Pause and let them finish signing in, then continue. It then provisions API keys into `.env` and adds client identification and server-side verification for the detected stack. Follow its prompts and let it make the changes. Do not hand-write the integration yourself unless the CLI has run and failed. ## Step 4: Verify Start the dev server and trigger the identified action, then confirm a new event appears on the Events page of the Fingerprint dashboard. Ad blockers stop the JavaScript agent from loading, so tell the user to disable theirs for local testing. ## Step 5: Query events with the MCP server Offer to connect the Fingerprint MCP server so the user can query their identification events from their agent. In Claude Code, run `claude mcp add --transport http fingerprint https://mcp.fpjs.io/mcp` and have them authorize in the browser. For other clients, see https://docs.fingerprint.com/docs/mcp-server. ## Resources If you need more than this file covers: - Fingerprint CLI: https://github.com/fingerprintjs/fingerprint-cli - Documentation index for agents: https://docs.fingerprint.com/llms.txt (full text: https://docs.fingerprint.com/llms-full.txt) - MCP server setup: https://docs.fingerprint.com/docs/mcp-server These instructions are published at https://fingerprint.com/get-started.md so you can re-verify their authenticity at any time.