PostgreSQL MCP Server
Enables natural language interaction with PostgreSQL databases through Amazon Q for querying data, listing tables, and describing schemas. It provides secure, read-only access with automatic row limits to ensure efficient database exploration.
README
PostgreSQL MCP Server
MCP-compliant server for PostgreSQL database integration with Amazon Q.
Installation
pip install -r requirements.txt
Setup
- Test connection:
python server.py --host host.example.com --port 61025 --database example --username example_user --password example_pwd --test
- Configure Amazon Q MCP:
Update C:\Users\%USERNAME%\.aws\amazonq\mcp.json:
{
"mcpServers": {
"local-postgres-mcp": {
"command": "C:\\Users\\sk\\AppData\\Local\\Programs\\Python\\Python313\\python.exe",
"args": [
"C:\\Workspace\\GitLab\\capacity-planning2\\postgresql-mcp\\server.py",
"--host", "host.example.com",
"--port", "61025",
"--database", "example",
"--username", "example_user",
"--password", "example_pwd"
],
"env": {"PYTHONUNBUFFERED": "1"},
"timeout": 60000
}
}
}
- Restart IntelliJ IDEA to load the new MCP server
Using with Amazon Q Chat
Once configured, you can use these commands in Amazon Q chat:
Query database:
Query the database: SELECT * FROM "capacity_planning2".ports LIMIT 5
List tables:
List all tables in the capacity_planning2 schema
Describe table structure:
Describe the structure of the ports table in capacity_planning2 schema
Browse schemas:
Show me all available database schemas
Available Tools
- query_database: Execute SELECT queries with automatic LIMIT
- describe_table: Get detailed table column information
- list_tables: List tables in specific schema or all schemas
Security
- Read-only access (SELECT queries only)
- Automatic query limits (100 rows max)
- Connection timeout protection
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.