MCP Gateway
MCP Gateway
MCP Gateway — 프로덕션 준비된 러시아어 LLM용 Model Context Protocol 게이트웨이: 자동 폴백, 152-ФЗ에 따른 개인 데이터 익명화, 토큰 86% 절약을 갖춘 GigaChat 및 YandexGPT를 위한 통합 인터페이스입니다.
모든 MCP 클라이언트(Hermes Agent, Claude Code, Cursor, n8n)를 연결하면 단일 엔드포인트를 통해 러시아어 모델에 액세스할 수 있습니다. 스택: FastAPI, MCP SDK, GigaChat API, YandexGPT API.
✨ 기능
기능 | 설명 |
🔀 멀티프로바이더 | GigaChat(기본) + YandexGPT(폴백) + Ollama(로컬) |
🛡️ 152-ФЗ | 기본 제공 개인 데이터 감지 및 익명화: 전화번호, INN, 여권, SNILS, 주소 |
💰 86% 절약 | GigaChat ~200₽/M 토큰 대비 YandexGPT ~1,455₽/M 토큰 |
🔄 자동 폴백 | 오류 및 rate-limit(429) 발생 시 공급자 무중단 전환 |
🐳 Docker Ready | 한 번의 명령으로 배포할 수 있는 전체 Docker Compose |
💚 Health Checks | 모니터링 엔드포인트 및 자동 시작 systemd 서비스 |
Related MCP server: Multi-Provider LLM MCP Server
🏗️ 아키텍처
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 엔드포인트
메서드 | 경로 | 설명 |
|
| 서비스 및 공급자 상태 |
|
| Swagger UI |
|
| 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/ -v13/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 — 자유롭게 사용하세요.
This server cannot be deployed
Maintenance
Related MCP Connectors
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
OpenAI-compatible LLM gateway for Russia: 500+ models, ruble pricing, balance, chat.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides a unified MCP interface for running completions, embeddings, image generation, and classification across OpenAI, Anthropic, Groq, and Mistral. Eliminates provider-specific boilerplate by standardizing API calls for text generation, vector embeddings, and classification tasks.MIT
- FlicenseAqualityDmaintenanceUnified MCP server for querying multiple LLM providers (Gemini, OpenAI, Anthropic, etc.) with advanced routing, cost optimization, and fallback resilience.222 npm-
- AlicenseAqualityFmaintenanceMCP server for Yandex GPT API enabling text generation, embeddings, classification, summarization, and tokenization.851 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible applications to interact with local and cloud-hosted LLM models for model management, text generation, chat, embeddings, and web search/fetch.958 npmAGPL 3.0