Back to Home
Wesype icon

aligneurs-mcp-server

by Wesype

Overview

This server provides a Model Context Protocol (MCP) interface to query a PostgreSQL database containing aligner activity data, primarily for AI agents.

Installation

Run Command
python server.py

Environment Variables

  • DATABASE_PUBLIC_URL
  • DATABASE_URL
  • PORT
  • DATABASE_HOST
  • DATABASE_PORT
  • DATABASE_NAME
  • DATABASE_USER_NAME
  • DATABASE_PASSWORD

Security Notes

CRITICAL SQL INJECTION VULNERABILITY: The `query_sql` tool directly executes SQL SELECT queries provided by the agent. Although it restricts queries to start with 'SELECT' or 'WITH', it does not use parameterized queries. This leaves it vulnerable to SQL injection if an agent (or a malicious user prompting the agent) provides specially crafted input (e.g., `SELECT * FROM activities WHERE patient_id = 123 OR 1=1;`), allowing unauthorized data access or manipulation. CRITICAL HARDCODED CREDENTIALS: Several auxiliary scripts (`import_csv_to_postgres.py`, `import_csv_optimized.py`, `create_schema.py`, `setup_railway.sh`) within the repository contain hardcoded PostgreSQL credentials (password `UqtALrZoRLKifgxpMKUhVcfBYGOIdRDK`). While the main server uses environment variables, these scripts pose a significant security risk by exposing sensitive database access information.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-12-06

Tags

MCPPostgreSQLData QueryAligner ActivitiesAI Agent