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 (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.jsoncontext_servers

Alternative: credentials file

Instead of setting SARVAM_API_KEY in the JSON config, you can store it in ~/.sarvam/credentials:

api_key = sk_...
region = in

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) saaras:v3
sarvam_tts_speak Text → audio file bulbul:v3
sarvam_tts_stream Text → streamed audio bulbul:v3
sarvam_translate Cross-language text translate mayura:v1
sarvam_transliterate Script conversion
sarvam_identify_language Language + script detect
sarvam_text_analytics Typed Q&A over text
sarvam_llm_complete Chat completions sarvam-30b
sarvam_vision_extract Document Intelligence Sarvam Vision
sarvam_vision_job_status Poll Document Intelligence 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_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.
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

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.2.0.tar.gz (64.6 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.2.0-py3-none-any.whl (84.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sarvam_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 64.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sarvam_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 294fb8e4bb0dc9bd475f237844885aaf63b7e7f32fa0f91ba4f4a0be775d3cdc
MD5 dbe79a902d7e6ee8f8e5bb3c3001a294
BLAKE2b-256 15aea1259fcbda6c88f94141822a19bb340e559136b85412ff26ae158e501432

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarvam_mcp-0.2.0.tar.gz:

Publisher: publish-pypi.yml on sarvamai/sarvam-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: sarvam_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 84.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sarvam_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0427eec0b481b8d0724c5974f34ba1a189e587227547d444002ade80c57a8f9d
MD5 a4b76d5aca554e0dcf63aa5176eb0d9c
BLAKE2b-256 d789991fcadc9ae0e3dc0c3b61b9554956cfefe5d127d53da0b541460c3c44ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarvam_mcp-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on sarvamai/sarvam-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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