postgrest-mcp
Verified Safeby semantius
Overview
A PostgREST MCP (Model Context Protocol) server that uses OAuth2 for authentication and integrates with PostgREST APIs.
Installation
deno task startEnvironment Variables
- AUTH_SERVER_URL
- API_BASE_URL
- API_KEY
- SUPABASE_ANON_KEY
- SUPABASE_URL
Security Notes
The server uses `getEnv` for all sensitive configurations (API keys, URLs), preventing hardcoded secrets. It employs Zod for input validation in its tools. The `bearerAuth` implementation performs a minimal token check (`!!token`), relying on the downstream PostgREST server for full JWT validation, which is acceptable for a proxy. The CORS policy allows all origins (`origin: (origin) => origin`), which can be a risk for sensitive endpoints if not properly protected by authentication. Host header construction for metadata is standard but could be a vector if not secured by the deployment platform. Overall, the security posture is reasonable for its intended purpose as an OAuth2-protected MCP gateway.
Similar Servers
example-remote-server
A reference server demonstrating all Model Context Protocol (MCP) features and OAuth 2.0 authentication patterns.
sagemcp
A scalable platform for hosting Multi-tenant Model Context Protocol (MCP) servers with multi-tenant support, OAuth integration, and connector plugins for various services.
oauth-mcp-proxy
OAuth 2.1 authentication library for Go MCP servers, supporting both mark3labs and official SDKs for token validation and caching.
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.