Skip to main content

Official Sarvam AI MCP server — STT, TTS, Translate, Transliterate, LLM, Vision OCR for Indic languages

Project description

sarvam-mcp

Official Sarvam MCP server. Exposes every public Sarvam API — STT, TTS, Translate, Transliterate, Language ID, Text Analytics, LLM (Sarvam-M / 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.

Quickstart

The fastest way is the one-line installer at mcp.sarvam.ai — auto-detects your MCP clients and wires them up:

curl -fsSL https://mcp.sarvam.ai/install | bash

Or install manually:

pip install sarvam-mcp        # or:  uvx sarvam-mcp

Drop this JSON into your MCP client (same shape works in Cursor / Claude Desktop / Claude Code / Windsurf / Zed):

{
  "mcpServers": {
    "sarvam": {
      "command": "uvx",
      "args": ["sarvam-mcp"]
    }
  }
}

No API key required up front. The server starts with auth deferred and prompts you for the key on the first tool call via MCP elicitation (Cursor / Claude Desktop will show a popup). The message links to Key management — open it, copy an API key, and paste. The key gets saved to ~/.sarvam/credentials (mode 0600) so subsequent runs don't ask.

If your MCP client doesn't support elicitation, or you'd rather set the key ahead of time (easiest first):

# A) Env var in the MCP client config (no terminal in many IDEs) — add next to
#    "args" for the sarvam server:  "env": { "SARVAM_API_KEY": "sk_..." }

# B) Interactive setup (headless / when you prefer the terminal)
sarvam-mcp init

# C) Advanced: create ~/.sarvam/credentials yourself (avoid echoing a real key in shell history)
mkdir -p ~/.sarvam && printf 'api_key = sk_...\n' > ~/.sarvam/credentials && chmod 600 ~/.sarvam/credentials

Per-client paths

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
  • Claude Codeclaude mcp add sarvam -- uvx sarvam-mcp
  • Cursor~/.cursor/mcp.json
  • Windsurf — Cascade settings → MCP servers
  • Zedsettings.jsoncontext_servers

Tools

All defaults below reflect the latest non-deprecated models live as of 2026-04-27.

Tool What it does Default model Other accepted
sarvam_stt_transcribe Audio file → transcript (5 modes: transcribe, translate, verbatim, translit, codemix) saaras:v3 saarika:v2.5 (legacy)
sarvam_stt_translate Audio → English text (DEPRECATED — use stt_transcribe with mode=translate) saaras:v2.5
sarvam_stt_batch_submit Long-audio job init (Azure SAS) saaras:v3 saarika:v2.5 (legacy)
sarvam_stt_batch_status Long-audio job poll
sarvam_tts_speak Text → audio file bulbul:v3 (speaker priya) bulbul:v3-beta, bulbul:v2
sarvam_tts_stream Text → streamed audio bulbul:v3 bulbul:v2
sarvam_translate Cross-language text translate mayura:v1 sarvam-translate:v1 (22 langs)
sarvam_transliterate Script conversion
sarvam_identify_language Language + script detect (11 languages)
sarvam_text_analytics Typed Q&A over text
sarvam_llm_complete Chat completions sarvam-30b sarvam-105b, sarvam-m (legacy)
sarvam_vision_extract Document Intelligence (job-based pipeline) Sarvam Vision (3B VLM)
sarvam_vision_job_status Poll Document Intelligence job status
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. Falls back to ~/.sarvam/credentials.
SARVAM_API_REGION in Data residency region.
SARVAM_API_BASE_URL https://api.sarvam.ai Override for testing/staging.
SARVAM_MCP_BASE_PATH ~/Desktop Where audio/document files land in files mode.
SARVAM_AUDIO_OUTPUT_MODE files files | resources | both.

~/.sarvam/credentials format:

api_key = sk_...
region = in

Two namespaces

The server exposes 27 tools across two clean namespaces:

  • sarvam_tools_*runtime tools. Call Sarvam APIs at runtime to do things (transcribe audio, generate speech, translate text, ask Sarvam-M, run composite voice/dub/localize/recall workflows). 16 tools.
  • sarvam_code_*builder tools. Help an agent write code that uses Sarvam: search docs, look up endpoint shapes, list supported languages and speakers, validate request bodies, recommend models, fetch tested code snippets, scaffold starter projects (simple-tts-cli, python-voice-bot, nextjs-translator). 11 tools — no API key needed for most of them.

"Translate this paragraph to Hindi."sarvam_tools_translate invokes Sarvam.

"Build me an Indic translator app in Next.js."sarvam_code_scaffold writes a working starter project to disk; sarvam_code_snippet provides tested glue code.

Companion repo

The install website at mcp.sarvam.ai lives in sarvamai/sarvam-mcp-website (Next.js + Tatva, deployed on Sarvam k8s). This repo is just the Python package.

Development

uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest -q                              # 51 tests
mcp dev src/sarvam_mcp/server.py       # MCP Inspector

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sarvam_mcp-0.1.0.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sarvam_mcp-0.1.0-py3-none-any.whl (67.2 kB view details)

Uploaded Python 3

File details

Details for the file sarvam_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: sarvam_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.31

File hashes

Hashes for sarvam_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba4c1240be539b383de4600800c322e2cf7b55c6a507d96b3ec923a18e4da857
MD5 02e5fed2fcbffa61bd2304bc5ce6d53e
BLAKE2b-256 ccfd9852d3e4cb4daa1ba307b0c4b89b9c3bc17785ae5d340cd61b2556753abf

See more details on using hashes here.

File details

Details for the file sarvam_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sarvam_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 67.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.31

File hashes

Hashes for sarvam_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8855ff2dd53f67529fb6fb20092a40c1b96ec2f1cf13c1a1ad0b3f8e5b22786
MD5 ed82a5167a8db4dfd0b74af200837e12
BLAKE2b-256 f0433a7f22f96dc09dce1bcf31c0a0d3b9eec7dc37f317ea2211cbffbef05f29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page