Skip to content

Commit c8cc100

Browse files
committed
feat: Rename database file to sqlite_mcp.db and clarify why database files are created
🔧 DATABASE FILENAME CHANGE: - Changed default database name from 'database.db' to 'sqlite_mcp.db' - More descriptive filename that clearly identifies its purpose - Updated both start_sqlite_mcp.py and server.py defaults 📚 ENHANCED DOCUMENTATION: - Added clear explanation of WHY database files are created - 'MCP operations require persistent storage between tool calls' - Clarified that tables, indexes, and data must persist between sessions - Updated all examples and best practices to use sqlite_mcp.db 🎯 KEY BENEFITS: - Clearer filename indicates this is for MCP server operations - Users understand the necessity of persistent file storage - Eliminates confusion about why a database file appears - Maintains all existing functionality with better naming The database file creation is essential for MCP functionality - this update makes that purpose crystal clear to users.
1 parent 36ca025 commit c8cc100

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

README-Docker.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
*Lightweight, containerized SQLite database server with AI-native features*
66

77
## 🚀 Zero-Configuration Database
8-
**No database setup required!** The server automatically creates and manages persistent SQLite databases:
9-
- **Auto-creates** database files as needed
8+
**No database setup required!** The server automatically creates and manages persistent SQLite databases **because MCP operations need persistent storage**:
9+
- **Auto-creates** `sqlite_mcp.db` files as needed (MCP tools require shared data storage)
10+
- **Why create a file?** Tables, indexes, and data must persist between MCP tool calls
1011
- **Persists all data** between container runs
1112
- **Connects to any existing** SQLite database
1213
- **Works immediately** - mount your data directory and go!

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,9 @@ The server automatically detects project structure and creates appropriate datab
638638
The SQLite MCP Server provides flexible database configuration with **automatic database creation** - no manual setup required!
639639

640640
### **🚀 Zero-Configuration Start**
641-
The server automatically creates and manages a persistent SQLite database:
642-
- **Auto-creates** `database.db` in your project root if none exists
641+
The server automatically creates and manages a persistent SQLite database **because MCP operations require persistent storage** between tool calls:
642+
- **Auto-creates** `sqlite_mcp.db` in your project root if none exists
643+
- **Why create a file?** MCP tool calls need shared, persistent data storage (tables, indexes, etc.)
643644
- **Persists all data** between sessions and MCP tool calls
644645
- **Works immediately** - no database setup or file creation needed
645646
- **Connects to existing databases** - works with any SQLite file you specify
@@ -654,13 +655,13 @@ python start_sqlite_mcp.py --db-path /path/to/your/database.db
654655
**Auto-detect project structure** (default):
655656
```bash
656657
python start_sqlite_mcp.py
657-
# Automatically finds project root and creates database.db
658+
# Automatically finds project root and creates sqlite_mcp.db
658659
```
659660

660661
**Create organized data directory**:
661662
```bash
662663
python start_sqlite_mcp.py --create-data-dir
663-
# Creates ./data/database.db in your project
664+
# Creates ./data/sqlite_mcp.db in your project
664665
```
665666

666667
### MCP Client Configuration
@@ -699,8 +700,8 @@ python start_sqlite_mcp.py --create-data-dir
699700

700701
### Database Location Best Practices
701702

702-
- **`./data/database.db`** - Recommended for projects (organized, version-control friendly)
703-
- **`./database.db`** - Simple option for small projects
703+
- **`./data/sqlite_mcp.db`** - Recommended for projects (organized, version-control friendly)
704+
- **`./sqlite_mcp.db`** - Simple option for small projects
704705
- **Existing databases** - Use `--db-path` to connect to any SQLite database
705706
- **`:memory:`** - Temporary database for testing (data not persisted)
706707

src/mcp_server_sqlite/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def _execute_query(self, query: str, params: Optional[Dict[str, Any]] = None) ->
405405
self.json_logger.log_error(e, {"query": query})
406406
raise
407407

408-
async def main(db_path: str = "database.db"):
408+
async def main(db_path: str = "sqlite_mcp.db"):
409409
logger.info(f"Starting Enhanced SQLite MCP Server with DB: {db_path}")
410410

411411
# Initialize database with enhanced features

start_sqlite_mcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def get_default_db_path():
9999
parser.add_argument(
100100
'--db-name',
101101
type=str,
102-
default='database.db',
103-
help='Database filename (used with project-root, default: database.db)'
102+
default='sqlite_mcp.db',
103+
help='Database filename (used with project-root, default: sqlite_mcp.db)'
104104
)
105105

106106
parser.add_argument(

0 commit comments

Comments
 (0)