Skip to main content
Glama

MCP Alchemy

by runekaagaard
Mozilla Public License 2.0
336
  • Apple
test_report.md6.28 kB
# MCP Alchemy Test Report ## Overview This report documents the testing of MCP Alchemy, a tool that connects Claude Desktop directly to databases, allowing Claude to explore database structures, write and validate SQL queries, display relationships between tables, and analyze large datasets. **Test Date:** July 9, 2025 **MCP Alchemy Version:** 2025.6.19.201831 (with connection pooling improvements) **Database Engine:** MySQL 5.7.36 ## Test Environment Testing was performed on a MySQL database with the following characteristics: - Over 350 tables - Complex schema with extensive relationships - Real-world data structure with various data types ## Features Tested ### 1. Database Information Retrieval - **Get Database Info**: Successfully verified connection information - **List All Tables**: Retrieved complete list of all 367 database tables - **Filter Tables**: Successfully filtered tables by substring pattern ### 2. Schema Analysis - **Table Schema Definition**: Successfully retrieved detailed schema including: - Column names and types - Primary keys - Foreign key relationships - Nullable flags - Default values - **Complex Table Relationships**: Successfully mapped and displayed relationships between tables ### 3. Query Execution - **Basic Queries**: Executed simple SELECT queries to retrieve data - **Parameterized Queries**: Successfully used parameterized queries with the params argument - **Complex Joins**: Successfully performed queries with multiple joins across related tables - **Error Handling**: Properly handled and reported errors for invalid queries - **SQL Injection Protection**: Verified that SQL injection attempts are properly neutralized ### 4. Output Formatting - **Vertical Display Format**: Confirmed that query results are displayed in clear vertical format - **NULL Value Display**: Properly formats NULL values as "NULL" - **Row Counting**: Correctly displays the number of rows returned - **Output Truncation**: Properly truncates large result sets with appropriate notifications - **Full Result Access**: Successfully generated URLs for complete result sets via claude-local-files ## Test Results ### Functionality Tests | Feature | Status | Notes | |---------|--------|-------| | Database Connection | ✅ Pass | Successfully connected to MySQL 5.7.36 | | Table Listing | ✅ Pass | Successfully retrieved all 367 tables | | Table Filtering | ✅ Pass | Correctly filtered tables by substring | | Schema Definition | ✅ Pass | Retrieved detailed schema with relationships | | Basic Queries | ✅ Pass | Successfully executed simple SELECT queries | | Parameterized Queries | ✅ Pass | Parameterized queries worked correctly | | Complex Joins | ✅ Pass | Successfully joined multiple tables | | Error Handling | ✅ Pass | Properly handled and reported query errors | | SQL Injection Protection | ✅ Pass | Parameters sanitized correctly | | Result Formatting | ✅ Pass | Clean vertical format with row numbers | | Truncation | ✅ Pass | Large results properly truncated | | Full Result Access | ✅ Pass | Generated valid URLs for complete result access | ### Edge Cases Tested | Test Case | Result | Notes | |-----------|--------|-------| | Query with no results | ✅ Pass | Returns "No rows returned" | | Invalid table query | ✅ Pass | Returns appropriate error message | | SQL syntax error | ✅ Pass | Returns detailed error with location | | SQL injection attempt | ✅ Pass | Parameters properly sanitized | | Very large result set | ✅ Pass | Truncates and provides full result URL | | Unicode/special characters | ✅ Pass | Properly handles non-ASCII data | ## Performance Observations - Query execution is fast for simple to moderately complex queries - Schema retrieval performs well even on large tables - Result truncation works properly for large result sets - Full result access via URLs provides efficient access to large datasets ## Connection Pooling Tests (July 9, 2025) - UPDATED ### Initial Test (Before Fix Applied) | Test | Result | Notes | |------|--------|-------| | Initial Connection Count | ✅ Pass | Started with 3 threads connected | | Connection Reuse | ❌ Fail | Connections incrementing (3→7) suggesting new engines being created | | Connection ID Tracking | ✅ Pass | Different connection IDs showing connection creation | | Pool Behavior | ❌ Fail | Connections kept growing instead of stabilizing | ### Final Test (After Fix Applied) | Test | Result | Notes | |------|--------|-------| | Version Tracking | ✅ Pass | @mcp_alchemy_version = '2025.6.19.201831' correctly set | | Engine Reuse | ✅ Pass | Single engine instance reused across all requests | | Connection Pool Size | ✅ Pass | Stabilized at expected count (pool_size + overflow) | | Connection Rotation | ✅ Pass | Pool properly rotates connections (different IDs but stable count) | | All Core Features | ✅ Pass | all_table_names, filter_table_names, schema_definitions, execute_query | | Parameterized Queries | ✅ Pass | SQL injection protection working correctly | | Error Handling | ✅ Pass | Errors properly caught and reported | ### Observations The connection pooling fix is working correctly: - Single ENGINE instance is created and reused (confirmed via debugging) - Connection count stabilizes at pool configuration limits - Different connection IDs are normal - SQLAlchemy rotates through pool connections - All features continue to work properly with the new pooling implementation ### Key Improvements 1. **Resource Efficiency**: No more connection exhaustion after 5 queries 2. **Reliability**: Automatic reconnection on database failures 3. **Performance**: Connection reuse reduces overhead 4. **Monitoring**: Version tracking via @mcp_alchemy_version session variable ## Conclusion MCP Alchemy successfully passed all functional tests. It correctly connects to MySQL databases, retrieves schema information, executes queries with proper parameter handling, and formats results clearly. The SQL injection protection works as expected, properly sanitizing user input. The tool is well-suited for its intended purpose: allowing Claude to interact with databases and assist users with database exploration, query execution, and data analysis.

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/runekaagaard/mcp-alchemy'

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