Bakbak MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bakbak MCP Server Read this paragraph aloud in Hindi with a calm female voice and save it as MP3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bakbak MCP server
The official Model Context Protocol server for Bakbak, the text-to-speech API by Raya. It lets Claude, Cursor, VS Code, Windsurf and any other MCP client speak text in Hindi, other Indian languages and English:
"Read this paragraph aloud in Hindi with a calm female voice and save it as an MP3."
It runs two ways:
Local (
npx bakbak-mcp, stdio): audio is saved as files on your computer.Hosted (
https://mcp.bakbak.si/mcp, streamable HTTP): nothing to install; audio comes back as a private download link. Sign in with OAuth (claude.ai connectors) or send your API key as a header.
Both offer the same tools: text_to_speech and
list_voices to make speech, and search_docs and
read_docs, Bakbak's developer documentation bundled into the server, so a
coding assistant can integrate Bakbak into your app: the Python and JavaScript SDKs, the LiveKit
Agents plugin, Pipecat, Twilio and other telephony, web and mobile apps, and the raw API from any
language. Full documentation: https://docs.bakbak.si/integrations/mcp.
Contents: Get an API key · Set up your client · Tools · Developer documentation · Languages and models · Example prompts · Configuration · Errors · Retries and timeouts · Latency tips · Privacy · Self-hosting · Development
Get an API key
Create a key in the Bakbak dashboard. Synthesis uses your Bakbak credits for every character; listing voices is free.
Related MCP server: Edge TTS MCP
Set up your client
Local mode needs Node.js 22 or newer. The Claude Desktop bundle runs on
the Node.js built into Claude Desktop, so it needs nothing installed. Replace
YOUR_BAKBAK_API_KEY with your key.
Claude Desktop
One click: download bakbak-mcp-<version>.mcpb from the
latest release and open it.
Claude Desktop asks for your API key and where to save audio (default Documents/Bakbak).
Or by hand: Settings → Developer → Edit Config, then add to claude_desktop_config.json:
{
"mcpServers": {
"bakbak": {
"command": "npx",
"args": ["-y", "bakbak-mcp"],
"env": { "BAKBAK_API_KEY": "YOUR_BAKBAK_API_KEY" }
}
}
}Claude Code
Local (audio files go to ~/Documents/Bakbak unless you set BAKBAK_MCP_OUTPUT_DIR):
claude mcp add bakbak -e BAKBAK_API_KEY=YOUR_BAKBAK_API_KEY -- npx -y bakbak-mcpHosted, with your key as a header:
claude mcp add --transport http bakbak https://mcp.bakbak.si/mcp \
--header "Authorization: Bearer YOUR_BAKBAK_API_KEY"Or hosted without a header: run claude mcp add --transport http bakbak https://mcp.bakbak.si/mcp, then /mcp in Claude Code to sign in with OAuth.
claude.ai
Open Settings → Connectors and choose Add custom connector. (On Team and Enterprise plans an owner adds it for the organization.)
Name it
Bakbakand enter the URLhttps://mcp.bakbak.si/mcp.Click Connect. A Bakbak page opens: paste your API key and click Connect.
Audio comes back as a private link that works for one hour.
Cursor
Add Bakbak (local) to Cursor · Add Bakbak (hosted) to Cursor
For the local server, replace YOUR_BAKBAK_API_KEY in Cursor's MCP settings. The hosted server
needs no key in the config: Cursor opens the Bakbak sign-in page, where you paste your key once.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"bakbak": {
"command": "npx",
"args": ["-y", "bakbak-mcp"],
"env": { "BAKBAK_API_KEY": "YOUR_BAKBAK_API_KEY" }
}
}
}For the hosted server use { "url": "https://mcp.bakbak.si/mcp" } as the server entry (sign in
with OAuth), or add "headers": { "Authorization": "Bearer YOUR_BAKBAK_API_KEY" } to skip the
sign-in.
VS Code
Add .vscode/mcp.json to your workspace. VS Code prompts for the key once and stores it
securely:
{
"inputs": [
{
"type": "promptString",
"id": "bakbak-api-key",
"description": "Bakbak API key",
"password": true
}
],
"servers": {
"bakbak": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bakbak-mcp"],
"env": { "BAKBAK_API_KEY": "${input:bakbak-api-key}" }
}
}
}For the hosted server, use this server entry instead (or omit headers to sign in with
OAuth):
"bakbak": {
"type": "http",
"url": "https://mcp.bakbak.si/mcp",
"headers": { "Authorization": "Bearer ${input:bakbak-api-key}" }
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"bakbak": {
"command": "npx",
"args": ["-y", "bakbak-mcp"],
"env": { "BAKBAK_API_KEY": "YOUR_BAKBAK_API_KEY" }
}
}
}Hosted: { "serverUrl": "https://mcp.bakbak.si/mcp", "headers": { "Authorization": "Bearer YOUR_BAKBAK_API_KEY" } }.
Any other client
Local: run
npx -y bakbak-mcpover stdio withBAKBAK_API_KEYin its environment.Hosted: connect to
https://mcp.bakbak.si/mcp(streamable HTTP, protocol revisions 2026-07-28 and 2025-era) withAuthorization: Bearer <key>,X-API-Key: <key>, or OAuth 2.1 (discovery via/.well-known/oauth-protected-resource/mcp, dynamic client registration or client ID metadata documents, PKCE S256). OAuth redirect URIs must behttps,httpon a loopback address, or a native app's own scheme such ascursor://(RFC 8252).
Tools
Parameter names are the Bakbak API's own (voice_id, output_format, …), so prompts, code and
curl read the same. Unknown parameters are refused; there is never a parameter for an API key.
text_to_speech
Converts text to speech and saves it (local) or returns a link (hosted). Uses credits.
Parameter | Type | Default | Description |
| string | required | The text, up to 50,000 characters. Hindi must be in Devanagari script. |
| string | required |
|
| string | first voice for the language | A voice id from |
| string | the voice's model |
|
| number |
| Speaking rate, 0.5 to 1.5. Standard voices only: m1 voices accept it and speak at their own pace. |
| object |
|
|
| string | a new file | Local mode only. An absolute path, or one relative to the output directory (and inside it). Its directory must exist and its extension must match the format. |
| boolean |
| Local mode only. Replace |
| boolean |
| Also return the audio inline as an MCP audio block, for audio up to 1 MB (about 20 s of the default WAV). Larger audio is still saved, and the call explains the limit. |
It returns structuredContent (and the same JSON as text, after a one-line summary):
Field | Description |
| Local: absolute path of the new file. |
| Hosted: private download link and when it stops working (one hour). |
|
|
| Length of the audio, measured from the bytes. |
| Characters synthesized (Unicode code points). |
| What was used. |
| Bakbak request ids, for support. |
Generated files are named <language>_<voice>_<UTC time>_<random>.<ext>, for example
hi_Kavya_20261121T143205Z_k3x9q2.wav, with the extension of the real format: .wav, .mp3,
or for raw audio .pcm (16-bit), .f32, .ulaw or .alaw.
Long text. One API request takes up to 5,000 characters. Longer text is split at sentence boundaries with the Bakbak SDK's segmenter and the pieces become one file: WAV and raw audio stream every piece over one WebSocket and join the samples under a single WAV header; MP3 makes one request per piece and joins the frames. Clients that send a progress token get a progress notification per piece.
list_voices
Lists voices. Free. Read-only.
Parameter | Type | Default | Description |
| string | all | Only voices for this language, e.g. |
| string | all | Only voices of this model: |
| string | none | Only voices whose name contains this text (case-insensitive). |
| integer |
| Most voices to return (1–500). |
Returns { "voices": [{ "id", "name", "language", "model" }], "count", "total" }, where
total counts every match before the limit.
search_docs
Searches the bundled developer documentation and returns the best-matching sections, each with
its page id, a short excerpt and the read_docs arguments that open it. Free, read-only, and works
without an API key.
Parameter | Type | Default | Description |
| string | required | Words or identifiers, e.g. |
| integer |
| Most sections to return (1–10); at most two come from the same page. |
read_docs
Returns a documentation page as Markdown, or one section of it. Without page, returns the index
of every page. Free, read-only, and works without an API key.
Parameter | Type | Default | Description |
| string | the index | A page id such as |
| string | the page | A heading of the page; returns that section with its subsections. |
Developer documentation
Ask your coding assistant to build with Bakbak and it reads these pages through read_docs and
search_docs (the server's instructions tell it to, before it writes code). The pages ship inside
the package, so they match this release, need no network and use no credits.
Page | What it covers |
| Which SDK, plugin or API to use for each platform; the facts every integration needs |
| Text, voices, transports, latency, formats, retries, concurrency, billing, security |
| LiveKit Agents with |
| A Pipecat |
| Twilio, Plivo, Exotel, Vonage and SIP: formats, play and clear messages, a Twilio bridge |
| Your own STT → LLM → TTS loop: contexts, |
| Browsers, Next.js, FastAPI, serverless and mobile apps, with the key kept on the server |
| Text over 5,000 characters, joining audio, batch parallelism, caching |
| HTTP, SSE and WebSocket from any language, with a Go client |
| Symptoms, causes and fixes |
| The SDK and plugin READMEs |
| API references and the client contract |
| The runnable examples of the Python SDK, the JavaScript SDK and the LiveKit plugin |
| This README |
Every page is also a resource, bakbak://docs/<page id> (text/markdown), for clients that let
you attach resources (in Claude Code, type @bakbak:).
Prompts
Prompt | Arguments | What it does |
|
| Adds Bakbak to the open project: reads the right guide, picks a voice, writes the code |
|
| Reviews the project's Bakbak code against the best practices |
|
| Lists voices, lets you hear a few, and gives the |
In Claude Code they are slash commands, e.g. /mcp__bakbak__integrate_bakbak twilio.
Languages and models
Model | Languages |
| Hindi |
| Hindi |
That is the voice catalog of 22 November 2026; list_voices is the source of truth. Punjabi
(pa) is accepted by the API but has no voice yet. speed changes standard voices only.
Example prompts
"List the Hindi voices."
"Say 'आपका ऑर्डर कल तक पहुँच जाएगा।' in Hindi with an m1 voice."
"Turn this blog post into a narration with a standard voice, a little slower than normal." (long text is fine;
speedchanges standard voices only)"Make an 8 kHz μ-law version of this IVR greeting in Tamil for our phone system:
output_formatraw,pcm_mulaw, 8000.""Welcome राहुल शर्मा to the meetup in English and save it to
~/Desktop/welcome.wav."
The server tells the model to pick a voice with list_voices, to pass the voice's own model,
to write Hindi in Devanagari, and that synthesis costs credits.
For developers:
"Add Bakbak TTS to my LiveKit agent, in Hindi."
"Our Twilio voice bot uses ElevenLabs; switch it to Bakbak and handle barge-in."
"Write a Go function that streams Bakbak audio over SSE."
"Why does my Bakbak audio sound like static in the browser?"
Configuration
Configuration is by environment variable only.
Local mode
Variable | Default | Meaning |
| none | Your API key. Without it the server still starts and lists its tools; every call explains how to set the key. |
|
| API base URL, for example a staging deployment. |
|
| Where new audio files go. Created when needed; |
|
|
|
Hosted mode (bakbak-mcp --http)
Variable | Default | Meaning |
| required | Public origin, e.g. |
| required | Secret for sealing OAuth tokens: at least 32 characters ( |
|
| API base URL. |
|
| Where audio is kept until it expires. |
|
| How long audio links work: seconds, or |
|
| Cap on stored audio; the oldest files go first. Bytes, or |
| a quarter of | Stored audio per API key; a key's own oldest files go first, so one key cannot push out everyone else's links. |
|
| Most audio one |
|
| Most |
|
| Most estimated audio being produced at once across all calls; at least |
|
| Listening port. |
|
| Listening address. |
| loopback and private ranges | CIDRs of reverse proxies whose |
|
| As above. |
Errors
Every failure is a tool result with isError: true, never a protocol error, so the model can
read it and act. The first text block is a sentence plus one next step; the second is JSON:
{
"error": {
"message": "Your balance is too low for this request.",
"next_step": "The account is out of credits. Add credits at https://bakbak.getraya.app, then try again.",
"status": 402,
"error_code": "insufficient_credits",
"request_id": "req_…",
"retryable": false
}
}message, error_code and request_id come from the API unchanged; every error_code is
described at https://docs.bakbak.si/text-to-speech/errors. Invalid arguments
(including an unknown parameter) are reported the same way. A missing key names
BAKBAK_API_KEY and the dashboard. In hosted mode, a request without valid credentials gets
HTTP 401 with WWW-Authenticate: Bearer resource_metadata="…", which starts the client's
OAuth flow.
Hosted mode also refuses, as tool errors and before spending credits, a call whose audio would
exceed MAX_OUTPUT_BYTES (the message suggests mp3, pcm_s16le, a lower sample rate or
splitting the text) and a call beyond TTS_CONCURRENCY_PER_KEY running calls for the key.
Retries and timeouts
The server uses the Bakbak JS SDK, which retries
connection failures, timeouts and retryable statuses (429, 5xx) up to twice with backoff, and
honours Retry-After. It never retries once audio has started: that audio is billed, and a
retry would bill it again. The read timeout is 60 s between bytes. Errors say whether retrying
can help (retryable).
In hosted mode, responses are streamed with a keep-alive comment every 15 s, so proxies do not cut long calls. Some clients stop waiting for a tool after a few minutes (claude.ai after about four); for very long texts, use local mode or split the text across calls.
Latency tips
Local mode opens the API connection and caches the voice list at startup, so the first call pays no handshake.
Pass
voice_idandmodeltogether to skip the voice lookup entirely.Shorter text answers sooner: the server makes one request per 5,000 characters.
Lower sample rates and
mp3make smaller files, which matters forinclude_audioand downloads.
Privacy
Local mode sends text only to the Bakbak API you configured. Audio stays on your computer. Nothing else is contacted: no telemetry, no update checks. The documentation tools read pages bundled in the package and make no network requests.
Hosted mode (
mcp.bakbak.si) keeps no database:Your API key is checked with Bakbak and then exists only inside encrypted tokens (AES-256-GCM) held by your MCP client. Access tokens last one hour, refresh tokens 30 days. Deleting the key in the dashboard ends every connection that uses it.
Generated audio is stored on the server's disk for one hour under an unguessable link, then deleted. Anyone with the link can download it until then.
Text is sent to the Bakbak API and is not stored or logged by this server. Logs record request ids, sizes, timings, the caller's IP address and a one-way fingerprint of the key.
Bakbak's privacy policy: https://bakbak.si/privacy-policy.
Self-hosting
bakbak-mcp --http runs the hosted server. The
deploy/ directory has a
Dockerfile-based compose file, a Caddy example and the operational notes (reverse proxies,
Cloudflare, scaling, secret rotation).
Development
See CONTRIBUTING.md. Security issues: SECURITY.md.
License
Apache-2.0. Copyright 2026 Raya Voice AI.
Available Tools
4 toolslist_voicesList voicesARead-onlyIdempotentInspect
List Bakbak voices, optionally filtered by language, model and a name substring. Free: uses no credits. Each voice has an id (pass it to text_to_speech as voice_id), a name, a language and a model (pass it as model).
Inputs: limit, model, query, language. Returns: count, total, voices
read_docsRead Bakbak docsARead-onlyIdempotentInspect
Read a page of the Bakbak developer documentation, or one section of it. Without page, returns the index of every page. Start with page 'start-here' to choose between the SDKs, the LiveKit plugin and the raw API for a platform; 'best-practices' before finishing an integration; 'troubleshooting' when something fails. Free; needs no API key.
Inputs: page, section.
search_docsSearch Bakbak docsARead-onlyIdempotentInspect
Search Bakbak's developer documentation: the Python and JavaScript SDKs, the LiveKit Agents plugin, the HTTP, SSE and WebSocket API, error codes, audio formats, and integration guides for LiveKit, Pipecat, telephony (Twilio, Plivo, Exotel, Vonage, SIP), web and mobile apps, long texts, and other languages. Use it before writing, reviewing or debugging code that calls Bakbak, instead of guessing method names, parameters or behaviour. Returns matching sections with their page id; read a whole page or section with read_docs. Free; needs no API key.
Inputs: query (required), limit.
text_to_speechText to speechADestructiveInspect
Convert text to natural speech with Bakbak and save it as an audio file on this computer. Uses Bakbak credits for every character, so call it once per text and do not retry a success. Pick a voice for the language with list_voices first and pass its id as voice_id and its model as model (a voice works only with its own model). Hindi text must be in Devanagari script. Text up to 50,000 characters; long text is split at sentence boundaries and joined into one file.
Inputs: text (required), language (required), model, speed, +5 more. Returns: model, format, language, voice_id, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools split cleanly into two documentation tools (search_docs, read_docs) and two audio tools (list_voices, text_to_speech). The only potential confusion is search_docs vs read_docs, but their descriptions explicitly chain them (search returns page ids, read_docs reads them), so an agent can route correctly. All tools are otherwise clearly distinct.
Every name follows the same snake_case verb_noun pattern (read_docs, search_docs, text_to_speech, list_voices) with unambiguous verbs. No mixed conventions or vague names.
Four tools is tightly scoped to the server's purpose: learn the API, discover voices, synthesize speech. Each tool earns its place with no filler, and the minimal surface keeps selection simple.
Core workflows are covered (docs discovery, voice selection, one-shot synthesis), but the surface warns heavily about credit consumption while offering no way to check remaining credits, plan, or account status. There is also no voice/language/model enumeration beyond list_voices, and no way to inspect or clean up previously generated audio files.
Maintenance
Related MCP Connectors
Hosted text-to-speech MCP server: 66 voices in 9 languages, long-form narration, podcasts.
MCP server for Text-to-Speech
Free text-to-speech for any MCP client: one hosted endpoint, four engines, no API bill.
Remote text-to-speech MCP server with text_to_speech and list_voices tools. Free plan.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables users to convert text into high-quality audio by accessing the OpenAI Text-to-Speech API. It supports customizable model selection and voice options for synthesized speech generation via the MCP protocol.1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that converts text into lifelike speech using Microsoft Edge's Text-to-Speech service, supporting customizable voice, rate, volume, and pitch.4MIT

leanvox-mcpofficial
AlicenseNot gradedqualityDmaintenanceEnables text-to-speech generation, voice cloning, dialogue creation, and other TTS operations through natural language in MCP-compatible AI assistants.10 npmMIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate high-quality speech with 54+ voices in multiple languages via MCP tools.21Apache 2.0