{
  "markdown": "> ## 🗄 Репозиторий заархивирован\n>\n> Разработка переехала в **[theYahia/WWmcp](https://github.com/theYahia/WWmcp)** — монорепозиторий MCP-серверов для незападных API: СНГ, MENA, Африка, LATAM, Юго-Восточная Азия. Общее ядро `@theyahia/mcp-core`, единый CI, единый релизный конвейер.\n>\n> Актуальная версия того, что лежало здесь: [`servers/tkassa/`](https://github.com/theYahia/WWmcp/tree/main/servers/tkassa)\n>\n> Пакет в npm прежний — [`@theyahia/tkassa-mcp`](https://www.npmjs.com/package/@theyahia/tkassa-mcp), ставится и работает как раньше.\n> Здесь больше ничего не обновляется. Задачи и pull request'ы — в WWmcp.\n>\n> **Archived — development moved to [theYahia/WWmcp](https://github.com/theYahia/WWmcp),** a monorepo of MCP servers for non-Western APIs.\n> The current version of this package now lives at [`servers/tkassa/`](https://github.com/theYahia/WWmcp/tree/main/servers/tkassa).\n> The npm package [`@theyahia/tkassa-mcp`](https://www.npmjs.com/package/@theyahia/tkassa-mcp) is unchanged.\n> Please open issues and pull requests there.\n\n# @theyahia/tkassa-mcp\n\nMCP server for T-Kassa (T-Bank/Tinkoff) payment API. **16 tools:** payments, refunds, recurring charges, customer management, saved cards, SBP (Fast Payments), receipts (54-FZ), T-Invest portfolio.\n\n[![npm](https://img.shields.io/npm/v/@theyahia/tkassa-mcp)](https://www.npmjs.com/package/@theyahia/tkassa-mcp)\n[![license](https://img.shields.io/npm/l/@theyahia/tkassa-mcp)](./LICENSE)\n\nPart of the [Russian API MCP](https://github.com/theYahia/russian-mcp) series (50 servers) by [@theYahia](https://github.com/theYahia).\n\n## Quick Start\n\n### Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"tkassa\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@theyahia/tkassa-mcp\"],\n      \"env\": {\n        \"TKASSA_TERMINAL_KEY\": \"your-terminal-key\",\n        \"TKASSA_PASSWORD\": \"your-password\"\n      }\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add tkassa -e TKASSA_TERMINAL_KEY=your-key -e TKASSA_PASSWORD=your-password -- npx -y @theyahia/tkassa-mcp\n```\n\n### Cursor / Windsurf\n\n```json\n{\n  \"tkassa\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@theyahia/tkassa-mcp\"],\n    \"env\": {\n      \"TKASSA_TERMINAL_KEY\": \"your-terminal-key\",\n      \"TKASSA_PASSWORD\": \"your-password\"\n    }\n  }\n}\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|:--------:|-------------|\n| `TKASSA_TERMINAL_KEY` | Yes | Terminal key (Dashboard -> Shops -> Terminals) |\n| `TKASSA_PASSWORD` | Yes | Terminal password (used for SHA-256 token signing) |\n| `TINKOFF_INVEST_TOKEN` | No | T-Invest API token (for tools 15–16). Get in T-Invest app: Settings → OpenAPI Token |\n\nGet test credentials at [T-Kassa Dashboard](https://www.tbank.ru/kassa/).\n\n## Tools (16)\n\n### Payments (5)\n\n| Tool | Description |\n|------|-------------|\n| `init_payment` | Create a payment. Returns PaymentURL. Supports one-step/two-step, receipts (54-FZ), recurring, DATA fields |\n| `get_payment_state` | Get payment status by PaymentId (NEW, AUTHORIZED, CONFIRMED, REVERSED, REFUNDED, REJECTED) |\n| `confirm_payment` | Confirm a two-step payment. Supports partial confirmation |\n| `cancel_payment` | Cancel a payment (before or after confirmation). Supports partial cancellation |\n| `charge_payment` | Charge a recurring payment using RebillId from a saved card |\n\n### Refunds (1)\n\n| Tool | Description |\n|------|-------------|\n| `refund_payment` | Full or partial refund. Payment must be in CONFIRMED status |\n\n### Customers & Cards (5)\n\n| Tool | Description |\n|------|-------------|\n| `add_customer` | Register a customer for saving cards and recurring payments |\n| `get_customer` | Get customer data (Email, Phone) by CustomerKey |\n| `remove_customer` | Remove a customer and all saved cards |\n| `get_card_list` | List saved cards (CardId, Pan, ExpDate, RebillId) |\n| `remove_card` | Remove a saved card by CardId |\n\n### SBP - Fast Payments (2)\n\n| Tool | Description |\n|------|-------------|\n| `create_sbp_qr` | Generate QR code for SBP payment (payload link or base64 PNG) |\n| `get_sbp_qr_state` | Check SBP QR payment status |\n\n### Receipts - 54-FZ (1)\n\n| Tool | Description |\n|------|-------------|\n| `send_closing_receipt` | Send a closing receipt with Items (Name, Price, Quantity, Tax) for fiscal compliance |\n\n### T-Invest (2)\n\nRequires `TINKOFF_INVEST_TOKEN`. If not set, these tools return a descriptive error.\n\n| Tool | Description |\n|------|-------------|\n| `get_invest_portfolio` | Get investment portfolio: stocks, bonds, ETFs, current value and P&L |\n| `find_instrument` | Search instrument by ticker, ISIN, or company name. Returns FIGI key |\n\n## Auth\n\nEvery request is signed with SHA-256:\n\n```\nToken = SHA-256(concat(sorted values of {Password, TerminalKey, ...params}))\n```\n\nOnly scalar values participate in signing. Nested objects (Receipt, DATA) are excluded. Handled automatically.\n\n## HTTP Transport\n\n```bash\nHTTP_PORT=3000 npx @theyahia/tkassa-mcp\n# or\nnpx @theyahia/tkassa-mcp --http 3000\n```\n\nEndpoints: `POST /mcp` (JSON-RPC), `GET /health` (status).\n\n## Skills\n\n- **skill-create-payment** -- create a payment and get a payment URL\n- **skill-payment-status** -- check payment status by PaymentId\n\n## Webhook Notifications\n\nT-Kassa sends POST notifications to your `notification_url` (set in `init_payment`) when payment status changes:\n\n```json\n{\n  \"TerminalKey\": \"your-key\",\n  \"OrderId\": \"your-order-id\",\n  \"Success\": true,\n  \"Status\": \"CONFIRMED\",\n  \"PaymentId\": 123456789,\n  \"ErrorCode\": \"0\",\n  \"Amount\": 10000,\n  \"RebillId\": 987654321,\n  \"CardId\": 12345,\n  \"Pan\": \"430000******0777\",\n  \"ExpDate\": \"1230\",\n  \"Token\": \"sha256-signature\"\n}\n```\n\nVerify by computing the Token the same way (sorted values concat + SHA-256) and comparing.\n\n## Notes\n\n- Base URL: `https://securepay.tinkoff.ru/v2/`\n- Amounts are in kopecks internally (server converts rubles automatically)\n- Automatic retry with exponential backoff on 429/5xx\n- API docs: https://www.tbank.ru/kassa/dev/payments/\n\n## Demo Prompts\n\n**Create a payment with receipt:**\n```\nCreate a payment for 1500 rubles, order \"order-42\", with a receipt: 1x \"Premium subscription\" at 1500 RUB, VAT 20%, tax system USN income. Send receipt to user@example.com.\n```\n\n**Set up recurring payments:**\n```\nRegister customer \"cust-123\" with email user@example.com, then create a recurring payment for 990 rubles on order \"sub-monthly-1\".\n```\n\n**Refund and check status:**\n```\nRefund 500 rubles from payment 777888999, then check its current status.\n```\n\n## Series: Russian API MCP\n\n| MCP | Status | Description |\n|-----|--------|-------------|\n| [@metarebalance/dadata-mcp](https://github.com/theYahia/dadata-mcp) | ready | Addresses, companies, banks, phones |\n| [@theyahia/cbr-mcp](https://github.com/theYahia/cbr-mcp) | ready | Exchange rates, key rate |\n| [@theyahia/yookassa-mcp](https://github.com/theYahia/yookassa-mcp) | ready | Payments, refunds, receipts 54-FZ |\n| [@theyahia/tkassa-mcp](https://github.com/theYahia/tkassa-mcp) | **v2.1** | **16 tools** -- payments, refunds, recurring, SBP, receipts, T-Invest |\n| ... | soon | **+46 servers** -- [full list](https://github.com/theYahia/russian-mcp) |\n\n## License\n\nMIT\n\n---\n\nTelegram: [@vhodvai](https://t.me/vhodvai)\n",
  "bytes": 7196,
  "sha": "10e88f60bc613e08705ff65b52b87f6701351a62a74d71f45c68e15572b6c5ed",
  "repo_slug": "theyahia/tkassa-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_theyahia_tkassa_mcp_59ffb120/readme"
}