Skip to main content
Glama
README.md
# HybridHub

Universal Hybrid Data MCP Server - Connect to both structured (databases) and unstructured (object storage) data sources.

## Features

- **Structured Data Sources (Databases)**
  - PostgreSQL
  - MySQL
  - MariaDB
  - SQL Server
  - SQLite

- **Unstructured Data Sources (Object Storage)**
  - Huawei Cloud OBS
  - Alibaba Cloud OSS
  - AWS S3 / S3-Compatible (MinIO, etc.)
  - Tencent Cloud COS

## Quick Start

### 1. Install Dependencies

```bash
npm install
# or
yarn install
# or
pnpm install
```

### 2. Configure Data Sources

Copy the sample configuration file:

```bash
cp env.sample .env
```

Edit `.env` with your data source credentials.

For multi-source configuration, copy and edit the TOML example:

```bash
cp hybridhub.toml.example hybridhub.toml
```

### 3. Run the Server

```bash
# Development mode
npm run dev

# Production mode
npm run build
npm start
```

## Configuration

### Environment Variables

| Variable | Description | Example |
|----------|-------------|---------|
| `HYBRIDHUB_TRANSPORT` | Transport mode | `stdio` or `http` |
| `HYBRIDHUB_PORT` | HTTP port | `8080` |
| `HYBRIDHUB_API_KEY` | API key for authentication | `your-api-key` |

#### Database Configuration

| Variable | Description | Example |
|----------|-------------|---------|
| `DSN` | Database connection string | `postgres://user:pass@localhost:5432/db` |
| `DB_TYPE` | Database type | `postgres`, `mysql`, `sqlite`, etc. |
| `DB_HOST` | Database host | `localhost` |
| `DB_PORT` | Database port | `5432` |
| `DB_NAME` | Database name | `mydb` |
| `DB_USER` | Database username | `user` |
| `DB_PASSWORD` | Database password | `password` |
| `DB_READONLY` | Enable read-only mode | `true` or `false` |
| `DB_MAX_ROWS` | Maximum rows per query | `1000` |

#### Storage Configuration

| Variable | Description | Example |
|----------|-------------|---------|
| `STORAGE_TYPE` | Storage provider type | `s3`, `oss`, `obs`, etc. |
| `STORAGE_ENDPOINT` | Storage endpoint URL | `https://s3.amazonaws.com` |
| `STORAGE_ACCESS_KEY` | Access key ID | `AKIAIOSFODNN7EXAMPLE` |
| `STORAGE_SECRET_KEY` | Secret access key | `wJalrXUtnFEMI...` |
| `STORAGE_REGION` | Storage region | `us-east-1` |
| `STORAGE_PATH_STYLE` | Use path-style URLs (for MinIO) | `true` or `false` |

### TOML Configuration

For multi-source configuration, use `hybridhub.toml`:

```toml
# Database source
[[databases]]
id = "prod_pg"
dsn = "postgres://user:password@localhost:5432/production"
readonly = false
max_rows = 1000

# Storage source
[[storages]]
id = "aws_s3"
type = "s3"
endpoint = "https://s3.amazonaws.com"
access_key = "AKIAIOSFODNN7EXAMPLE"
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
region = "us-east-1"
```

See `hybridhub.toml.example` for complete configuration options.

## MCP Tools

### Database Tools

- `execute_sql` - Execute SQL queries on database sources

### Storage Tools

- `list_buckets` - List all storage buckets
- `list_objects` - List objects in a bucket
- `get_object` - Get object content
- `get_object_metadata` - Get object metadata
- `search_objects` - Search objects with filters

## Development

```bash
# Run in development mode
npm run dev

# Run with HTTP transport
npm run dev:http

# Build for production
npm run build

# Run tests
npm test
```

## License

MIT

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation4/5

Most tools have distinct purposes, with clear separation between database operations (execute_sql, search_db_objects) and object storage operations (get_object, list_objects, etc.). However, search_objects and list_objects could potentially cause confusion as both involve listing objects in buckets, though search_objects offers more advanced filtering capabilities.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern (e.g., execute_sql, get_object, list_buckets). There are no deviations in style or convention, making the set predictable and easy to understand.

Tool Count4/5

With 7 tools, the count is reasonable for a server handling two domains (database and object storage). It's slightly on the lower side for covering both areas comprehensively, but each tool appears purposeful and well-scoped.

Completeness3/5

For object storage, the tools cover retrieval, listing, and search well, but lack create, update, or delete operations, which are notable gaps. For database operations, execute_sql and search_db_objects provide query and search capabilities, but there's no direct CRUD for tables or schemas, leaving the surface incomplete for full database management.