MCP Gateway for GigaChat and YandexGPT

MCP Gateway

An MCP gateway to GigaChat and YandexGPT with automatic failover between them and 152-FZ personal-data anonymization

  • 1 ★ on the repository
  • Last commit
MCP server

Extended access

Why this level

  • Forwards user text to external cloud LLMs (GigaChat, YandexGPT), even after anonymization
  • Personal-data masking relies on heuristics and may miss non-standard formats
All reasons and checks
Russian stack

kvochkin-dev/mcp-gateway

Install

Manual install

git clone https://github.com/kvochkin-dev/mcp-gateway.git && cd mcp-gateway && cp .env.example .env && docker-compose up -d

The README method: clone, fill in .env with your keys, and bring it up via Docker Compose.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Forwards user text to external cloud LLMs (GigaChat, YandexGPT), even after anonymization
  • Personal-data masking relies on heuristics and may miss non-standard formats

This is third-party code. Review the repository files before installing.

What it does

A FastAPI server exposes a single MCP endpoint to two Russian LLMs: GigaChat as the primary provider and YandexGPT as a fallback, with local Ollama as a third backup. On errors or a 429 rate limit, requests automatically switch to the next provider. Before sending text out, the server runs it through an anonymizer that finds and masks phone numbers, tax IDs, passport data, SNILS numbers and addresses, presented as compliance with Russia's 152-FZ personal-data law. It has a health endpoint reporting each provider's status and a Docker Compose file for deployment.

Who it is for. For teams that want one endpoint to Russian LLMs with failover and basic personal-data protection before sending text to the cloud.

Good fit when

  • You want one MCP interface to GigaChat and YandexGPT with automatic failover
  • You need phone numbers, tax IDs, passports and SNILS masked before text goes to a cloud LLM
  • You can self-host a FastAPI service via Docker

Not a fit when

  • You want a ready hosted service, not your own server: you deploy and operate the gateway yourself
  • Anonymization must be guaranteed complete: this is regex-and-heuristic detection, not a certified solution

Example request

Process this text with a customer's phone number via GigaChat, but mask the personal data first

MCP

Transport
http
Authentication
API key

Environment variables

GIGACHAT_CLIENT_ID required, secret
GigaChat API application client ID.
GIGACHAT_CLIENT_SECRET required, secret
GigaChat API application client secret.
YANDEXGPT_API_KEY required, secret
YandexGPT API key, used as the fallback provider.
YANDEXGPT_FOLDER_ID required
Yandex Cloud folder ID for YandexGPT.

Limitations

You need your own GigaChat keys (GIGACHAT_CLIENT_ID/SECRET) and YandexGPT keys (YANDEXGPT_API_KEY, YANDEXGPT_FOLDER_ID), stored in .env. PII anonymization is a set of heuristics and regular expressions, not a certified data-protection system, test it against your own data before relying on it in production. The repository contains many internal working files and article drafts (test reports, a Habr draft) unrelated to the server's actual operation.

How to disable. Stop the container with docker-compose down, or stop the mcp-gateway systemd service if it was installed as one.

FAQ

What happens if GigaChat is unavailable?

The request automatically falls back to YandexGPT, and to local Ollama if both are unavailable and it's configured.

Is anonymization guaranteed to hide all personal data?

No, it's regex-based heuristics for common formats (phone, tax ID, passport, SNILS, address), not a certified solution.

Discussion

No questions or reviews yet.

Russian stack

A small Python MCP server for Sber's GigaChat API: authorizes with a Basic key and calls the models directly from an agent, tested on OpenCode under Windows

MCP serverExtended access
Official

An ai-forever proxy that serves GigaChat through OpenAI, Anthropic and Gemini APIs so Claude Code, Codex and Gemini CLI can run on it

CLIBroad access145Repository stars
Official

MCP server that checks text for signs of AI generation through the GigaChat API

MCP serverExtended access5Repository stars
Russian stack

Four single-file MCP servers for YandexGPT, text recognition, SpeechKit speech synthesis and Yandex search

MCP serverExtended access
Russian stack

A local proxy exposing GigaChat through OpenAI- and Anthropic-compatible APIs so it can drive Claude Code, aider and other agents

CLIExtended access

README in short

The README presents the project as a production-ready gateway that saves on tokens by preferring GigaChat over YandexGPT, gives an architecture diagram, a Docker Compose quick start, an endpoint table, and a section on 13 of 13 passing tests for the anonymizer and fallback logic.

README badge

Report a problem