เซิร์ฟเวอร์ MCP DbhubMCP | PlugMCP
ข้ามไปยังเนื้อหา ไดเรกทอรี ผลิตภัณฑ์ แหล่งข้อมูล Pricing จากผู้เผยแพร่
เอกสารประกอบ DBHub MCP Server
A Model Context Protocol (MCP) server written in Go that provides safe, read-only database operations for MySQL and PostgreSQL.
Features
✅ MCP Protocol Compliance : Full implementation of the MCP specification
✅ Dual Transport Support : STDIO (for Claude Desktop) and HTTP (for web/network clients)
dbhubMCP is a MCP handle to more Database
เสียบเครื่องมือใดก็ได้เข้ากับเอเจนต์ใดก็ได้ ไดเรกทอรี MCP สำหรับคนที่ไม่เขียนเซิร์ฟเวอร์
ผลิตภัณฑ์
ไดเรกทอรี
นักพัฒนา
บริษัท
✅ Multi-Database Support : MySQL and PostgreSQL via unified interface
✅ Read-Only Enforcement : Multi-layer security to prevent write operations
✅ Connection Pooling : Efficient connection management
✅ Query Validation : SQL injection prevention and read-only query enforcement
✅ HTTP Security : Optional API key authentication and CORS support
✅ Extensible Architecture : Easy to add support for more databases and transports
MCP Tools The server exposes the following MCP tools:
list_tables - Lists all tables in the database
describe_table - Returns schema information for a specific table
execute_readonly_query - Executes SELECT queries (write operations blocked)
explain_query - Returns query execution plans without executing
Installation
Prerequisites
Go 1.21 or later
MySQL or PostgreSQL database
Read-only database user (recommended)
Build # Clone the repository
git clone <repository-url>
cd dbhubMCP
# Install dependencies
go mod download
# Build the server
go build -o dbhub-mcp-server ./cmd/server
Configuration Configure the server using environment variables:
# Copy example configuration
cp .env.example .env
# Edit configuration
nano .env
Environment Variables
Database Configuration
Transport Configuration (Optional)
Usage
Running the Server STDIO Mode (Default - for Claude Desktop):
# Load environment variables and run
export $(cat .env | xargs) && ./dbhub-mcp-server
HTTP Mode (for web/network clients):
export TRANSPORT_TYPE=http
export HTTP_ADDR=:8080
export HTTP_CORS_ORIGINS=*
export HTTP_API_KEY=your-secret-key
export $(cat .env | xargs) && ./dbhub-mcp-server
Using with Claude Desktop Add to your Claude Desktop MCP configuration (claude_desktop_config.json):
{
"mcpServers": {
"dbhub": {
"command": "/path/to/dbhub-mcp-server",
"env": {
"DB_TYPE": "mysql",
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_NAME": "mydb",
"DB_USER": "readonly_user",
"DB_PASSWORD": "password"
}
}
}
}
Security
Multi-Layer Read-Only Enforcement
SQL Validation Layer
Blocks INSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE
Validates queries start with SELECT, EXPLAIN, DESCRIBE, or SHOW
Detects SQL injection patterns
Database Permission Layer
Use a read-only database user
Grant only SELECT privileges
Query Limits
Configurable timeout per query
Maximum row limits to prevent memory issues
Creating Read-Only Users CREATE USER 'readonly_user'@'%' IDENTIFIED BY 'secure_password';
GRANT SELECT ON mydb.* TO 'readonly_user'@'%';
FLUSH PRIVILEGES;
CREATE USER readonly_user WITH PASSWORD 'secure_password';
GRANT CONNECT ON DATABASE mydb TO readonly_user;
GRANT USAGE ON SCHEMA public TO readonly_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly_user;
Architecture ┌─────────────────────────────────┐
│ MCP Clients │
│ ├─ Claude Desktop (STDIO) │
│ ├─ Web Browser (HTTP) │
│ └─ Custom Client (HTTP) │
└────────────┬────────────────────┘
│
┌───────┴───────┐
↓ ↓
┌─────────┐ ┌──────────┐
│ STDIO │ │ HTTP │
│ (stdin/ │ │ (POST │
│ stdout) │ │ /mcp) │
└────┬────┘ └────┬─────┘
│ │
└──────┬───────┘
↓
┌────────────────────────────┐
│ MessageTransport Interface │
└────────────┬───────────────┘
│
┌────────────▼────────────────────┐
│ MCP Server │
│ - Protocol handling │
│ - Tool routing │
└────────────┬────────────────────┘
│
┌────────────▼────────────────────┐
│ Security/Validation Layer │
└────────────┬────────────────────┘
│
┌────────────▼────────────────────┐
│ Database Adapter Interface │
└──────┬──────────────┬───────────┘
│ │
┌───▼────┐ ┌───▼─────┐
│ MySQL │ │ Postgres│
└────────┘ └─────────┘
Development
Project Structure dbhubMCP/
├── cmd/
│ └── server/
│ └── main.go # Entry point
├── internal/
│ ├── mcp/
│ │ ├── server.go # MCP server implementation
│ │ ├── protocol.go # MCP protocol types
│ │ ├── transport_interface.go # Transport abstraction
│ │ ├── transport_stdio.go # STDIO transport
│ │ ├── transport_http.go # HTTP transport
│ │ ├── transport_http_test.go # HTTP transport tests
│ │ └── handlers.go # Tool handlers
│ ├── database/
│ │ ├── adapter.go # Database interface
│ │ ├── mysql.go # MySQL implementation
│ │ └── postgres.go # PostgreSQL implementation
│ ├── security/
│ │ └── validator.go # SQL validation
│ └── config/
│ └── config.go # Configuration
├── go.mod
├── README.md
└── README_HTTP.md # HTTP transport documentation
Running Tests
Adding a New Database
Implement the database.Adapter interface in internal/database/
Add database-specific driver import
Register in main.go switch statement
Example MCP Interactions See examples/ directory for complete JSON-RPC request/response examples:
initialize.json - Server initialization
list_tools.json - Tool discovery
call_list_tables.json - List tables example
call_execute_query.json - Execute query example
License
Contributing Contributions welcome! Please ensure:
Code follows Go conventions
Security best practices maintained
Tests included for new features
คะแนนในไดเรกทอรี 4/100 อยู่ในรายการ 10 จาก 10
อยู่ใน MCP Registry ทางการ 0 จาก 18
ผู้ดูแลอ้างสิทธิ์แล้ว 0 จาก 8
ตอบกลับพร้อมรายการเครื่องมือ 0 จาก 12
ดาวบน GitHub 2 จาก 16
ยอดดาวน์โหลดรายสัปดาห์ 0 จาก 10
Graphify Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, e Private Gpt Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more. Works with any OpenAI-compatible inference server. Scientific Agent Skills Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biolog Open Code Review Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, Codebase Memory Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection. Orm The Prisma ORM: write your application in TypeScript with human-readable queries instead of SQL. Host your database on Prisma Postgres and your app on Prisma Compute. OpenViking Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills. Context Mode Free, local plugin that keeps tool output out of your coding agent's context window. Sandbox and SQLite FTS5 search, 99% fewer bytes in context. Works with Claude Code, Codex, Pi, OMP, OpenCode, Gemin Dbx 25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Dock Xerj AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory a Wasp The batteries-included full-stack framework for the AI era. Develop JS/TS web apps (React, Node.js, and Prisma) using declarative code that abstracts away complex full-stack features like auth, backgr WrenAI GenBI (Generative BI) for AI agents, an open-source, governed text-to-SQL through an open context layer that turns natural-language questions into trusted dashboards, charts, and SQL across 20+ data s เซิร์ฟเวอร์ MCP หมวด Databases เซิร์ฟเวอร์ MCP ที่ดีที่สุดในหมวด Databases
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
ติดตั้ง DbhubMCP อย่างไร? คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
DbhubMCP ต้องใช้ API key ไหม? ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
DbhubMCP ใช้ทรานสปอร์ตแบบใด? DbhubMCP ทำงานแบบโลคัลผ่าน stdio
DbhubMCP ถูกตรวจสอบล่าสุดเมื่อใด? ตรวจสอบล่าสุดเมื่อ 2026-10-28 dbhubMCP is a MCP handle to more Database
เครื่องมือมีคำอธิบาย 0 จาก 6