Skip to main content

Overview

gnani-mcp is the official Gnani MCP (Model Context Protocol) server. It gives an AI coding agent such as Cursor, Claude Code, Claude Desktop or Codex a set of tools for Gnani Speech-to-Text (Prisma) and Text-to-Speech (Timbre). You ask for what you want in plain English, for example “Transcribe /Users/me/call.wav in Hindi”, and the agent picks the tool, fills in its inputs and shows you the result.
The server runs on your own computer. It reads audio files from your disk, sends them to the Gnani API, and saves any generated audio back to your disk.

Installation

You need a Gnani API key from app.gnani.ai and one of these ways to start the server. Your agent starts the server for you, so there is nothing to keep running.
The 34 Timbre v3.0 voices and the Timbre v3.0 speed range (0.8 to 1.2) need gnani-mcp 0.2.2 or newer. Upgrade with pip install -U gnani-mcp, or run uvx gnani-mcp@latest so uvx picks up the newest release.

Set your API key

Your agent starts the server as a separate background program, so the key has to be handed to it when it starts. A key you typed into a terminal earlier is not visible to it. The server looks in two places, in this order: The first one found wins, so an old key in your config overrides a correct key in the file. If neither exists, the server still starts, but every call that needs the API fails with a message that says the key is missing. The credentials file (macOS or Linux):
On Windows (PowerShell):
The line must read api_key = your-key, with api_key in lowercase. A line such as GNANI_API_KEY=... in this file is silently ignored. Treat the key like a password: do not commit it to Git or paste it into chats.

Connect your agent

Every agent needs the same three values: Replace YOUR_GNANI_API_KEY in the examples with your real key.
Edit ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json), or .cursor/mcp.json inside a project. Create the file if it does not exist.
To keep the key out of the file, use "env": { "GNANI_API_KEY": "${env:GNANI_API_KEY}" }, or leave env out and use the credentials file.Open Cursor’s Customize panel (or Settings → MCP). gnani should be listed and switched on, showing 8 tools. If it is not, open the Output panel and choose MCP Logs. Cursor asks for approval the first time the agent uses each tool.

Check that it works

Ask your agent: “List my recent Gnani batch transcription jobs.” This asks the API for your jobs and does not process any audio, so it proves the server found your key and the API accepted it. Do not use “list the voices” as the test. That tool reads a catalog built into the server and works even with no key.

Example prompts

Give full file paths (such as /Users/me/audio/call.wav) so the server can find your files. Generated audio is saved as a file, and the tool’s response gives its location (your Desktop by default). Transcribe a recording
  • “Transcribe /Users/me/audio/customer-call.wav. It is in Hindi.”
  • “Transcribe this clip and detect the language automatically: /Users/me/audio/clip.mp3. Use the newest model.”
  • “Transcribe /Users/me/audio/sales-call.wav in Hindi and make sure these words are spelled right: Gnani, Vachana, Prisma.”
Transcribe long audio
  • “This is a 2-hour recording: /Users/me/audio/long-call.mp3. Transcribe it in Tamil and tell me who said what.”
  • “Show me my recent batch transcription jobs, then give me the transcript of the last completed one.”
Generate speech
  • “Read this out in a Hindi female voice and save it as an MP3: ‘नमस्ते, गनानी में आपका स्वागत है।’”
  • “What voices are available for Telugu? Describe the options.”
  • “Say this with a laugh in the middle, using a female voice on the newest voice model: ‘Let me check… <laugh> found it!’”
  • “Make an 8 kHz telephone-quality version of this announcement for a call-centre IVR.”
Combine tasks
  • “Transcribe /Users/me/call.wav in Hindi, summarize it in three bullets, then read the summary back as audio in a female English voice.”

Tools

The server provides 8 tools. You normally ask in plain English and the agent chooses one.

Speech-to-Text

Both transcription tools take a model: prisma-v2.5 (the default) or prisma-v3.0. If you leave the style out, Prisma v2.5 uses verbatim. Prisma v3.0 uses transcribe for a single hi-IN or en-IN language and verbatim otherwise. Ask for a style explicitly to keep output the same across models. gnani_stt_transcribe transcribes audio up to 30 seconds and returns the text at once. Give the audio as one of audio_path, audio_base64 or audio_url (the last two also need filename). Audio sent as base64 or fetched from a link can be at most 25 MB. It accepts WAV, MP3, OGG, FLAC, AAC and M4A, and returns transcript, model, request_id and, on v3.0, detected_language_code. gnani_stt_batch_transcribe handles recordings up to 4 hours. One call creates the job, starts it, checks progress every 10 seconds (up to 30 minutes) and fetches the transcripts, so the agent waits while it runs. Batch accepts WAV, MP3, MP4, FLAC, OGG, Opus, M4A, AAC, WebM and AMR. If the call is cut short, for example when your agent times out, the job keeps running on Gnani’s servers. Use gnani_stt_batch_list_jobs, gnani_stt_batch_status and gnani_stt_batch_get_transcripts to pick it up.

Text-to-Speech

Voices belong to one model. A Timbre v2.5 voice name does not work with Timbre v3.0, and the other way round. If you ask for a voice that belongs to the other model, the tool stops before calling the API and tells you which model it belongs to. See Available voices for the full catalogs. gnani_tts_synthesize It returns audio_file (the saved file’s full path), size_bytes, model, voice, language, container, encoding, sample_rate, and warnings if something was adjusted. Expressive tags (Timbre v3.0 only). Put them inline in text: <laugh>, <giggle>, <sigh>, <exhales>, <sniffles>, <yawns>, <coughs>, <clears throat>, <whispers>, <shouting>, <excited>, <slow> and <pauses>. A tag applies from where it appears until the next tag. <pauses> adds silence and is never spoken. Tags are billed as characters. A tag the service does not know is removed, and you get a warning listing the supported tags. See Audio tags. gnani_tts_list_voices lists a model’s voices with gender, persona and description. It takes model, an optional gender (Male or Female) and, for Timbre v2.5 only, an optional language. It reads a catalog built into the server and makes no API call.

Languages

Speech-to-Text works in the same 10 languages as the API: Bengali (bn-IN), English (en-IN), Gujarati (gu-IN), Hindi (hi-IN), Kannada (kn-IN), Malayalam (ml-IN), Marathi (mr-IN), Punjabi (pa-IN), Tamil (ta-IN) and Telugu (te-IN). Prisma v3.0 also accepts indic-auto and comma-separated hints such as hi-IN,en-IN. See Languages. Text-to-Speech uses the same 10 languages plus auto. Timbre v2.5 also has one Hinglish voice (hi-en).

Settings

You normally only need the API key. Set them in the env block of your agent’s config:
The folder is created if it does not exist. Files are named with the tool and the date and time, such as gnani_tts_20261103_175002_945517.wav.

Run it as a local web service

By default your agent talks to the server through its standard input and output (the stdio transport), and the server starts and stops with the agent. Some clients want a web address instead. You can run the same server yourself, on your own machine, over HTTP:
Then point your client at http://127.0.0.1:8000/mcp. In Cursor, for example:
--transport accepts stdio (the default), http, sse or streamable-http.
  • The key goes to the server, not the client. You start the server, so the key must be in the environment of the terminal that starts it, or in ~/.gnani/credentials. Putting it in the client’s config does nothing.
  • There is no login on the web address. Anyone who can reach the port can use your Gnani account through the server. Keep --host 127.0.0.1 so only your own computer can connect, and do not expose the port to a network.

Troubleshooting

Where to find logs: in Cursor, open the Output panel and choose MCP Logs. In Claude Code, run claude mcp list or /mcp. In Codex, type /mcp. The server writes its log lines to stderr, which most clients capture. Still stuck? Contact support@gnani.ai with the error text (never your API key) and the request_id that transcription calls return.

Security and costs

  • Your API key is a secret. Do not paste it into chats, commit it to Git, or share config files that contain it. Prefer the credentials file or an environment variable referenced from your config. If a key leaks, stop using it and ask Gnani to replace it.
  • Project-level configs are often committed. .cursor/mcp.json and .mcp.json are usually shared, so keep keys out of them.
  • Your audio leaves your computer. Files you transcribe are uploaded to the Gnani API. Do not use sensitive recordings unless that is acceptable under your organization’s policies.
  • The server runs with your permissions. It reads any file path the agent gives it and writes audio to the output folder. Review the agent’s tool calls when you are unsure.
  • Requests count against your Gnani account. Every transcription and synthesis request uses your API key, and expressive tags are billed as characters. A request to “try all the voices” makes many calls.

Next steps

Available voices

The full Timbre v2.5 and Timbre v3.0 voice catalogs.

Audio tags

Expressive tags for Timbre v3.0.

Speech-to-Text

The models and options behind the transcription tools.

Python SDK

Call the same APIs from your own Python code.