> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wendung.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent setup

> Add the SDK to your app, or connect your agent to Wendung analytics and documentation tools.

Choose the setup for your task:

| Your task | Start here |
| - | - |
| Add tracking to an app | The [project setup prompt](/setup) installs the SDK and adds tracking calls. |
| Query analytics from your agent | The [connection prompt](/prompt) registers MCP servers and installs the SDK skill. It does not add tracking to your app. |

SDK setup needs a Wendung project, its publishable key, and allowed app origins. MCP setup needs an agent that supports remote HTTP MCP servers and a Wendung account for OAuth sign-in. The documentation server is public.

## Add Wendung to a project

Drop this prompt into your agent and let it guide you through the setup:

```text Prompt theme={null}
Read https://docs.wendung.app/setup.md and follow it to set up Wendung in this project.
```

It checks your account, proposes funnel steps, and waits for your approval before it edits code. [Read the full setup prompt](/setup).

## Install the skill

The `wendung-sdk` skill teaches your agent the SDK API (install, init options, identity rules, batching, framework patterns) so it does not guess at method names or options. The setup prompt above installs it for you. To install it on its own, use the [skills CLI](https://github.com/vercel-labs/skills), which supports Claude Code, Cursor, Codex, Windsurf, and most other agents:

```bash theme={null}
npx skills add wendung/skills
```

The skill also tells your agent when to use the MCP servers and how to register them with your permission.

## Add the MCP servers

The SDK works without MCP. Add one or both servers depending on what you want your agent to reach. Merge the JSON examples into existing configuration, preserving other servers. For Windsurf, OpenCode, and host-specific connection steps, see the [connection prompt](/prompt).

### wendung: your workspaces, funnels, sites, and analytics

Connects your agent to your real data at `https://api.wendung.app/mcp`: funnels, users, dashboards, and pageview analytics for your sites. You sign in through OAuth, so there are no API keys to paste.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http wendung https://api.wendung.app/mcp
  ```

  ```bash Codex theme={null}
  codex mcp add wendung --url https://api.wendung.app/mcp
  codex mcp login wendung
  ```

  ```json Cursor: .cursor/mcp.json theme={null}
  {
    "mcpServers": {
      "wendung": { "url": "https://api.wendung.app/mcp" }
    }
  }
  ```

  ```json VS Code: .vscode/mcp.json theme={null}
  {
    "servers": {
      "wendung": { "type": "http", "url": "https://api.wendung.app/mcp" }
    }
  }
  ```
</CodeGroup>

### wendung-docs: search these docs

Lets your agent search the Wendung documentation at `https://docs.wendung.app/mcp`. It is public and needs no sign-in.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http wendung-docs https://docs.wendung.app/mcp
  ```

  ```bash Codex theme={null}
  codex mcp add wendung-docs --url https://docs.wendung.app/mcp
  ```

  ```json Cursor: .cursor/mcp.json theme={null}
  {
    "mcpServers": {
      "wendung-docs": { "url": "https://docs.wendung.app/mcp" }
    }
  }
  ```

  ```json VS Code: .vscode/mcp.json theme={null}
  {
    "servers": {
      "wendung-docs": { "type": "http", "url": "https://docs.wendung.app/mcp" }
    }
  }
  ```
</CodeGroup>

<Note>
  Wendung defaults new client registrations to read access. Write tools require the client to request `mcp:write` and you to grant it during sign-in. The **Make changes** option appears only when that scope was requested. Your workspace role still controls which changes you can make.
</Note>

## Connect the tools with one prompt

Use the connection prompt to install the skill and register both servers:

1. Click the button below. It copies the connection prompt to your clipboard.
2. Paste the prompt into your agent.
3. Complete Wendung sign-in through your host's OAuth controls. Reconnect the servers or restart the agent if its instructions require it.
4. Once the tools are available, the agent verifies workspace access and a documentation search. Any remaining sign-in or restart step stays pending until it is complete.

<button id="copy-agent-prompt" className="agent-prompt-button">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
    <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />

    <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
  </svg>

  <span className="agent-prompt-button-label">Copy the connection prompt</span>
</button>

Want to read the prompt before you paste it? It is plain markdown and covers Claude Code, Codex, Cursor, Windsurf, OpenCode, and GitHub Copilot. [Read it here](/prompt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.