Cover image
Try Now
2024-11-29

使用文件系统集成管理工作区数据库的打字稿MCP服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://duotify.com
  • Professional code reviewer for a unique language, friendly and helpful.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • oatpp
  • Anthropic的模型上下文协议实现了燕麦++

    Reviews

    4 (1)
    Avatar
    user_6ByCbfUo
    2025-04-15

    As a dedicated user of the RAGFlow MCP Server developed by Wang Junjian, I am highly impressed with its performance and reliability. This server solution offers seamless integration and efficient management of workflows, making it an essential tool for any professional environment. The user-friendly interface and comprehensive support make it a standout choice for MCP applications. Highly recommended!