# AI-assisted integration

Use AI coding assistants to integrate and configure the Pushwoosh Unity SDK in your project. By connecting your assistant to the [Context7](https://context7.com/) MCP server, it gets access to up-to-date plugin documentation, code examples, and API reference — so it can generate accurate, working integration code.

<Aside type="note">
Your AI assistant must support [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) to use Context7. Supported tools include **Claude Code**, **Cursor**, **Windsurf**, **Cline**, and others.
</Aside>

## How it works

Context7 is an MCP server that provides AI assistants with up-to-date library documentation. When your assistant has access to Context7, it can fetch the latest Pushwoosh Unity SDK docs, code snippets, and API reference directly during the conversation — instead of relying on potentially outdated training data.

The Pushwoosh Unity SDK library ID on Context7: **`/Pushwoosh/pushwoosh-unity`**

## Setting up Context7

Add [Context7](https://github.com/upstash/context7#installation) to your AI assistant's MCP configuration:

<Tabs>
  <TabItem label="Claude Code">
Run the following command:

```bash
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
  </TabItem>
  <TabItem label="Cursor / Windsurf">
Add to your MCP config file (`.cursor/mcp.json` or equivalent):

```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}
```
  </TabItem>
</Tabs>

## Example prompts

Once Context7 is configured, you can use natural language prompts to integrate the SDK. Below are ready-to-use prompts for common tasks.

### Basic SDK integration

```text
Integrate Pushwoosh Unity SDK into my Unity project.

Requirements:
- Install com.pushwoosh.unity.core and com.pushwoosh.unity.android via UPM
- Initialize Pushwoosh with my App ID
- Register for push notifications and handle OnPushNotificationsReceived and OnPushNotificationsOpened events

Use Context7 MCP to fetch Pushwoosh Unity SDK documentation.
```

### Tags and user segmentation

```text
Show me how to use Pushwoosh tags in a Unity app for user segmentation.
I need to set string, int, and list tags, get tags, and set user ID.

Use Context7 MCP to fetch Pushwoosh Unity SDK documentation for SetStringTag and GetTags.
```

### Events and purchase tracking

```text
Integrate Pushwoosh event tracking in my Unity app. Show me how to:
- Post custom events with attributes
- Track in-app purchases with SendPurchase

Use Context7 MCP to fetch Pushwoosh Unity SDK documentation for PostEvent.
```

<Aside type="tip">
Adding **"Use Context7 MCP to fetch Pushwoosh Unity SDK documentation"** at the end of your prompt tells the AI assistant to pull the latest SDK docs before generating code.
</Aside>

## What the AI assistant gets

When your assistant queries Context7 for the Pushwoosh Unity SDK, it receives:

- **Installation instructions** — UPM setup via npm registry and Git URL
- **API reference** — public classes, methods, and event definitions
- **Code examples** — C# snippets for common use cases
- **Platform setup** — iOS and Android configuration steps
- **Configuration details** — initialization parameters, EDM4U setup