Metadata-Version: 2.5
Name: hasab-mcp
Version: 0.1.3
Summary: Hasab AI MCP server — translate, summarize, transcribe, TTS, and chat via api.hasab.ai (requires HASAB_KEY).
Author: Hasab AI
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.115.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: mcp>=2.1.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: uvicorn[standard]>=0.32.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# Hasab MCP

[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for [Hasab AI](https://hasab.ai). Lets Cursor, Claude Desktop, and other MCP hosts call Hasab language APIs from natural language—translation, summarization, transcription, text-to-speech, and chat.

Install from **PyPI**; calls **`https://api.hasab.ai`** with your **`HASAB_KEY`**. Source repository is private to Hasab.

---

## Requirements

- Python 3.11+
- [uv](https://docs.astral.sh/uv/) recommended (`uvx`)
- Hasab API key (`HASAB_KEY_…` from the portal)

---

## Install

```bash
pip install hasab-mcp
# or one-off / always latest cache:
uvx hasab-mcp
```

PyPI: https://pypi.org/project/hasab-mcp/

---

## Cursor

Add to `~/.cursor/mcp.json` (or project `.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "hasab": {
      "command": "uvx",
      "args": ["hasab-mcp"],
      "env": {
        "HASAB_API_KEY": "HASAB_KEY_…"
      }
    }
  }
}
```

Restart Cursor. You should see six tools: `hasab_translate`, `hasab_summarize`, `hasab_transcribe`, `hasab_tts`, `hasab_list_tts_speakers`, `hasab_chat`.

**Example prompts**

- `Translate "Good morning" to Amharic using Hasab.`
- `Using Hasab TTS, speak "ሰላም" in Amharic with speaker hanna. Give me the audio file path.`

---

## Claude Desktop

Same `mcpServers` block in:

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`

---

## Tools (v1)

| Tool | Hasab API |
| --- | --- |
| `hasab_translate` | `POST /api/translate` |
| `hasab_summarize` | `POST /api/summarize` |
| `hasab_transcribe` | `POST /api/upload-audio` |
| `hasab_tts` | `POST /api/tts/synthesize` |
| `hasab_list_tts_speakers` | `GET /api/tts/speakers` |
| `hasab_chat` | `POST /api/chat` |

Translation language codes: `amh`, `eng`, `orm`, `tig` (and aliases `en`, `am`, `ti`, `Oromo`, `Tigrigna`).

---

## Environment

| Variable | Required | Default |
| --- | --- | --- |
| `HASAB_API_KEY` | Yes | — |
| `HASAB_API_BASE_URL` | No | `https://api.hasab.ai` |
| `HASAB_MCP_AUDIO_DIR` | No | `{temp}/hasab-mcp/audio` |
| `HASAB_MCP_TIMEOUT` | No | `120` |
| `HASAB_MCP_LOG_LEVEL` | No | `INFO` |

Do not commit API keys. Each user uses their own key; usage bills to their Hasab account.

---

## License

Proprietary — Hasab AI. All rights reserved. Not open source. Internal and customer use via published PyPI package only.
