workspace-db-manager
A TypeScript MCP (Model Context Protocol) server for managing workspace databases with filesystem integration.
Added on 3/28/2025
WIP: Caution!!! AI code and probably wrong in many ways though it "runs".
Workspace DB Manager
A TypeScript MCP (Model Context Protocol) server for managing workspace databases with filesystem integration.
Features
- SQLite database management with automatic discovery
 - Real-time filesystem monitoring for database changes
 - Database connection pooling and management
 - Automatic database tracking and status updates
 - Cross-database operations support
 - TypeScript/ES Module architecture
 
Getting Started
- Install dependencies:
 
npm install
- Build the TypeScript code:
 
npm run build
- Initialize the core database:
 
npm run init-db
- Start the server:
 
npm start
Development
# Run in development mode with auto-reload
npm run dev
# Run tests
npm test
# Build TypeScript
npm run build
Continuous Integration
This project uses GitHub Actions for continuous integration:
- Runs on Node.js 20.x, 21.x, and 22.x
 - Automatically runs tests on every push and pull request
 - Checks TypeScript compilation
 - Generates and uploads test coverage reports
 - Fails if code quality standards are not met
 
Configuration
The server can be configured through a WorkspaceConfig object:
const manager = new WorkspaceDBManager({
    watchPaths: ['/path/to/workspace'],
    pollInterval: 1000, // Optional: file system polling interval
    database: {
        verbose: true // Optional: enable verbose database logging
    }
});
Database Operations
Automatic Database Discovery
The server automatically detects and tracks:
- New database files
 - Database modifications
 - Database removals
 
Database Management
// List all managed databases
const databases = await manager.listManagedDatabases();
// Get system configuration
const config = await manager.getConfig('some_key');
Events
The server emits events for various operations:
database-added: When a new database is discovereddatabase-changed: When a database is modifieddatabase-removed: When a database is removederror: When an error occursinitialized: When the server is fully initialized
Testing
# Run all tests
npm test
# Run tests with coverage
npm test -- --coverage
Contributing
- Fork the repository
 - Create your feature branch
 - Commit your changes
 - Push to the branch
 - Create a Pull Request
 
License
ISC
Similar Resources
Developer Tools