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
python -m api_server.api_serverEnvironment 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
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.
postgres-mysql-mcp-server
A Model Context Protocol (MCP) server that enables AI assistants to query PostgreSQL and MySQL databases for schema introspection and data retrieval.
mcp-servers
Provides an MCP server for Qdrant vector database integration, enabling AI agents to perform semantic search, store documents, and manage collections with advanced multi-tenant filtering capabilities.
dx-mcp-server
Empowers AI applications to interact with and query a user-provided Postgres database via the Model Context Protocol (MCP).