---
title: Hosted MCP
description: Connect an assistant to Sawtak Arabi for Arabic voiceovers, private voice cloning and saved recordings.
---

MCP lets a supported assistant call Sawtak Arabi tools using your account. Connect to discover voices, generate speech, clone a voice and retrieve saved recordings. Generation and cloning use your connected account's balance.

## Connect

Add this server URL in a client that supports remote MCP with OAuth:

```text
https://sawtakarabi.ai/mcp
```

Sign in to your Sawtak Arabi account and approve the permissions your assistant needs. You do not need to paste an API key into chat. Available tools, audio playback and attachment forwarding depend on your MCP client.

For desktop clients, a `127.0.0.1` OAuth callback returns authorization to the client on your computer. Keep the client running until authorization finishes. A client may request continued access so it can renew authorization; review that permission on the consent screen.

For a coding agent that saves WAV files directly in your workspace using an API key, see the [official skill](/docs/agent-skill).

## Ask for a voiceover

> Find a suitable Saudi Najdi voice for a product advertisement. Generate the supplied script and give me the recording, its duration and a download link.

The agent chooses a ready catalog voice, submits one take, and checks its result. It should preserve your script unless you ask for adaptation. A new version of a scene is a new take; keep accepted recordings for other scenes.

| Tool                      | Purpose                                                                                                         |
| ------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `get_account`             | Check the connected account, balance and limits.                                                                |
| `list_voices`             | Find available voices using catalog search, dialect and other labels.                                           |
| `get_voice_filters`       | Discover published dialect codes, labels and supported filters.                                                 |
| `get_voice`               | Inspect one accessible voice and retrieve its generated preview, when available.                                |
| `estimate_voiceover`      | Validate text and voice readiness, estimate the speech charge and inspect available balance without generation. |
| `prepare_voice_reference` | Prepare a temporary private upload for a local audio file.                                                      |
| `import_voice_reference`  | Import a native ChatGPT audio attachment from a supported host-issued URL.                                      |
| `clone_voice`             | Submit one private voice clone using account credit.                                                            |
| `get_voice_clone`         | Inspect an accepted clone and recover its resulting voice ID.                                                   |
| `update_voice`            | Edit metadata on a voice you own.                                                                               |
| `delete_voice`            | Delete a voice you own; this does not delete past recordings.                                                   |
| `generate_voiceover`      | Submit one narration using account credit.                                                                      |
| `get_voiceover`           | Check a submitted request, retrieve a saved recording or renew its download link.                               |
| `list_voiceovers`         | Search saved script openings or voice names; filter by voice ID and creation time.                              |

Voice filters use actual catalog dialect codes. A broad country label may not include its regional dialects. Preview and evaluate a voice before treating it as a recommendation.

## Agent workflow

1. Call `get_voice_filters` and `list_voices`, then select a returned ready `id`. Call `get_voice` for its generated preview when available, and `estimate_voiceover` to validate the text and estimated charge.
2. Assign a fresh `request_id`, and call `generate_voiceover` with that ID, the selected `voice_id` and the customer's `text`.
3. Preserve the request ID before waiting. An `accepted` result means processing can begin; it does not guarantee successful speech or a saved recording.
4. Inspect `get_voiceover({"request_id":"<same-request-id>"})` until the request finishes, waiting the suggested `next_poll_after_seconds` between checks. It is null once processing is no longer pending.
5. If the result includes `voiceover.audio`, download its WAV and preserve `voiceover.id`. Use the recording's measured `seconds` to set video timing.

Accepted processing can continue after the initiating connection closes. If a response is lost, inspect the original request ID before submitting any new work. Reads do not generate speech or add a synthesis charge.

Retrying the same request ID with exactly the same voice and text returns the existing acceptance while its temporary state is retained. Different inputs return `CONFLICT` and cannot replace the original input. If the original inputs cannot yet be confirmed, the tool returns a retryable `UNAVAILABLE`: inspect or retry the same ID and inputs, instead of creating a new paid take. Temporary request state expires one day after processing ends. This is not permanent duplicate protection: never reuse an old request ID for a new take. Save the returned recording ID for later library retrieval.

Tool execution errors contain JSON text with `error.code`, `message` and `retryable`, plus `retry_after_seconds` when applicable. Known missing recordings return `NOT_FOUND`; temporary service failures return `UNAVAILABLE`. Authentication challenges and schema-validation errors use the MCP SDK's native formats. A failed generation status preserves recognized gateway codes such as `insufficient_balance`, `no_backend` and `capacity_full`; it never automatically submits another take.

## Find and reuse a recording

Call `list_voiceovers` with any combination of these optional filters:

- `search`: a case-insensitive literal substring of the saved script opening (first 256 characters) or recorded voice name, up to 200 characters. Full scripts are not searched. `%`, `_` and backslashes are ordinary characters.
- `voice_id`: the exact voice ID saved with a recording. This still works if that voice has since been deleted.
- `created_after`: inclusive creation time, for example `2026-10-01T00:00:00Z`.
- `created_before`: exclusive creation time, for example `2026-11-01T00:00:00Z`.

Times require `Z` or an explicit UTC offset, with at most three fractional-second digits; the start must precede the end. Results are newest first. Keep the same filters when passing `next_cursor` as `cursor`; omit the cursor when changing filters.

For example, search October recordings with `list_voiceovers({"search":"autumn offer","created_after":"2026-10-01T00:00:00Z","created_before":"2026-11-01T00:00:00Z"})`. Then call `get_voiceover({"id":"<returned-recording-id>"})` for the full script and a fresh audio link. Neither call generates speech or consumes synthesis credit.

The dashboard History tab uses the same saved-recording search. Its date fields use your local calendar and include the selected end date. Existing recordings can be played, downloaded or opened without generating a new take.

## Clone a voice from a reference

Use a speaker recording you have permission to clone. The reference must be at most 20 MiB. We use the first 30 seconds and retain the original privately until the voice is deleted. Successful cloning costs USD 0.01. If the result is uncertain, call `get_voice_clone` with the original request ID to check the operation outcome and charge before creating another paid clone. Uploading and inspecting a reference do not incur a cloning charge.

For a coding agent with a file:

1. Read the audio file, calculate its byte length and SHA-256, and call `prepare_voice_reference` with `size_bytes`, `sha256` and its audio `mime_type`.
2. PUT the original bytes directly to the returned `upload_url`, with the returned headers. Keep audio bytes and base64 out of MCP arguments. The upload URL lasts 15 minutes and is restricted to that file; exact retries cannot replace its contents.
3. Call `clone_voice` with the `reference_id`, a fresh `request_id`, name and catalog dialect code. Optional description, gender, age and use case use `get_voice_filters` values.
4. Preserve the request ID, reconnect if necessary, and call `get_voice_clone` at the suggested polling interval. Once completed, preserve the `voice_id`.
5. Call `estimate_voiceover` and `generate_voiceover` with that voice ID, then retrieve the resulting recording normally.

`import_voice_reference` declares ChatGPT's native file-input metadata. A compatible host can supply the user's attached file; only HTTPS URLs on `files.oaiusercontent.com` are accepted, with no redirects. Your client must forward the attachment through this supported mechanism. A local path on a user's computer is not a remotely accessible file. Clients without native attachment forwarding need the direct upload route above.

Uploaded reference handles are usable for 24 hours. Temporary copies are scheduled for physical cleanup after 48 hours, through the existing retryable cleanup job; outages can delay cleanup. A successfully cloned voice retains its own private reference and model data under the existing voice lifecycle. Cloning does not publish the voice or turn the speaker's original recording into a preview. `get_voice` returns only an existing synthesized preview, or null.

Cloning continues after the assistant disconnects. Exact retries with the same request ID and inputs recover acceptance while request state is retained for one day after processing ends; changed inputs conflict. Inspect an uncertain request before creating any new paid work. Temporary receipt expiry does not delete the voice: retained request state can still recover your voice, with an unknown historical charge. Later, use `list_voices` or the saved voice ID.

Metadata edits and deletion use `update_voice` and `delete_voice`. Deletion removes future voice access and invalidates its preview links, while previously generated narration remains in your recording library. Temporary request state and physical storage cleanup have separate lifetimes; deletion is not a promise of immediate physical erasure.

## Saving and charges

Saving is best effort. A request can complete and consume credit without producing a retained recording. A partial or interrupted delivery can also incur the normal speech charge. Check the returned `status`, `outcome`, `charged_usd` and `voiceover` independently.

Operation receipts expire separately from saved recordings. If a retained request still identifies its recording after the receipt expires, retrieval can return the audio while its billing outcome and charge remain unknown. This does not generate speech again.

When a completed request has no recording, check again later in case saving is still finishing. If it remains unavailable, explain that to the user; do not silently synthesize another paid take. Download accepted recordings promptly into the content project.

## Scripts and deletion

Accepted scripts are stored for background processing even when no audio recording is saved. The script and request status are retained for one day after processing ends, including failure or cancellation. Time spent queued or paused can extend retention beyond one day from submission.

Work already accepted may finish after you disconnect the assistant or delete your account. Those actions do not immediately erase this temporary data. Contact [support@sawtakarabi.ai](mailto:support@sawtakarabi.ai) about earlier deletion. See the [Privacy Policy](/privacy) for other content and service-provider retention.

## Reuse in a video

Retrieve an existing recording with `get_voiceover({"id":"<saved-recording-id>"})`. An available result includes its text, measured duration, WAV URL and URL expiration, plus an MCP resource link. Inline playback depends on the assistant; the download link is the fallback.

The link lasts two hours and permits downloading that recording without a Sawtak authorization header. Treat it as a private sharing link. Call `get_voiceover` again to renew it while the recording remains available. If rendering fails, reuse the same recording instead of generating speech again.

For a new video, you can choose [SawtakArabi/arabic-video-starter](https://github.com/SawtakArabi/arabic-video-starter) and give your coding agent the repository, brief, dialect and brand assets. Its documentation explains how to import completed scene WAVs and render with Remotion. Timing comes from the recordings; changing visuals or another scene reuses accepted takes.

The assistant needs a coding or rendering environment to assemble the MP4. MCP provides narration and retrieval. An assistant without execution can provide the recordings and repository for a coding agent to continue. Keep the user's existing video project when one is supplied. For local file generation, use the [coding-agent skill](/docs/agent-skill).

Saved library recordings have no scheduled expiry or newest-item limit in your library. Deleting a recording invalidates its existing download links; account deletion also removes access. See [Generation records](/docs/generation-history).

## Permissions

The consent screen describes account inspection, voice discovery, voice management, saved-recording access and billed generation separately. Reference uploads, cloning, edits and deletion require `voices:write`; voice inspection uses `voices:read`. Estimates require both `voices:read` and `account:read`. Existing connections may need renewed consent for voice management. Continued access allows the client to refresh its authorization. Grant only the permissions needed for the task.

To revoke an assistant, open [Account](/dashboard/account), find it under **Connected apps**, and choose **Disconnect**. This removes that app's authorization and renewal access for your account. Reconnecting requires new approval. Work already accepted may still finish, and saved recordings remain available.

A download link already shared with another service remains usable until it expires or its recording is deleted. Disconnecting the app does not revoke that separate link.

Use text and voices you have the rights and permissions to use. Obtain the speaker's informed consent before cloning a voice, and review generated audio before sharing it. See the [Terms of Service](/terms) and [Acceptable Use Policy](/acceptable-use).
