MCP Server
Sarvam API MCP server
Official Sarvam Model Context Protocol (MCP) server. Exposes every public Sarvam API — STT (batch and realtime), TTS, text translation, transliteration, Language ID, LLM (105B and 105B Conversations), Document AI (parse, extract, classify, split), Document Translation, Dubbing, and Pronunciation Dictionaries — as first-class MCP tools so any MCP-aware client (Claude Desktop, Claude Code, Cursor, Windsurf, Zed) can call Sarvam with zero boilerplate.
For whole-file translation (PDF, Office, HTML), see the Document Translation API in the docs — the MCP server’s sarvam_tools_translate tool covers text translation only, while sarvam_tools_document_translate handles documents.
Cross-platform Python package: macOS, Windows, and Linux (Python 3.11+).
Quickstart
1. Get your API key
Sign up or log in at indus.sarvam.ai/key-management and copy your API key.
2. Add to your MCP client
Paste this JSON into your favorite agent (Cursor, Claude Desktop, Windsurf, etc.) and it’ll set up Sarvam for you:
Replace <YOUR_SARVAM_API_KEY> with your actual API key.
If you installed with pip install sarvam-mcp instead, drop the args array and use the console script directly:
3. Alternative: credentials file
Instead of setting SARVAM_API_KEY in the JSON config, you can store it in ~/.sarvam/credentials:
The server checks the SARVAM_API_KEY env var first, then falls back to ~/.sarvam/credentials.
Verify your install
Ask your assistant something that exercises a Sarvam tool, for example:
“Translate ‘good morning’ to Hindi using sarvam.”
Tools
All defaults below reflect the latest non-deprecated models. Tools are registered under their namespace prefix, so the name your client sees is exactly what’s in the tables below.
Speech-to-text
See Batch Speech-to-Text for the underlying job pipeline.
Text-to-speech
Speakers are model-specific: bulbul:v3 uses short names (shubh is the default), while bulbul:v4-flash uses persona IDs of the form <voice>_<lang>_<style> (default shubh_enhi_ads). See Voices for both catalogs.
Text and language
Document AI
parse replaces the old digitise job, which was renamed upstream. See Document Intelligence for job shapes.
Page limits: 30 pages per PDF for parse, 20 for extract, and 500 for split and classify. Split and Classify also accept up to 10 documents per request, 20 categories and 1,000 segments. Full table in Languages, Formats & Limits.
Document translation and dubbing
See Dubbing API for pipeline and export formats.
Pronunciation dictionaries
Multi-step workflows
sarvam_tools_text_analytics is still registered for compatibility but raises immediately: Sarvam retired the /text-analytics endpoint, so there is no network call to make. For document and text extraction, use the Document AI tools above.
Builder tools
Builder tools help your assistant write code that uses Sarvam. They don’t call the API.
Configuration
Two namespaces
The server exposes tools across two namespaces:
sarvam_tools_*, runtime tools. Call Sarvam APIs to do things (transcribe, speak, translate, parse a document, etc.).sarvam_code_*, builder tools. Help you write code that uses Sarvam: docs, endpoint shapes, language lists, code snippets, starter projects.