Skip to main content
Glama
kvochkin-dev

MCP Gateway

by kvochkin-dev

MCP Gateway


MCP Gateway — ロシアのLLM向け本番対応Model Context Protocolゲートウェイ: 自動フォールバック、152-FZ準拠の個人データ匿名化、トークン86%削減を備えたGigaChatおよびYandexGPTへの単一インターフェース。

任意のMCPクライアント (Hermes Agent、Claude Code、Cursor、n8n) を接続するだけで、単一のエンドポイントからロシアのモデルにアクセスできます。スタック: FastAPI、MCP SDK、GigaChat API、YandexGPT API。


✨ 機能

機能

説明

🔀 マルチプロバイダー

GigaChat (プライマリ) + YandexGPT (フォールバック) + Ollama (ローカル)

🛡️ 152-FZ

個人データの検出・匿名化を内蔵: 電話番号、ИНН、パスポート、СНИЛС、住所

💰 86%のコスト削減

GigaChat 約200₽/Mトークン vs YandexGPT 約1,455₽/Mトークン

🔄 自動フォールバック

エラーおよびレート制限 (429) 時のシームレスなプロバイダー切り替え

🐳 Docker Ready

ワンコマンドデプロイのための完全なDocker Compose

💚 Health Checks

モニタリングエンドポイントと自動起動付きsystemdサービス


Related MCP server: MCP LLM Generator v2

🏗️ アーキテクチャ

flowchart TB
    classDef client fill:#eef2f7,stroke:#4a5568,stroke-width:1.5px
    classDef gateway fill:#edf2f7,stroke:#4a5568,stroke-width:1.5px
    classDef llm fill:#e2e8f0,stroke:#4a5568,stroke-width:1.5px

    subgraph Client["👤 Клиент"]
        Agent["🤖 MCP-клиент<br>Hermes Agent / Claude Code / n8n"]
    end
    class Client client

    subgraph Gateway["⚙️ MCP Gateway (FastAPI, port 8000)"]
        MCP["MCP Server<br>5 tools"]
        Anon["🛡️ Анонимизатор ПД<br>152-ФЗ"]
        Fallback["🔀 Fallback-оркестратор"]
        MCP --> Anon --> Fallback
    end
    class Gateway gateway

    subgraph Providers["🧠 LLM-провайдеры"]
        Giga["GigaChat<br>~200₽/M токенов"]
        Yandex["YandexGPT<br>~1 455₽/M токенов"]
        Ollama["Ollama<br>локально, 0₽"]
    end
    class Providers llm

    Agent --> MCP
    Fallback -->|"основной"| Giga
    Fallback -.->|"fallback"| Yandex
    Fallback -.->|"fallback"| Ollama

🚀 クイックスタート

# Клонирование
git clone https://github.com/kvochkin-dev/mcp-gateway.git
cd mcp-gateway

# Настройка окружения
cp .env.example .env
# Впишите свои API-ключи в .env

# Запуск через Docker
docker-compose up -d

# Или напрямую
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python app.py

📋 APIエンドポイント

メソッド

パス

説明

GET

/health

サービスとプロバイダーのステータス

GET

/docs

Swagger UI

POST

/mcp

MCPインターフェース (ツール)

Health Check

curl http://localhost:8000/health
{
  "status": "healthy",
  "gigachat": "connected",
  "yandexgpt": "connected",
  "anonymizer": "ready"
}

🔐 設定

すべてのシークレットは .env に保存されます (ファイルはgitから除外):

GIGACHAT_CLIENT_ID=***
GIGACHAT_CLIENT_SECRET=***
YANDEXGPT_API_KEY=***
YANDEXGPT_FOLDER_ID=***

🧪 テスト

pytest tests/ -v

13/13 テスト合格 — プロバイダークライアント、フォールバックロジック、個人データ匿名化。


📁 プロジェクト構成

mcp-gateway/
├── app.py                  # FastAPI + MCP сервер
├── src/
│   ├── clients/            # GigaChat, YandexGPT клиенты
│   └── anonymizer/         # 152-ФЗ анонимизация ПД
├── scripts/
│   └── mcp-monitor.sh      # Мониторинг сервисов
├── docs/                   # Отчёты и документация
├── tests/                  # 13 тестов
└── docker-compose.yml      # Docker-развёртывание

📄 ライセンス

MIT — 自由にご利用ください。


F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Connect MCP clients to 2,000+ AI models without managing provider API keys.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kvochkin-dev/mcp-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server