esus-pec-mcp
Verified Safeby filiperochalopes
Overview
Serves as a Model Context Protocol (MCP) endpoint for LLMs to securely query anonymized clinical data from a PostgreSQL-based Prontuário Eletrônico do Cidadão (PEC) database.
Installation
export PYTHONPATH=$PYTHONPATH:$(pwd)/src && python src/pec_mcp/server.pyEnvironment Variables
- PEC_DB_HOST
- PEC_DB_PORT
- PEC_DB_NAME
- PEC_DB_USER
- PEC_DB_PASSWORD
- MCP_HTTP_HOST
- MCP_HTTP_PORT
Security Notes
The server demonstrates strong security practices: all database queries are read-only and use parameterized inputs to prevent SQL injection. It enforces strict limits on returned data rows (typically 50-200, up to 1000 for SOAP notes) and anonymizes sensitive patient identifiers (e.g., full names are converted to initials). Tools require specific filters to prevent broad data sweeps. Hardcoded database credentials are explicitly stated as defaults for development and users are instructed to override them with environment variables or a .env file for production. No 'eval' or other dynamic code execution patterns were found. The most sensitive data (SOAP notes) requires a specific patient ID and is subject to limits.
Similar Servers
MCP-PostgreSQL-Ops
The MCP server provides professional operations, monitoring, and management capabilities for PostgreSQL databases using natural language queries.
knowledgebase-mcp
A standardized Model Context Protocol (MCP) server that aggregates and provides AI systems with access to diverse biomedical knowledge bases and analysis tools.
sqlite-mcp
A Model Context Protocol (MCP) server that enables LLMs to interact with SQLite databases by providing tools and resources for querying and managing data.
enhanced-postgres-mcp-server
This server acts as a Model Context Protocol interface for PostgreSQL, enabling LLMs to query data, modify records, and manage database schema objects with read and write capabilities.