Skip to content

rhodelta66/tsql-app-mcp-server

Repository files navigation

TSQL.APP MCP Server 🚀

A comprehensive Model Context Protocol (MCP) server providing expert knowledge and development assistance for the TSQL.APP framework - the revolutionary SQL-first web application development platform.

📋 Overview

This MCP server transforms Claude Desktop into a complete TSQL.APP development assistant, providing:

  • Comprehensive Framework Knowledge from 63 detailed documentation files
  • Interactive Development Tools for code generation and validation
  • Expert Guidance on SQL-first application development
  • Zero-Tolerance Code Compliance checking against mandated practices

🎯 What is TSQL.APP?

TSQL.APP is an innovative web application framework that enables developers to build complete business applications using primarily T-SQL and SQL Server. It represents a paradigm shift from traditional multi-tier architectures by allowing database-centric development with modern UI capabilities.

Key Features:

  • SQL-First Development - Build entire applications using T-SQL
  • Two-Database Architecture - Non-invasive implementation preserving existing systems
  • Metadata-Driven UI - Applications "revealed" through database configuration
  • Enterprise-Ready - Designed for ERP systems with 50-300 concurrent users
  • 400+ Built-in Procedures - Complete UI component library

🔧 Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Test the Server

python test_mcp_server.py

3. Integrate with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "tsql-app": {
      "command": "python",
      "args": [
        "/path/to/tsql_app_mcp_server.py",
        "/path/to/tsql_app_knowledge.json"
      ],
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

📁 Project Structure

├── tsql_app_mcp_server.py      # Main MCP server implementation
├── tsql_app_knowledge.json     # Comprehensive knowledge base
├── test_mcp_server.py          # Test suite with UTF-8 support
├── requirements.txt            # Python dependencies
├── mcp_server_config.json      # MCP configuration template
├── CLAUDE_DESKTOP_INTEGRATION.md  # Detailed integration guide
├── README_MCP_SERVER.md        # Comprehensive documentation
├── CLAUDE.md                   # Claude Code guidance
└── source_md/                  # Original 63 documentation files
    ├── framework_overview.md
    ├── mandated_practices.md
    ├── stored_procedures_reference.md
    └── ... (60 more files)

🛠️ MCP Server Capabilities

Interactive Tools (6)

  1. search_procedures - Find procedures by name or functionality
  2. get_procedure_details - Detailed procedure documentation
  3. validate_code_compliance - Check code against TSQL.APP standards
  4. get_development_pattern - Guidance on development patterns
  5. generate_code_template - Generate T-SQL templates
  6. explain_architecture - Explain TSQL.APP concepts

Knowledge Resources (6)

  1. Framework overview and architecture
  2. Complete stored procedures reference (400+ procedures)
  3. Functions reference with examples
  4. Mandated coding practices (zero-tolerance rules)
  5. Development patterns and workflows
  6. Two-database architecture guide

💻 Usage Examples

Search for Procedures

Search for TSQL.APP procedures related to "modal input"

Validate Code

Validate this TSQL.APP code:
EXEC sp_api_modal_text @text = CONCAT('Hello ', @Name);

Generate Templates

Generate a basic modal template for a customer form with Name and Email fields

Get Architecture Guidance

Explain the TSQL.APP two-database architecture pattern

📊 Knowledge Base Statistics

  • Framework Version: 1.0
  • Stored Procedures: 400+ documented across 4 categories
  • Functions: 12+ with comprehensive examples
  • Mandated Practices: 5 zero-tolerance rule categories
  • Development Patterns: 4 comprehensive workflow patterns
  • Source Files: 63 detailed documentation files analyzed

🏗️ TSQL.APP Architecture

Two-Database Pattern

  1. Business Database (x) - Your existing data, remains untouched
  2. Project Database (x_proj) - TSQL.APP framework and UI metadata

Key Benefits

  • Non-invasive - Existing databases remain unchanged
  • SQL Expertise Leverage - Use T-SQL skills for full-stack development
  • Rapid Development - Metadata-driven UI generation
  • Enterprise-Grade - Security, audit trails, role-based access

🎯 Target Use Cases

  • Enterprise Resource Planning (ERP) applications
  • Legacy database modernization projects
  • Complex business logic implementation in SQL
  • Database-centric applications with rich UI requirements
  • Rapid application development using existing SQL skills

📝 Mandated Practices (Zero-Tolerance)

The MCP server enforces TSQL.APP's strict coding standards:

  1. Cardinal Rule: Never pass expressions to stored procedure parameters
  2. Variable Declaration: All variables declared at script start
  3. Modal Data Types: NVARCHAR(MAX) for modal output variables
  4. Object Access: Use sys.objects for existence checks
  5. Unicode Compliance: N prefix for all string literals

🧪 Testing

Run the comprehensive test suite:

python test_mcp_server.py

Test Coverage:

  • ✅ Knowledge base loading and structure
  • ✅ Procedure search functionality
  • ✅ Code validation with violation detection
  • ✅ Template generation with customization
  • ✅ Architecture explanations
  • ✅ UTF-8 encoding and emoji support

🤝 Contributing

This project contains the complete TSQL.APP framework knowledge extracted from official documentation. Contributions are welcome for:

  • Enhanced code validation rules
  • Additional template patterns
  • Improved error handling
  • Extended test coverage
  • Documentation improvements

📄 License

This project is provided as-is for TSQL.APP framework development assistance.

🎉 Getting Started

  1. Clone this repository
  2. Install dependencies: pip install -r requirements.txt
  3. Test the server: python test_mcp_server.py
  4. Follow integration guide: See CLAUDE_DESKTOP_INTEGRATION.md
  5. Start developing with expert TSQL.APP assistance!

Transform Claude Desktop into your expert TSQL.APP development companion! 🚀✨

For detailed integration instructions, see CLAUDE_DESKTOP_INTEGRATION.md.

About

TSQL.APP MCP Server - Expert SQL-first development assistant for Claude Desktop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages