sarvam-mcp
Official Sarvam MCP server. Exposes every public Sarvam API — STT, TTS, Translate, Transliterate, Language ID, Text Analytics, LLM (30B / 105B), Vision Document Intelligence, 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.
Cross-platform Python package: macOS, Windows, and Linux (Python 3.11+).
Quickstart
1. Get your API key
Sign up or log in at dashboard.sarvam.ai/key-management and copy your API key (sk_...).
2. Add to your MCP client
Paste this into your MCP config JSON:
{
"mcpServers": {
"sarvam": {
"command": "uvx",
"args": ["sarvam-mcp"],
"env": {
"SARVAM_API_KEY": "sk_..."
}
}
}
}
Replace sk_... with your actual API key.
If you've installed via pip install sarvam-mcp, you can use the console script directly:
{
"mcpServers": {
"sarvam": {
"command": "sarvam-mcp",
"env": {
"SARVAM_API_KEY": "sk_..."
}
}
}
}
3. Config file locations
| Client | Config path |
|---|---|
| Cursor | ~/.cursor/mcp.json (macOS/Linux) · %USERPROFILE%\.cursor\mcp.json (Windows) |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · %APPDATA%\Claude\claude_desktop_config.json (Windows) |
| Claude Code | claude mcp add sarvam -- uvx sarvam-mcp (then set SARVAM_API_KEY env var) |
| Windsurf | Cascade settings → MCP servers |
| Zed | settings.json → context_servers |
Alternative: credentials file
Instead of setting SARVAM_API_KEY in the JSON config, you can store it in ~/.sarvam/credentials:
api_key = sk_...
The server checks SARVAM_API_KEY env var first, then falls back to ~/.sarvam/credentials.
Install
# Option A: run directly (no install needed)
uvx sarvam-mcp
# Option B: install globally
pip install sarvam-mcp
Tools
All defaults below reflect the latest non-deprecated models.
| Tool | What it does | Default model |
|---|---|---|
sarvam_stt_transcribe |
Audio file → transcript (5 modes, including English via mode=translate) |
saaras:v4 |
sarvam_stt_realtime |
Mono WAV → realtime transcript | saaras:v3-realtime |
sarvam_tts_speak |
Text → audio file | bulbul:v3, bulbul:v4-flash |
sarvam_tts_stream |
Text → streamed audio | bulbul:v3, bulbul:v4-flash |
sarvam_translate |
Cross-language text translate | mayura:v1 |
sarvam_document_translate |
Whole document, layout preserved | — |
sarvam_transliterate |
Script conversion | — |
sarvam_identify_language |
Language + script detect | — |
sarvam_text_analytics |
Typed Q&A over text | — |
sarvam_llm_complete |
Chat completions | sarvam-105b |
sarvam_vision_digitise |
Document OCR to markdown, HTML, or JSON | Sarvam Vision |
sarvam_vision_extract |
Schema extraction from a document | Sarvam Vision |
sarvam_vision_job_status |
Poll a Document AI job | — |
sarvam_dubbing_submit |
Official video/audio dubbing job | — |
sarvam_pronunciation_list |
List pronunciation dictionaries | — |
sarvam_pronunciation_get |
Get a pronunciation dictionary | — |
sarvam_pronunciation_create |
Create a pronunciation dictionary | — |
sarvam_pronunciation_delete |
Delete a pronunciation dictionary | — |
Configuration
| Env var | Default | Description |
|---|---|---|
SARVAM_API_KEY |
— | Required. API key from dashboard.sarvam.ai. |
SARVAM_API_BASE_URL |
https://api.sarvam.ai |
Override for testing/staging. |
SARVAM_MCP_BASE_PATH |
~/Desktop |
Where audio/document files land. |
SARVAM_AUDIO_OUTPUT_MODE |
files |
files | resources | both. |
Two namespaces
The server exposes tools across two namespaces:
sarvam_tools_*— runtime tools. Call Sarvam APIs to do things (transcribe, speak, translate, etc.).sarvam_code_*— builder tools. Help you write code that uses Sarvam: docs, endpoint shapes, language lists, code snippets, starter projects.
Development
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest -q
mcp dev src/sarvam_mcp/server.py
Metadata
Release files for sarvam-mcp 0.2.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sarvam_mcp-0.2.12.tar.gz | 85.6 kB | With provenance | Details for sarvam_mcp-0.2.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sarvam_mcp-0.2.12-py3-none-any.whl | Python 3 | none | any | Details for sarvam_mcp-0.2.12-py3-none-any.whl |
Total release size: 192.3 kB
Release files / sarvam_mcp-0.2.12.tar.gz
| Download URL | sarvam_mcp-0.2.12.tar.gz |
|---|---|
| Size | 85.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a546e9433dc2de2e60563f5bfd54a7c17bfc40cd2afe1f62c981594b5106d4fe
|
|
BLAKE2b-256 checksum How to use checksums |
783722f4788da1d87970b9c24eb7053f3dfad38788a8446e151507705a13ce2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / sarvam_mcp-0.2.12-py3-none-any.whl
| Download URL | sarvam_mcp-0.2.12-py3-none-any.whl |
|---|---|
| Size | 106.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f12b29ca9d26a7a55b866f521bd37e4eaba0b2d02361b77fc96091139634a5b7
|
|
BLAKE2b-256 checksum How to use checksums |
94c44d90d19067450a61abb48617c349b2905a8048913b44ebfa50fec506e2e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logSecurity for sarvam-mcp 0.2.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sarvam_mcp-0.2.12.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.