|
1 | 1 | # SQLite MCP Server |
2 | 2 |
|
3 | | -*Last Updated September 17, 2025 2:35 AM EST - v2.0.0* |
| 3 | +*Last Updated September 17, 2025 4:40 AM EST - v2.1.0* |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | | -The SQLite MCP Server provides advanced database interaction and business intelligence capabilities featuring **SpatiaLite Geospatial Analytics**, Enhanced Virtual Tables with Smart Type Inference, Vector Index Optimization with ANN search, Intelligent MCP Resources and Prompts, Semantic/Vector Search, Virtual Table Management, Advanced PRAGMA Operations, Backup/Restore operations, Full-Text Search (FTS5), enhanced JSONB support for improved JSON storage efficiency, transaction safety for all database operations, foreign key constraint enforcement, enhanced error handling, and detailed diagnostics. |
| 7 | +The SQLite MCP Server provides advanced database interaction and business intelligence capabilities featuring **Statistical Analysis Library**, **SpatiaLite Geospatial Analytics**, Enhanced Virtual Tables with Smart Type Inference, Vector Index Optimization with ANN search, Intelligent MCP Resources and Prompts, Semantic/Vector Search, Virtual Table Management, Advanced PRAGMA Operations, Backup/Restore operations, Full-Text Search (FTS5), enhanced JSONB support for improved JSON storage efficiency, transaction safety for all database operations, foreign key constraint enforcement, enhanced error handling, and detailed diagnostics. |
8 | 8 |
|
9 | 9 | ## Key Features |
10 | 10 |
|
| 11 | +- **Statistical Analysis Library**: Comprehensive statistical functions for data analysis including descriptive statistics, percentile analysis, and time series analysis |
11 | 12 | - **JSONB Binary Storage**: Efficient binary JSON storage for improved performance and reduced storage requirements (~15% space savings) |
12 | 13 | - **Transaction Safety**: All write operations automatically wrapped in transactions with proper rollback on errors |
13 | 14 | - **Foreign Key Enforcement**: Automatic enforcement of foreign key constraints across all connections |
@@ -39,6 +40,75 @@ This project is based on the original SQLite MCP Server from the [Model Context |
39 | 40 | **Original Repository**: https://github.com/modelcontextprotocol/servers |
40 | 41 | **License**: MIT License |
41 | 42 |
|
| 43 | +## Statistical Analysis Library |
| 44 | + |
| 45 | +The SQLite MCP Server v2.1.0 introduces a comprehensive statistical analysis library with 8 specialized functions for data analysis and business intelligence. |
| 46 | + |
| 47 | +### Available Statistical Functions |
| 48 | + |
| 49 | +**Descriptive Statistics:** |
| 50 | +```javascript |
| 51 | +descriptive_statistics({ |
| 52 | + table_name: "sales_data", |
| 53 | + column_name: "revenue", |
| 54 | + where_clause: "year = 2024" // optional |
| 55 | +}) |
| 56 | +``` |
| 57 | +Returns comprehensive statistics including mean, median, standard deviation, variance, range, and coefficient of variation. |
| 58 | + |
| 59 | +**Percentile Analysis:** |
| 60 | +```javascript |
| 61 | +percentile_analysis({ |
| 62 | + table_name: "sales_data", |
| 63 | + column_name: "revenue", |
| 64 | + percentiles: [25, 50, 75, 90, 95, 99] // optional |
| 65 | +}) |
| 66 | +``` |
| 67 | +Calculates quartiles, percentiles, and interquartile range (IQR) for distribution analysis. |
| 68 | + |
| 69 | +**Time Series Analysis:** |
| 70 | +```javascript |
| 71 | +moving_averages({ |
| 72 | + table_name: "daily_sales", |
| 73 | + value_column: "revenue", |
| 74 | + time_column: "date", |
| 75 | + window_sizes: [7, 30, 90] // optional |
| 76 | +}) |
| 77 | +``` |
| 78 | +Generates moving averages with trend analysis for time series data. |
| 79 | + |
| 80 | +### Statistical Analysis Workflow |
| 81 | + |
| 82 | +1. **Explore Data Distribution**: Use `descriptive_statistics` to understand central tendency and variability |
| 83 | +2. **Identify Quartiles**: Apply `percentile_analysis` to find data distribution boundaries |
| 84 | +3. **Analyze Trends**: Employ `moving_averages` for time series pattern recognition |
| 85 | +4. **Generate Insights**: Combine statistical results with business context using `append_insight` |
| 86 | + |
| 87 | +### Example Analysis Session |
| 88 | + |
| 89 | +```javascript |
| 90 | +// 1. Get overview of sales performance |
| 91 | +descriptive_statistics({ |
| 92 | + table_name: "monthly_sales", |
| 93 | + column_name: "revenue" |
| 94 | +}) |
| 95 | + |
| 96 | +// 2. Understand distribution |
| 97 | +percentile_analysis({ |
| 98 | + table_name: "monthly_sales", |
| 99 | + column_name: "revenue", |
| 100 | + percentiles: [10, 25, 50, 75, 90] |
| 101 | +}) |
| 102 | + |
| 103 | +// 3. Analyze trends over time |
| 104 | +moving_averages({ |
| 105 | + table_name: "monthly_sales", |
| 106 | + value_column: "revenue", |
| 107 | + time_column: "month", |
| 108 | + window_sizes: [3, 6, 12] |
| 109 | +}) |
| 110 | +``` |
| 111 | + |
42 | 112 | ## Using Full-Text Search |
43 | 113 |
|
44 | 114 | The SQLite MCP Server provides comprehensive full-text search capabilities through its integrated FTS5 extension with dedicated management tools. |
|
0 commit comments