Back to Home
henryoy icon

telegram-llm-mcp-sql-server

by henryoy

Overview

An MCP server integrating SQL Server with AI agents (Claude Desktop, Telegram Bot) to manage a complete quotation, sales, and invoicing system.

Installation

Run Command
npm run mcp

Environment Variables

  • DB_SERVER
  • DB_DATABASE
  • DB_USER
  • DB_PASSWORD
  • DB_ENCRYPT
  • MCP_SERVER_NAME
  • MCP_SERVER_VERSION
  • PORT
  • LLM_PROVIDER
  • LLM_FALLBACK_PROVIDER
  • LLM_AUTO_FALLBACK
  • GEMINI_API_KEY
  • GEMINI_MODEL
  • DEEPSEEK_API_KEY
  • DEEPSEEK_MODEL
  • DEEPSEEK_BASE_URL
  • OLLAMA_BASE_URL
  • OLLAMA_MODEL
  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_MODE
  • TELEGRAM_WEBHOOK_URL
  • APP_MODE

Security Notes

CRITICAL SQL Injection Vulnerability: The `ClienteService.buscarClientes` and `ArticuloService.buscarArticulos` methods directly interpolate user-provided `criterio` into SQL `LIKE` clauses without proper parameterization. This allows malicious input to alter or drop database queries. Hardcoded default SQL Server credentials ('LAPTOP-88194PO5\\SQL2019', '12345') exist in `src/config/database.ts` as fallbacks and are directly used in `scripts/setup-database.js`, which could expose database access if the .env file is not configured or secured. Standard practices for securing LLM API keys and Telegram bot tokens are also required.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens300
Stars0
Forks0
Last Update2025-11-25

Tags

Quotation SystemSQL ServerMCPAI AgentTelegram BotLLM Integration