Skip to content

Install with your coding agent

Let Claude Code, Cursor or any coding agent add Sypnia to your project, what it will change, the exact prompt for agents without skills, and what to check afterwards.

Applies to EngineCloud
View as Markdown
On this page
  1. Set it up
  2. What the agent will do
  3. Which key goes where
  4. Check it afterwards
  5. The app sends
  6. The agent can read
  7. A problem makes the round trip
  8. If you prefer to do it by hand

This page is for anyone who would rather not edit the code by hand. Your coding agent can add Sypnia to your project for you. It works the same for Sypnia Cloud and for a self-hosted engine: the agent asks which one you use.

At the end you will have: the SDK installed and started in your project, source maps uploaded by your build, your agent connected to Sypnia so it can read problems, and a first check that events arrive.

You need: a project (on Sypnia Cloud, create it in telemetry.app.sypnia.com; on your own engine, see the self-host quickstart), its ingest key, and an API token for the agent.

Set it up

Claude Code

  1. Add the Sypnia skills

    claude plugin marketplace add sespinosav/sypnia-skills
    claude plugin install sypnia@sypnia
  2. Connect the MCP server

    claude mcp add --transport http sypnia \
      https://mcp.sypnia.com \
      --header "Authorization: Bearer YOUR_API_TOKEN"

Then say: «Set up Sypnia in this project».

Two things are installed, and they do different jobs:

What it isWhat it is for
The Sypnia skillsInstructions your agent loads when a task needs them: sypnia-setup adds Sypnia to a project, sypnia-fix fixes a problem Sypnia reported. Open source (MIT).The agent sets Sypnia up correctly the first time, instead of guessing from memory.
The MCP serverA connection from your agent to your Sypnia project.The agent can ask «what is failing in production?» and read the problem, the trace and the session itself.

What each skill may touch, and how to update or remove it, is in Skills. Every way to connect the MCP server, and which token to give it, is in Connect.

An agent that has neither skills nor MCP can still do the setup: the Any agent tab is a prompt that points it at these docs, which every agent can read as plain text.

What the agent will do

Whichever way you start it, a correct setup is these five things. Read the agent’s diff against this list before you accept it.

#The agent shouldYou should see
1Choose the SDK that fits: @sypnia/telemetry/next for Next.js, @sypnia/telemetry/browser for any other web app, @sypnia/telemetry/node for a Node server, and the bridge @sypnia/telemetry/otel when the app already registers OpenTelemetry. Install it with your project’s package manager.One new dependency in package.json, two if the project has a frontend and a Node backend.
2Call init once, where the app starts, with the key read from an environment variable.A line like project: import.meta.env.VITE_SYPNIA_PROJECT_KEY, and the variable in .env. For Next.js: withSypnia in next.config.ts and two small instrumentation files.
3Set environment so that only your real domain reports as production, and release to the short git commit.Both in the init options, or left to withSypnia, which sets them itself.
4Upload source maps in your build and keep them out of what is published, with the API token read from a secret called SYPNIA_API_TOKEN.A step in your build or CI. No token in the code.
5Run a first check and tell you where to look.The request to look for in the browser’s Network tab, and where the first session appears.

And three things it must not do:

  • Put an API token (sps_…) in the code or in a public variable. Only the ingest key (spk_…) is public. If you see a token in the diff, reject it and revoke the token.
  • Turn masking off or try to record typed input. There is no option for it, and no reason to look for one.
  • Add calls all over your code. Errors, clicks, page views and requests are captured without them. identify belongs in one place, where your app knows who signed in.

Which key goes where

KeyStarts withWho gets itWhere it lives
Ingest keyspk_Your appIn code or a public environment variable. It can only send.
API token with read, and replay if the agent should watch replayssps_Your coding agent, through MCPIn the agent’s own configuration, never in the repository.
API token with cisps_Your build, to upload source mapsIn your CI’s or host’s secrets.

Create the two tokens separately, so you can revoke one without stopping the other. See Projects, environments, keys and tokens.

Check it afterwards

  1. The app sends

    Run your app, click something, and filter the browser’s Network tab by ingest.

    You should see
    A POST to …/v1/ingest/events answered 200, within 10 seconds.
  2. The agent can read

    Ask your agent: «What is failing in my development environment?»

    You should see
    The agent calls Sypnia and answers with a list of problems, or says there are none. An error about authorization means the token is missing or wrong: see Connect.
  3. A problem makes the round trip

    Follow Your first problem: break something on purpose, then ask your agent to fix it.

    You should see
    The problem appears within 2 minutes, the agent reads it, proposes the change, and after your review the problem is resolved.

If you prefer to do it by hand

The same setup, step by step: Quickstart: Sypnia Cloud or Quickstart: self-host.

  1. Set it up
  2. What the agent will do
  3. Which key goes where
  4. Check it afterwards
  5. The app sends
  6. The agent can read
  7. A problem makes the round trip
  8. If you prefer to do it by hand

    Search pages, sections and terms