# Sarvam Mcp

> Official Sarvam MCP server

- **Type:** MCP server
- **Install:** `agentstack add mcp-sarvamai-sarvam-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sarvamai](https://agentstack.voostack.com/s/sarvamai)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sarvamai](https://github.com/sarvamai)
- **Source:** https://github.com/sarvamai/sarvam-mcp
- **Website:** https://mcp.sarvam.ai

## Install

```sh
agentstack add mcp-sarvamai-sarvam-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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](https://dashboard.sarvam.ai/key-management)** and copy your API key (`sk_...`).

### 2. Add to your MCP client

Paste this into your MCP config JSON:

```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:

```json
{
  "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`:

```ini
api_key = sk_...
```

The server checks `SARVAM_API_KEY` env var first, then falls back to `~/.sarvam/credentials`.

## Install

```bash
# 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_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

```bash
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest -q
mcp dev src/sarvam_mcp/server.py
```

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sarvamai](https://github.com/sarvamai)
- **Source:** [sarvamai/sarvam-mcp](https://github.com/sarvamai/sarvam-mcp)
- **License:** MIT
- **Homepage:** https://mcp.sarvam.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-sarvamai-sarvam-mcp
- Seller: https://agentstack.voostack.com/s/sarvamai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
