# AI-Assisted Integration

Use AI coding assistants to integrate and configure the Pushwoosh Android SDK in your project. By connecting your assistant to the [Context7](https://context7.com/) MCP server, it gets access to up-to-date SDK 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 Android SDK docs, code snippets, and API reference directly during the conversation — instead of relying on potentially outdated training data.

The Pushwoosh Android SDK library ID on Context7: **`/pushwoosh/pushwoosh-android-sdk`**

## 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 Android SDK into my Android project with Firebase Cloud Messaging (FCM).

Requirements:
- Add gradle dependencies (pushwoosh, pushwoosh-firebase)
- Configure AndroidManifest.xml with Pushwoosh App ID: YOUR_APP_ID
- Register for push notifications in MainActivity

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

### Push notification handling

```text
Show me how to handle push notification callbacks (receive, open) with
Pushwoosh SDK in Android. I want to add analytics tracking for these events.

Use Context7 MCP to fetch Pushwoosh Android SDK documentation for NotificationServiceExtension.
```

### User segmentation with tags

```text
Show me how to use Pushwoosh tags for user segmentation in Android.
Create example helper class with methods for setting and getting tags.

Use Context7 MCP to fetch Pushwoosh Android SDK documentation for setTags and getTags.
```

<Aside type="tip">
Adding **"Use Context7 MCP to fetch Pushwoosh Android 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 Android SDK, it receives:

- **Installation instructions** — Gradle dependencies and manifest configuration
- **API reference** — public classes, methods, and interfaces
- **Code examples** — Java and Kotlin snippets for common use cases
- **Module documentation** — guides for each SDK module (Firebase, Huawei, Geozones, etc.)
- **Configuration details** — AndroidManifest.xml settings, Firebase setup, and permissions