Back to Home
versaprav1 icon

mcp-server-python

by versaprav1

Overview

Provides Model Context Protocol (MCP) interfaces for interacting with PostgreSQL databases and an integration platform API covering Azure, SAP BTP, and SAP ABAP endpoints.

Installation

Run Command
python -m api_server.api_server

Environment Variables

  • DATABASE_URL
  • DB_HOST
  • DB_PORT
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • API_BASE_URL
  • API_AUTH_METHOD
  • API_KEY
  • API_BEARER_TOKEN
  • API_BASIC_USERNAME
  • API_BASIC_PASSWORD
  • API_TIMEOUT

Security Notes

The 'postgres_server.py' includes an 'execute_query' tool that allows executing arbitrary SQL queries directly against the PostgreSQL database. While it supports parameterized queries for values, this function itself represents a significant SQL injection risk if not used with extremely careful input validation or strict access control, as it can execute DDL, DML, or administrative commands. The 'rest_api_server.py' uses f-strings for schema names in its SQL queries, but the 'schema' parameter is strictly validated against a whitelist ('dev', 'prod', 'test'), mitigating direct schema name injection. The use of Ngrok for public exposure is noted as optional but requires careful security measures (authentication, IP whitelisting) as advised in the README. No hardcoded secrets were found; sensitive data is loaded from .env files. Overall, the direct SQL execution capability in the PostgreSQL server is the primary critical security concern.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-12-09

Tags

MCPPostgreSQLAPI IntegrationAzureSAP