# AI 지원 통합

AI 코딩 어시스턴트를 사용하여 프로젝트에 Pushwoosh Flutter 플러그인을 통합하고 구성하세요. 어시스턴트를 [Context7](https://context7.com/) MCP 서버에 연결하면 최신 플러그인 문서, 코드 예제 및 API 참조에 액세스할 수 있어 정확하고 작동하는 통합 코드를 생성할 수 있습니다.

<Aside type="note">
Context7을 사용하려면 AI 어시스턴트가 [MCP (Model Context Protocol)](https://modelcontextprotocol.io/)를 지원해야 합니다. 지원되는 도구에는 **Claude Code**, **Cursor**, **Windsurf**, **Cline** 등이 있습니다.
</Aside>

## 작동 방식

Context7은 AI 어시스턴트에게 최신 라이브러리 문서를 제공하는 MCP 서버입니다. 어시스턴트가 Context7에 액세스할 수 있으면, 잠재적으로 오래된 학습 데이터에 의존하는 대신 대화 중에 최신 Pushwoosh Flutter 플러그인 문서, 코드 스니펫, API 참조를 직접 가져올 수 있습니다.

Context7의 Pushwoosh Flutter 플러그인 라이브러리 ID: **`/pushwoosh/pushwoosh-flutter`**

## Context7 설정하기

AI 어시스턴트의 MCP 구성에 [Context7](https://github.com/upstash/context7#installation)을 추가하세요:

<Tabs>
  <TabItem label="Claude Code">
다음 명령어를 실행하세요:

```bash
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
  </TabItem>
  <TabItem label="Cursor / Windsurf">
MCP 설정 파일(`.cursor/mcp.json` 또는 이에 상응하는 파일)에 다음을 추가하세요:

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

## 예시 프롬프트

Context7이 구성되면 자연어 프롬프트를 사용하여 플러그인을 통합할 수 있습니다. 다음은 일반적인 작업을 위한 바로 사용할 수 있는 프롬프트입니다.

### 기본 플러그인 통합

```text
Integrate Pushwoosh Flutter plugin into my Flutter project.

Requirements:
- Install pushwoosh_flutter via pub
- Initialize Pushwoosh with my App ID in main()
- Register for push notifications and handle onPushReceived and onPushAccepted streams

Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation.
```

### 태그 및 사용자 세분화

```text
Show me how to use Pushwoosh tags in a Flutter app for user segmentation.
I need to set tags, get tags, and set user ID for cross-device tracking.

Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for setTags and getTags.
```

### Message Inbox 통합

```text
Integrate Pushwoosh Message Inbox into my Flutter app. Show me how to:
- Display the inbox UI with custom styling using PWInboxStyle
- Load messages programmatically
- Track unread message count

Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for presentInboxUI.
```

<Aside type="tip">
프롬프트 끝에 **"Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation"**을 추가하면 AI 어시스턴트가 코드를 생성하기 전에 최신 플러그인 문서를 가져오도록 지시합니다.
</Aside>

## AI 어시스턴트가 얻는 정보

어시스턴트가 Pushwoosh Flutter 플러그인에 대해 Context7에 쿼리하면 다음을 받습니다:

- **설치 지침** — pubspec.yaml 설정 및 플랫폼별 구성
- **API 참조** — 공개 클래스, 메서드 및 스트림 정의
- **코드 예제** — 일반적인 사용 사례를 위한 Dart 스니펫
- **플러그인 문서** — 핵심 플러그인, Inbox 및 Geozones 가이드
- **구성 세부 정보** — 초기화 매개변수, iOS 및 Android 설정 단계