Metadata-Version: 2.3
Name: sms-mcp-server
Version: 0.1.0
Summary: Internal SMS multi-provider MCP server built with FastMCP
Author: luofengyuan
Author-email: luofengyuan <3562033221@qq.com>
Requires-Dist: fastmcp>=3.2.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pydantic-settings>=2.13.1
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# sms-mcp-server

Internal/private SMS MCP server built with **uv + FastMCP (3.x) + src package layout**.

- Multi-provider aggregation: `grizzlysms` / `smsactivate-like` / `5sim`
- Unified tools: balance, catalog, price compare, order, polling code, update status, list orders
- Provider-native tools: API-level access for major endpoints in current scope
- Transport: `stdio` and `streamable-http`

> This repository is intended for internal use.

---

## 1) Quickstart

### Install dependencies

```bash
uv sync --dev
```

### Configure environment

```bash
cp .env.example .env
# edit .env and fill provider API keys
```

### Run server (stdio)

```bash
uv run sms-mcp-server --transport stdio
```

### Run server (streamable-http)

```bash
uv run sms-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp
```

---

## 2) Core unified tools

- `sms_available_providers`
- `sms_get_balances`
- `sms_list_catalog`
- `sms_compare_prices`
- `sms_place_order`
  - explicit provider mode: pass `provider`
  - compare mode: set `compare=true`, optional `providers` for candidate set
- `sms_get_order_status`
- `sms_wait_for_code`
- `sms_update_order`
- `sms_list_orders`

### `sms_wait_for_code` redaction behavior

- New configurable `redaction_mode` parameter:
  - `none`: no redaction
  - `strict`: remove `full_text` and `raw`
- Backward-compatible parameter:
  - `include_full_sms=true` => equivalent to `redaction_mode=none`
  - `include_full_sms=false` => equivalent to `redaction_mode=strict`
- Default behavior (when both omitted):
  - controlled by `SMS_MCP_DEFAULT_CODE_REDACTION_MODE`
  - default value is `none` (no redaction)

---

## 3) Provider-native tools

### grizzlysms

- `grizzlysms_get_balance`
- `grizzlysms_get_countries`
- `grizzlysms_get_services_list`
- `grizzlysms_get_prices`
- `grizzlysms_get_prices_v2`
- `grizzlysms_get_prices_v3`
- `grizzlysms_get_number`
- `grizzlysms_get_number_v2`
- `grizzlysms_get_status`
- `grizzlysms_get_status_v2`
- `grizzlysms_set_status`

### smsactivate-like

- `smsactivate_get_balance`
- `smsactivate_get_country_and_operators`
- `smsactivate_get_services_and_cost`
- `smsactivate_get_services_and_cost_with_statistics`
- `smsactivate_get_prices`
- `smsactivate_get_number`
- `smsactivate_get_number_v2`
- `smsactivate_get_status`
- `smsactivate_set_status`
- `smsactivate_get_current_activations_list`

### 5sim

- `fivesim_get_profile`
- `fivesim_guest_countries`
- `fivesim_guest_products`
- `fivesim_guest_prices`
- `fivesim_buy_activation`
- `fivesim_check_order`
- `fivesim_finish_order`
- `fivesim_cancel_order`
- `fivesim_ban_order`
- `fivesim_list_orders`

---

## 4) Development

```bash
uv run ruff check .
uv run mypy src
uv run pytest
uv build
```

---

## 5) GitHub Actions -> Gitea

This repo includes two workflows:

1. **CI** (`.github/workflows/ci.yml`)
   - lint + typecheck + tests + build
2. **Release to Gitea** (`.github/workflows/release-gitea.yml`)
   - build package
   - publish wheel/sdist to **Gitea Packages (PyPI registry)**
   - mirror git branches/tags to Gitea repository

### Required GitHub secrets

- `GITEA_PYPI_PUBLISH_URL` (upload endpoint)
- `GITEA_PYPI_CHECK_URL` (optional but recommended)
- `GITEA_USERNAME`
- `GITEA_PAT`
- `GITEA_MIRROR_REPO_URL` (https URL without credentials)

The workflow injects credentials at runtime only.

---

## 6) Reference docs

- FastMCP installation/quickstart:
  - https://gofastmcp.com/getting-started/installation
  - https://gofastmcp.com/getting-started/quickstart
- MCP server build:
  - https://modelcontextprotocol.io/docs/develop/build-server
  - https://github.com/modelcontextprotocol/python-sdk
- Scaffolding reference:
  - https://pypi.org/project/create-mcp-server/
- SMS APIs:
  - https://grizzlysms.com/docs
  - https://sms-verification-number.com/cn/api-sms-activate/
  - https://5sim.net/zh/docs
