VOOZH about

URL: https://glama.ai/mcp/servers/justpoypoy/mcp-database

⇱ mcp-database by justpoypoy | Glama


Database MCP Server

MCP server untuk koneksi database yang mendukung PostgreSQL, MySQL, SQL Server, dan Redis.

Installation

Opsi 1: Development Mode

pip install -e .

Opsi 2: Binary (Standalone) ✅ READY

# Build binary
python3.11 build.py

# Opsi instalasi:
# 1. Install ke system PATH
./install.sh

# 2. Atau menggunakan Make
make install

# 3. Atau install manual
python3.11 build.py --install

# 4. Atau gunakan langsung
./dist/database-mcp-server

Related MCP server: mcp-database-server

Usage

Jalankan MCP Server

Binary Mode (Recommended):

# Setelah install
database-mcp-server

# Atau langsung dari dist
./dist/database-mcp-server

Development Mode:

# Langsung dari source
python -m database_mcp_server.main

Konfigurasi di Kiro

Binary Mode (Recommended): Gunakan database-mcp-server langsung Development Mode: Lihat mcp.json.example

Available Tools

SQL Database Tools

  • list_tables(connection_name) - List semua tabel

  • describe_table(table_name, connection_name) - Lihat struktur tabel

  • execute_query(query, connection_name) - Eksekusi SQL query

Redis Tools

  • redis_get(key, connection_name) - Get value dari Redis

  • redis_set(key, value, expiration, connection_name) - Set value ke Redis

  • redis_keys(pattern, connection_name) - List keys dengan pattern

Database Support

  • PostgreSQL - psycopg2

  • MySQL - PyMySQL

  • SQL Server - pyodbc

  • Redis - redis-py

Configuration

Database connections dikonfigurasi melalui mcp.json dengan environment variables:

Single Connection (Simple)

{
 "mcpServers": {
 "database": {
 "command": "database-mcp-server",
 "args": [],
 "env": {
 "DB_TYPE": "postgresql",
 "DB_HOST": "localhost",
 "DB_PORT": "5432",
 "DB_NAME": "mydb",
 "DB_USER": "postgres",
 "DB_PASSWORD": "password"
 },
 "disabled": false
 }
 }
}

Multiple Connections (Advanced)

{
 "mcpServers": {
 "database": {
 "command": "database-mcp-server",
 "args": [],
 "env": {
 "DB_CONNECTIONS": "{\"default\":{\"type\":\"postgresql\",\"host\":\"localhost\",\"port\":5432,\"database\":\"mydb\",\"username\":\"postgres\",\"password\":\"password\"},\"mysql_db\":{\"type\":\"mysql\",\"host\":\"localhost\",\"port\":3306,\"database\":\"mydb\",\"username\":\"root\",\"password\":\"password\"},\"redis\":{\"type\":\"redis\",\"host\":\"localhost\",\"port\":6379,\"password\":\"\",\"db\":0}}"
 },
 "disabled": false
 }
 }
}

Binary Configuration

After installation (recommended):

{
 "mcpServers": {
 "database": {
 "command": "database-mcp-server",
 "args": [],
 "env": {
 "DB_CONNECTIONS": "{\"default\":{\"type\":\"postgresql\",\"host\":\"localhost\",\"port\":5432,\"database\":\"mydb\",\"username\":\"postgres\",\"password\":\"password\"}}"
 },
 "disabled": false
 }
 }
}

Direct binary usage:

{
 "mcpServers": {
 "database": {
 "command": "./dist/database-mcp-server",
 "args": [],
 "env": {
 "DB_CONNECTIONS": "{\"default\":{\"type\":\"postgresql\",\"host\":\"localhost\",\"port\":5432,\"database\":\"mydb\",\"username\":\"postgres\",\"password\":\"password\"}}"
 },
 "disabled": false
 }
 }
}

Environment Variables

Single Connection:

  • DB_TYPE - Database type (postgresql, mysql, sqlserver)

  • DB_HOST - Database host

  • DB_PORT - Database port

  • DB_NAME - Database name

  • DB_USER - Username

  • DB_PASSWORD - Password

  • REDIS_HOST, REDIS_PORT, etc. - Redis connection

Multiple Connections:

  • DB_CONNECTIONS - JSON string dengan semua database connections

Troubleshooting

Error: "uvx: executable file not found"

Gunakan binary yang sudah terinstall:

{
 "command": "database-mcp-server" // ✅ Correct
 // "command": "uvx" // ❌ Wrong - uvx not needed
}

Error: "database-mcp-server: command not found"

Install binary terlebih dahulu:

./install.sh
# atau
make install

Binary tidak bisa dijalankan

Pastikan binary executable:

chmod +x /usr/local/bin/database-mcp-server
A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/justpoypoy/mcp-database'

If you have feedback or need assistance with the MCP directory API, please join our Discord server