# MCC External Service Example

> Explore music playback and karaoke scoring with MCC.

Native Android and iOS Music Content Center external-service samples for music preload, playback and pitch scoring with RTC. Requires music-provider credentials and entitlement.

- Author: Agora
- Updated: 2026-10-21
- Difficulty: Intermediate
- Categories: rtc
- Platforms: Android, iOS
- Use cases: Media Playback, Interactive Audio
- Capabilities: Agora RTC, Music Content Center, Music Playback
- [Recipe page](https://recipes.agora.io/recipes/mcc-external-service-example)
- [Implementation repository](https://github.com/AgoraIO-Community/Agora-MccExService-Example)
- [Source recipe](https://github.com/AgoraIO-Community/Agora-MccExService-Example/blob/main/docs/ai/RECIPE.md)
- [Raw source Markdown](https://raw.githubusercontent.com/AgoraIO-Community/Agora-MccExService-Example/main/docs/ai/RECIPE.md)
- [All recipes](https://recipes.agora.io/llms.txt)

## Implementation guide

# MCC External Service Example

## Overview

Integrate the Music Content Center external-service demo with RTC, music preload/playback and karaoke scoring.

Repository: [AgoraIO-Community/Agora-MccExService-Example](https://github.com/AgoraIO-Community/Agora-MccExService-Example)

## Prerequisites and Setup

1. Obtain compatible Agora MCC external-service and music-provider access, including test music entitlement.
2. For Android, open `Android/Agora-MccExService-Example` and set `APP_ID`, `APP_CERTIFICATE`, `YSD_APP_ID`, `YSD_APP_KEY`, `YSD_APP_TOKEN` and `YSD_APP_UID` in its `local.properties`. Sync and run.
3. For iOS, work in `iOS/AgoraMccExServiceExample/`, run `pod install`, configure the demo's `Config.swift` and open `AgoraMccExServiceExample.xcworkspace`. Use the repository's actual checkout rather than the placeholder clone URL in its README.
4. Initialize the sample's RTC and music service flow, preload a permitted song, then play and score.

## What To Check

- Confirm service initialization and music preload callbacks succeed.
- Verify playback and pitch/scoring data update together.
- Stop playback and leave the session; verify music and RTC resources release.

## Integration Notes

Music-provider credentials, rights and service SDK availability are prerequisites. Use a backend for privileged production credentials rather than shipping test secrets in a client.

Keep App Certificates, customer secrets and privileged token generation on a trusted backend for production. Use only your own test credentials while configuring historical demos; do not commit them. Preserve the sample's existing dependency versions and lifecycle until a separate migration is tested.

## Source References

- [Android/Agora-MccExService-Example/README.md](https://github.com/AgoraIO-Community/Agora-MccExService-Example/blob/main/Android/Agora-MccExService-Example/README.md)
- [iOS/AgoraMccExServiceExample/README.md](https://github.com/AgoraIO-Community/Agora-MccExService-Example/blob/main/iOS/AgoraMccExServiceExample/README.md)

## Validation Status

This recipe was checked against the repository's source and setup documents. The platform build and live service/device flow have not been run as part of this documentation change. Complete the checks above in an environment with the required SDKs, hardware and service access before treating it as a validated deployment.

## Implementation Prompt

```text
You are working in AgoraIO-Community/Agora-MccExService-Example. Use docs/ai/RECIPE.md and its linked source files to adapt the MCC External Service Example reference to this project.

Start by inspecting the actual sample directory and configuration described above. Resolve its listed missing prerequisites before claiming it is runnable. Preserve the existing architecture and compatible dependency versions. Implement the recipe's feature-specific flow, permissions and resource cleanup. Use a trusted backend for privileged credentials and tokens in production.

Run the repository-specific build or launch flow, then perform each What To Check item. Report the commands run, the observed results and anything blocked by service access, hardware or incomplete sample code. Do not claim live validation from a documentation or catalog build alone.
```


## Recipe prompt

You are implementing the "MCC External Service Example" recipe in this project.

Read the recipe markdown first:
https://raw.githubusercontent.com/AgoraIO-Community/Agora-MccExService-Example/main/docs/ai/RECIPE.md

Use the source repository for cross-reference:
https://github.com/AgoraIO-Community/Agora-MccExService-Example

Build this recipe into the user's app using the markdown as the implementation guide. Inspect related source files through the repository links when the recipe points to them. Ask before installing new dependencies.
