Generic Database MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Generic Database MCP ServerShow me the schema of the 'orders' table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Generic Database MCP Server
A Model Context Protocol (MCP) server that connects to multiple database types (MSSQL, PostgreSQL, MySQL). It provides read-only access to list tables, inspect schemas, and run queries.
Features
Multi-Database Support: Connects to MSSQL, PostgreSQL, or MySQL via configuration.
Tools Namespacing: Support for
TOOL_PREFIXto run multiple server instances (e.g.,mssql_,pg_) without collision.Safety First: Enforces Read-Only permissions. Blocks
UPDATE,DELETE,DROP, etc.Efficient: Uses native connection pooling for each driver.
Related MCP server: Read-only Database MCP
Tools
list_tables: List all base tables in the database.describe_table: Get schema information (columns, types) for a specific table.sql_query: Execute a read-only SQL query.
Configuration
Configuration is handled via environment variables.
Common Variables
Variable | Description |
|
|
| Optional prefix for tool names (e.g., |
| Database host (or |
| Database port |
| Username |
| Password |
| Database name |
MSSQL Specific
DB_ENCRYPT: Set totrue/false(defaulttrue)DB_TRUST_SERVER_CERTIFICATE: Set totrue/false(defaultfalse)
Setup & Build
Install Dependencies
npm installBuild
npm run buildRun Locally (HTTP Mode)
# Create a .env file first TRANSPORT=http PORT=3000 node build/index.jsRun Locally (stdio MCP Mode)
TRANSPORT=stdio node build/index.js
HTTP Deployment
This server now supports MCP over Streamable HTTP for remote deployment platforms like Dockploy.
HTTP Environment Variables
Variable | Description |
|
|
| Bind address for HTTP mode. Default: |
| Listening port for HTTP mode. Default: |
HTTP Endpoints
POST /mcp: MCP Streamable HTTP endpointGET /health: Health check endpoint
Docker
docker build -t generic-database-mcp-server .
docker run --rm -p 3000:3000 \
-e TRANSPORT=http \
-e PORT=3000 \
-e DB_TYPE=mssql \
-e DB_HOST=host.docker.internal \
-e DB_PORT=1433 \
-e DB_USER=sa \
-e DB_PASSWORD=yourPassword \
-e DB_DATABASE=yourDatabase \
generic-database-mcp-serverFor Dockploy, route traffic to container port 3000 and configure the service health check against /health.
MCP Client Configuration
You can run multiple instances of this server for different databases.
Example: mcp_config.json
{
"mcpServers": {
"mssql-primary": {
"command": "node",
"args": ["/absolute/path/to/build/index.js"],
"env": {
"TRANSPORT": "stdio",
"TOOL_PREFIX": "mssql_",
"DB_TYPE": "mssql",
"DB_HOST": "154.113.161.35",
"DB_PORT": "2945",
"DB_USER": "metro_dba",
"DB_PASSWORD": "yourPassword",
"DB_DATABASE": "HMO_CBA",
"DB_TRUST_SERVER_CERTIFICATE": "true"
}
},
"postgres-local": {
"command": "node",
"args": ["/absolute/path/to/build/index.js"],
"env": {
"TRANSPORT": "stdio",
"TOOL_PREFIX": "pg_",
"DB_TYPE": "postgres",
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_USER": "postgres",
"DB_PASSWORD": "yourPassword",
"DB_DATABASE": "analytics"
}
}
}
}This configuration exposes tools like:
mssql_list_tablesmssql_sql_querypg_list_tablespg_sql_query
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables read-only interaction with SQL databases through MCP, providing database metadata exploration, sample data retrieval, and secure query execution. Supports MySQL with multiple transport options and built-in security features including SQL injection protection and data sanitization.105MIT
- Alicense-qualityDmaintenanceEnables read-only access to PostgreSQL and MySQL/MariaDB databases through MCP tools for listing tables, previewing data, and running SELECT queries with a built-in UI for managing database configurations.70MIT
- Alicense-qualityBmaintenanceEnables querying multiple SQL Server, Azure SQL, or Synapse databases through a single MCP interface, with support for read-only targets and various authentication methods.MIT
- Alicense-qualityCmaintenanceEnables inspecting database schemas and executing read-only SQL queries on a PostgreSQL database via MCP tools.11MIT
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only MCP server for wafergraph.com's semiconductor & AI supply-chain data: 30 tools, no auth.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/bleckcorp/Generic-Database-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server