MCP Database Server
Provides tools to discover PostgreSQL schema, run read-only SELECT queries, and, for privileged users, execute INSERT/UPDATE/DELETE/DDL operations against a PostgreSQL database.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Database Server
A Model Context Protocol (MCP) server that provides secure database access through GitHub OAuth authentication. This server enables AI assistants to interact with PostgreSQL databases with role-based permissions.
Server URL
Production Server: https://my-mcp-server.azxdawre.workers.dev/mcp
Related MCP server: Postgres Scout MCP
Features
ποΈ PostgreSQL Integration: Direct database connection for all MCP tool calls
π GitHub OAuth Authentication: Secure user authentication via GitHub
π‘οΈ Role-Based Access Control: Username-based permissions for database operations
π Schema Discovery: Automatic table and column information retrieval
π‘οΈ SQL Injection Protection: Built-in validation and sanitization
βοΈ Cloudflare Workers: Global scale and performance
Available Tools
1. listTables (All Authenticated Users)
Discover database schema, tables, columns, and relationships.
2. queryDatabase (All Authenticated Users)
Execute read-only SQL queries (SELECT statements only).
3. executeDatabase (Privileged Users Only)
Execute write operations (INSERT, UPDATE, DELETE, DDL) - restricted to authorized GitHub usernames.
How to Use
With Claude Desktop
Add this configuration to your Claude Desktop settings (Settings -> Developer -> Edit Config):
{
"mcpServers": {
"database": {
"command": "npx",
"args": [
"mcp-remote",
"https://my-mcp-server.azxdawre.workers.dev/mcp"
]
}
}
}With MCP Inspector
Test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector@latestEnter the server URL: https://my-mcp-server.azxdawre.workers.dev/mcp
Authentication Flow
Connect to the MCP server
Authenticate via GitHub OAuth when prompted
Tools become available based on your GitHub username permissions
Start querying your database through AI assistants
Security Model
Read Access: All authenticated GitHub users can query data
Write Access: Only specific GitHub usernames can modify data
SQL Protection: All queries validated to prevent injection attacks
User Tracking: All operations logged with GitHub user context
Example Usage
Once connected, you can ask your AI assistant:
"What tables are available in the database?" β Uses
listTables"Show me all users created this month" β Uses
queryDatabase"Add a new product with name 'Widget' and price 29.99" β Uses
executeDatabase(if authorized)
Transport Protocols
/mcp- Modern streamable HTTP transport (recommended)/sse- Legacy Server-Sent Events transport (backward compatibility)
Powered by Cloudflare Workers with PostgreSQL integration and GitHub OAuth
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query PostgreSQL databases in plain English β LLM-generated, safety-validated SQL.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
One sign-in and a private Postgres database for every app you build with AI. Hosted, OAuth sign-in.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with PostgreSQL databases using natural language queries, providing secure read-only access to database schemas and SQL translation capabilities.6ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely explore, analyze, and maintain PostgreSQL databases with read-only mode by default, SQL injection prevention, query performance analysis, and optional write operations.67 npmApache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI assistants with safe, controlled access to PostgreSQL databases with read-only defaults, granular permissions, query safety features, and schema introspection capabilities.1-
- AlicenseNot gradedqualityDmaintenanceEnables you to chat with your PostgreSQL database via natural language, with GitHub OAuth authentication and role-based access control for secure read/write operations.MIT