# tkassa-mcp

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/theYahia/tkassa-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 251  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tkassa-mcp

## Description
MCP server for T-Kassa (T-Bank/Tinkoff) payment API — payments, refunds. 5 tools. First MCP for T-K

## Tools
Capabilities this server exposes over MCP:

- **init_payment** — Create a payment. Returns PaymentURL. Supports one-step/two-step, receipts (54-FZ), recurring, DATA fields
- **get_payment_state** — Get payment status by PaymentId (NEW, AUTHORIZED, CONFIRMED, REVERSED, REFUNDED, REJECTED)
- **confirm_payment** — Confirm a two-step payment. Supports partial confirmation
- **cancel_payment** — Cancel a payment (before or after confirmation). Supports partial cancellation
- **charge_payment** — Charge a recurring payment using RebillId from a saved card
- **refund_payment** — Full or partial refund. Payment must be in CONFIRMED status
- **add_customer** — Register a customer for saving cards and recurring payments
- **get_customer** — Get customer data (Email, Phone) by CustomerKey
- **remove_customer** — Remove a customer and all saved cards
- **get_card_list** — List saved cards (CardId, Pan, ExpDate, RebillId)
- **remove_card** — Remove a saved card by CardId
- **create_sbp_qr** — Generate QR code for SBP payment (payload link or base64 PNG)
- **get_sbp_qr_state** — Check SBP QR payment status
- **send_closing_receipt** — Send a closing receipt with Items (Name, Price, Quantity, Tax) for fiscal compliance
- **get_invest_portfolio** — Get investment portfolio: stocks, bonds, ETFs, current value and P&L
- **find_instrument** — Search instrument by ticker, ISIN, or company name. Returns FIGI key

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "tkassa-mcp": {
    "command": "npx",
    "args": ["-y","@theyahia/tkassa-mcp"],
    "env": {
      "TKASSA_TERMINAL_KEY": "",
      "TKASSA_PASSWORD": "",
      "TINKOFF_INVEST_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `TKASSA_TERMINAL_KEY`, `TKASSA_PASSWORD`, `TINKOFF_INVEST_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What tkassa-mcp MCP server does

The tkassa-mcp MCP server connects an MCP client to the T-Kassa payment API used by T-Bank/Tinkoff. It covers the main payment lifecycle: creating a payment, checking its state, confirming authorized two-step payments, canceling payments, charging a saved-card recurring payment, and issuing full or partial refunds.

Customer and card management tools support recurring-payment workflows. An agent can register a customer, retrieve customer contact data, list saved cards and their rebilling identifiers, or remove a customer or individual card. The server also creates SBP Fast Payments QR codes and checks their payment status.

Receipt handling is available through a closing-receipt tool that accepts items, prices, quantities, and tax information for 54-FZ fiscal compliance. With a separate T-Invest token, the server can return an investment portfolio containing stocks, bonds, ETFs, current value, and profit or loss, and can search instruments by ticker, ISIN, or company name.

## How it works

The MCP package runs as a Node.js process. Clients can start it with `npx -y @theyahia/tkassa-mcp` over the standard process transport. It also offers HTTP mode, with JSON-RPC requests at `POST /mcp` and a health endpoint at `GET /health`; the port can be set with `HTTP_PORT` or a command-line option.

Requests to T-Kassa are authenticated with a SHA-256 token derived from sorted scalar request values, including the terminal password and terminal key. The server handles this signing step automatically. Nested receipt and DATA objects are not included in the signature calculation. Monetary values are supplied in rubles at the server interface and converted to kopecks for the API.

T-Kassa can send status notifications to the `notification_url` supplied when a payment is initialized. The notification includes payment details and a token that the receiving application should verify using the same sorted-value SHA-256 method.

## Setup and configuration

Install or run the package from npm as `@theyahia/tkassa-mcp`. Configure an MCP client with these required variables:

- `TKASSA_TERMINAL_KEY`: the terminal key from the T-Kassa dashboard.
- `TKASSA_PASSWORD`: the terminal password used for request signing.

Set `TINKOFF_INVEST_TOKEN` when portfolio and instrument tools are needed. Without it, those two tools return a descriptive error. Test credentials are available through the T-Kassa dashboard.

The README includes launch configurations for Claude Desktop, Claude Code, Cursor, and Windsurf. The source repository is archived; the current package implementation is maintained under `servers/tkassa/` in the `theYahia/WWmcp` repository, while the npm package remains `@theyahia/tkassa-mcp`.

## Tools and capabilities

The 16 tools are grouped as follows:

- Payments: initialize, inspect, confirm, cancel, and charge recurring payments.
- Refunds: make a full or partial refund for a confirmed payment.
- Customers and cards: add, retrieve, or remove customers; list or remove saved cards.
- SBP: create a QR payment and query its state.
- Receipts: send a closing receipt with item and tax data.
- T-Invest: retrieve a portfolio and find an instrument’s FIGI.

The `init_payment` operation can return a payment URL and accepts options for one-step or two-step processing, recurring payments, receipts, DATA fields, and notification callbacks. Partial confirmation and cancellation are supported where the T-Kassa API permits them.

## Limitations and notes

The T-Invest features require a separate token and are not available from the terminal credentials alone. Refunds require the payment to be in `CONFIRMED` status. Recurring charges depend on a `RebillId` from a saved card, and customer or card removal can affect future recurring payments.

The package uses the T-Kassa base URL `https://securepay.tinkoff.ru/v2/` and retries requests automatically with exponential backoff for HTTP 429 and 5xx responses. The GitHub repository no longer receives updates; issues and pull requests should be directed to WWmcp.

_Full upstream README: https://allmcps.com/mcp/tkassa-mcp/readme_

