home / mcp / postgres remote mcp server
Provides a PostgreSQL-backed MCP server accessible via Cloudflare and remote clients for data access and tooling.
Configuration
View docs{
"mcpServers": {
"blackboxprojects-postgres-remote-mcp": {
"url": "https://postgresql-mcp-cloudflare.<your-account>.workers.dev/sse",
"headers": {
"DATABASE_URL": "postgresql://<connection string>"
}
}
}
}You can run a PostgreSQL-backed MCP server that connects to your database remotely and exposes it to MCP clients. This setup lets you use familiar PostgreSQL access patterns through MCP-enabled tools and client apps, including remote execution via Cloudflare Workers.
Connect to your MCP server from any compatible MCP client using the remote URL or local proxy configuration provided in the setup snippets.
Prerequisites you need before starting:
1) Create the Cloudflare-based MCP server using the functional template
Use the following command to create a remote MCP server instance on your local machine, using the Cloudflare template for PostgreSQL MCP.
npm create cloudflare@latest -- my-mcp-server --template=https://github.com/Stratus-Cyber/postgres-mcp-cloudflare.gitAfter deployment, configure the environment variables in the Cloudflare console under Settings > Variables and Secrets. Add a Secret with name DATABASE_URL that contains your PostgreSQL connection string.
DATABASE_URL=postgresql://<connection string>You can test and use your MCP server from the Cloudflare AI Playground as a remote MCP client.
https://playground.ai.cloudflare.com/
```
Enter your deployed MCP server URL in the field: postgres-mcp-cloudflare.<your-account>.workers.dev/sseTo connect Claude Desktop to your MCP server, configure a stdio-based MCP client entry that points to the server’s remote endpoint.
{
"mcpServers": {
"calculator": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse" // or remote-mcp-server-authless.<your-account>.workers.dev/sse
]
}
}
}
```
Restart Claude and you should see the tools become available.On Mac OS, configure a global MCP server entry in Cursor to point to your MCP server as an HTTP endpoint.
{
"mcpServers": {
"postgresql-remote-mcp": {
"url": "https://postgresql-mcp-cloudflare.<your-account>.workers.dev/sse"
}
}
}Proxy client that enables local MCP clients to connect to a remote MCP server using an HTTP(s) endpoint.
Remote MCP client interface to interact with your MCP server in a sandboxed cloud environment.
Local MCP client integration allowing you to connect to remote MCP servers via a JSON configuration.
Mac-based MCP client integration to add a global MCP server pointing to your remote MCP endpoint.