martinko-na/postgres-temporal-mcp
3.2
If you are the rightful owner of postgres-temporal-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
MCP Server for PostgreSQL Temporal Tables Extension provides tools to manage and interact with temporal data in PostgreSQL databases.
Postgres Temporal MCP Server
MCP server for managing PostgreSQL temporal tables with full history tracking.
Installation
pip install -e .
Configuration
Copy .env.example to .env and set your database URL:
DATABASE_URL=postgresql://user:password@host:5432/database
Connecting to External Docker Container
If your PostgreSQL is in another Docker container:
# Using container name (if on same Docker network)
DATABASE_URL=postgresql://postgres:secret@postgres-container:5432/mydb
# Using host networking (from host machine)
DATABASE_URL=postgresql://postgres:secret@localhost:5432/mydb
# From another container (using host.docker.internal on Docker Desktop)
DATABASE_URL=postgresql://postgres:secret@host.docker.internal:5432/mydb
Running
# As MCP server
temporal-mcp
# For development
python -m src
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/ tests/
# Lint
ruff src/ tests/
# Type check
mypy src/
Docker Setup
If you need to set up PostgreSQL with temporal_tables:
cd docker
docker-compose up -d
Note: If you already have PostgreSQL running in another container, you don't need this. Just set DATABASE_URL in your .env file to point to your existing database.