lolosqltools
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lolosqltools validate table name 'CustomerOrders'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
██╗ ██████╗ ██╗ ██████╗ ███████╗ ██████╗ ██╗ ████████╗ ██████╗ ██████╗ ██╗ ███████╗
██║ ██╔═══██╗██║ ██╔═══██╗██╔════╝██╔═══██╗██║ ╚══██╔══╝██╔═══██╗██╔═══██╗██║ ██╔════╝
██║ ██║ ██║██║ ██║ ██║███████╗██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ███████╗
██║ ██║ ██║██║ ██║ ██║╚════██║██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ╚════██║
███████╗╚██████╔╝███████╗╚██████╔╝███████║╚██████╔╝███████╗ ██║ ╚██████╔╝╚██████╔╝███████╗███████║
╚══════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝MCP server that validates, formats, and generates SQL objects following BSG Institute standardization rules — integrated with Claude Code.
Tools
Tool | Description |
| Validates names for tables, views, SPs, functions, triggers, fields, and constraints |
| Full structural validation with compliance score (0–100) |
| Detects anti-patterns: missing TRY/CATCH, SELECT *, implicit cursors, etc. |
| Verifies mandatory audit fields (Estado, UsuarioCreacion, FechaCreacion, etc.) |
| Generates a complete BSG-compliant SQL template for any object type |
| Applies BSG formatting: keyword casing, leading-comma columns, clause indentation |
| Generates PascalCase-based table aliases with conflict detection |
| Generates a formatted production deployment request email |
| Generates a formatted database access request email |
| Returns BSG standardization rules filtered by object type and/or topic |
Related MCP server: mcp-mssql
Requirements
Node.js 18 or higher
Claude Code (CLI)
Installation
Windows (PowerShell)
Clone or download this repository
Run the installer:
.\install.ps1Custom install path:
.\install.ps1 -InstallPath "D:\tools\lolosqltools"Restart Claude Code
Manual installation
npm install
npm run buildThen register the MCP in ~/.claude/.mcp.json:
{
"mcpServers": {
"lolosqltools": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}Restart Claude Code.
CLAUDE.md instructions
Add this block to your ~/.claude/CLAUDE.md to make Claude use LOLOSQLTOOLS automatically:
## LOLOSQLTOOLS MCP instructions for CLAUDE.md
The `lolosqltools` MCP is ALWAYS available. For any SQL object (table, view, SP, function, trigger), you MUST use it:
| Situation | Tool |
|---|---|
| Create a new SQL object | `generate_template` first, then deliver to user |
| Validate an object name | `validate_object_name` |
| Review an existing SQL block | `validate_sql_object` + `check_performance_patterns` |
| Format SQL | `format_sql` |
| Suggest a table alias | `suggest_alias` |
| Verify audit fields | `check_audit_fields` |
| Generate production deployment email | `generate_production_request` |
| Generate access request | `generate_access_request` |
| User asks about a BSG rule | `get_rules` |
**Critical rule**: NEVER generate SQL manually without consulting this MCP first.Development
npm run dev # Run with tsx (no build needed)
npm run build # Compile TypeScript → dist/
npm start # Run compiled outputLicense
MIT
Available Tools
10 toolscheck_audit_fieldsB
Validates that a CREATE TABLE statement includes all mandatory BSG audit fields (Estado, UsuarioCreacion, UsuarioModificacion, FechaCreacion, FechaModificacion, RowVersion) with correct types and a properly named PRIMARY KEY.
Inputs: sql (required).
check_performance_patternsA
Detects SQL anti-patterns and performance bad practices against BSG standards. Returns categorized violations sorted by severity (CRITICAL > HIGH > MEDIUM > LOW).
Inputs: sql (required), context.
format_sqlA
Applies BSG-standard formatting to SQL: uppercases keywords, reformats SELECT columns to leading-comma style, normalizes clause indentation (FROM/WHERE/JOIN), separates AND/OR conditions to their own lines, normalizes BEGIN...END indentation to 4 spaces, and removes inline -- comments from the code body.
Inputs: sql (required).
generate_access_requestB
Generates a formatted database access request email following BSG's mandatory format. Groups objects by type, validates permissions, and checks compliance with BSG access policy.
Inputs: objects (required), solicitante (required), project_area (required), justification (required), +1 more.
generate_production_requestB
Generates a formatted production deployment request email following BSG's mandatory format. Includes automatic warnings for schedule issues, schema problems, and BSG policy compliance.
Inputs: solicitante (required), validations (required), requirement_id (required), change_description (required), +6 more.
generate_templateB
Generates a complete, BSG-compliant SQL template for a given object type. Includes all mandatory fields, documentation headers, and constraint naming.
Inputs: name (required), author (required), schema (required), description (required), +7 more.
get_rulesC
Retrieves BSG SQL standardization rules, optionally filtered by object type and/or topic.
Inputs: topic, object_type.
suggest_aliasA
Generates a BSG-standard table alias from a SQL object name. The alias is built from the first letter of each PascalCase word after stripping the prefix. Detects conflicts with existing aliases and suggests alternatives.
Inputs: table_name (required), existing_aliases.
validate_object_nameB
Validates a SQL object name against BSG Institute naming standards. Returns a list of violations with rule references and suggestions.
Inputs: name (required), object_type (required), context.
validate_sql_objectB
Performs full structural validation of a SQL block (CREATE TABLE, VIEW, SP, FUNCTION, TRIGGER) against BSG standards. Returns a compliance score (0-100) and a list of violations with severity and suggestions.
Inputs: sql (required), object_type (required), schema.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: validation (check_audit_fields, validate_object_name, validate_sql_object), generation (generate_template, suggest_alias, generate_production_request, generate_access_request), retrieval (get_rules), formatting (format_sql), and performance checks (check_performance_patterns). No two tools appear to perform the same action, and their boundaries are well-defined.
All tool names consistently use the verb_noun pattern (e.g., check_audit_fields, get_rules, validate_object_name, generate_template). There is no mixing of conventions like camelCase or inconsistent verb styles.
The server provides 10 tools, which is appropriate for its domain of SQL standardization and validation. Each tool covers a distinct, necessary operation, and none appear redundant or superfluous.
The tool surface covers key operations for SQL standardization: validation, template generation, formatting, rule retrieval, alias suggestion, and request generation. However, there is no explicit tool for updating or deleting SQL objects, and no tool for retrieving all validation results at once, though agents can work around these gaps by combining existing tools.
Maintenance
Related MCP Connectors
SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.
Read and write NetSuite and run SuiteQL from Claude or ChatGPT. Write tools flagged for approval.
Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceA SQL Server CLI and MCP server for Claude Code that supports standard SQL Server authentication for database interaction and management. It enables users to perform schema exploration, execute queries, and manage data records with built-in SQL injection prevention.125MIT
- AlicenseAqualityDmaintenanceEnables natural language to SQL queries on MSSQL databases via Claude, with safe SELECT-only execution and schema discovery.3ISC
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code and other MCP clients to interact with Microsoft SQL Server databases through standardized tools for query execution, schema exploration, table management, and stored procedure execution.94 npm1MIT
- AlicenseNot gradedqualityCmaintenanceProvides tools to prepare and validate ABAP Open SQL statements for SAP's ADT data-preview console, automatically fixing dialect issues like parenthesis spacing and 255-character limits.79 npm1MIT