Postgres Connector
Executable Neon Data API / PostgREST HTTP connector for schema discovery, selects, and approved RPC. Raw Postgres TCP is not hosted by Astrail.
Credential setup
bearerEnable the Neon Data API and attach a JWT issued by its configured auth provider. Provide the endpoint and region labels from the API URL: https://{endpoint}.apirest.{region}.aws.neon.tech/{database}/rest/v1.
Setup docs: https://neon.com/docs/data-api/get-started
After adding this connector, attach the credential on the server page, then run astrail tools list.
Hosted MCP endpoint
/api/mcp/preset-postgresPrivate servers require an Astrail API key in the Authorization header.
MCP client snippets
ConnectClaude Desktop config
{
"mcpServers": {
"postgres-connector": {
"url": "/api/mcp/preset-postgres"
}
}
}cURL initialize
curl -sS -X POST "/api/mcp/preset-postgres" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'cURL tools/list
curl -sS -X POST "/api/mcp/preset-postgres" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'cURL tools/call
curl -sS -X POST "/api/mcp/preset-postgres" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"postgres_openapi","arguments":{"endpoint":"example","region":"example","database":"example"}}}'Runtime behavior
healthynot_checkedsafe_rest_executionnot recordednot recordednot recordednonestructured fallbackstandardauth_required / oauth_requiredmapping_requiredAstrail does not evaluate generated TypeScript inside Next.js. Hosted calls are routed through stored tool metadata and endpoint maps.
Tools
3postgres_openapiFetch the Neon Data API / PostgREST OpenAPI document for schema discovery.
postgres_select_rowsSelect rows from a Neon Data API / PostgREST table.
postgres_rpcCall a Neon Data API / PostgREST RPC function after approval.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "Postgres Connector", version: "1.0.0" });
// Curated Astrail connector for: postgres_openapi, postgres_select_rows, postgres_rpc.
// The hosted endpoint executes its verified deterministic endpoint map. Attach a least-privilege provider credential before calling private tools.
server.tool("connector_status", "Confirm this curated connector template is installed.", z.object({}), async () => ({
content: [{ type: "text", text: "Connector installed. Attach provider credentials to enable hosted API calls." }],
}));
const transport = new StdioServerTransport();
await server.connect(transport);