Back to Home
sathishkannan162 icon

simple-mcp-server-hono

by sathishkannan162

Overview

A Model Context Protocol (MCP) server that provides AI agents or other applications programmatic access to PostgreSQL database schema and a read-only SQL query execution tool.

Installation

Run Command
npm run dev

Environment Variables

  • DATABASE_URL

Security Notes

The `execute-read-queries` tool directly executes user-provided SQL queries (using `client.query(sql)`). While wrapped in a `READ ONLY` transaction to prevent writes, this poses a significant risk for read-only SQL injection, potentially leading to sensitive data leakage, denial-of-service via complex queries, or other resource abuses if the `sql` input is not strictly validated and sanitized by the consuming application before being passed to this endpoint. The current `zod.string()` validation for `sql` is insufficient for preventing SQL injection.

Similar Servers

Stats

Interest Score0
Security Score5
Cost ClassMedium
Avg Tokens2000
Stars0
Forks0
Last Update2025-11-19

Tags

MCPPostgreSQLHonoCloudflare WorkersDatabase APIAI Tool