MCP ExplorerExplorer

Workspace Db Manager

@angrysky56on 3 days ago
0 MIT
FreeCommunity
AI Systems
TypeScript MCP server for managing workspace databases with filesystem integration

Overview

What is Workspace Db Manager

Workspace DB Manager is a TypeScript Model Context Protocol server designed for the management of workspace databases, integrating filesystem functionalities to monitor database changes in real-time and streamline operations across multiple databases.

Use cases

This tool is useful for developers and teams needing to manage SQLite databases within a workspace context, allowing for automatic discovery of database files, real-time updates on database changes, and efficient connection management.

How to use

To use the Workspace DB Manager, install dependencies using npm, build the TypeScript code, initialize the core database, and then start the server. The server can be configured via a WorkspaceConfig object to customize its behavior.

Key features

Key features include automatic detection and tracking of database changes, efficient database connection pooling, event emission for various database operations, and support for cross-database actions, all within a TypeScript/ES Module framework.

Where to use

It can be used in development environments where database changes are frequent and need to be monitored closely, particularly suitable for applications that leverage multiple databases or require real-time feedback on database status.

Content

WIP: Caution!!! AI code and probably wrong in many ways though it “runs”.

Workspace DB Manager

CI

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

  1. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build
  1. Initialize the core database:
npm run init-db
  1. 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 discovered
  • database-changed: When a database is modified
  • database-removed: When a database is removed
  • error: When an error occurs
  • initialized: When the server is fully initialized

Testing

# Run all tests
npm test

# Run tests with coverage
npm test -- --coverage

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

ISC

Tools

No tools

Comments