MCP Server

View as Markdown

Sarvam API MCP server

Official Sarvam Model Context Protocol (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.

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:

1{
2 "mcpServers": {
3 "sarvam": {
4 "command": "uvx",
5 "args": ["sarvam-mcp"],
6 "env": {
7 "SARVAM_API_KEY": "<YOUR_SARVAM_API_KEY>"
8 }
9 }
10 }
11}

Replace <YOUR_SARVAM_API_KEY> with your actual API key.

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.

ToolWhat it doesDefault model
sarvam_stt_transcribeAudio file → transcript (5 modes)saaras:v3
sarvam_tts_speakText → audio filebulbul:v3
sarvam_tts_streamText → streamed audiobulbul:v3
sarvam_translateCross-language text translatemayura:v1
sarvam_transliterateScript conversion
sarvam_identify_languageLanguage + script detect
sarvam_text_analyticsTyped Q&A over text
sarvam_llm_completeChat completionssarvam-30b
sarvam_vision_extractDocument IntelligenceSarvam Vision
sarvam_vision_job_statusPoll Document Intelligence job
sarvam_pronunciation_listList pronunciation dictionaries
sarvam_pronunciation_getGet a pronunciation dictionary
sarvam_pronunciation_createCreate a pronunciation dictionary
sarvam_pronunciation_deleteDelete a pronunciation dictionary

Configuration

Env varDefaultDescription
SARVAM_API_KEYRequired. API key from dashboard.sarvam.ai.
SARVAM_API_BASE_URLhttps://api.sarvam.aiOverride for testing/staging.
SARVAM_MCP_BASE_PATH~/DesktopWhere audio/document files land.

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.