Settings

Theme

Show HN: MCP server that teaches LLMs to write production grade Postgres SQL

github.com

5 points by cevian 2 months ago · 0 comments · 2 min read

Reader

For the past 10 years at Timescale (now Tiger Data), I've been been watching developers make mistakes in database design: forgetting to index foreign keys, creating case-sensitive email lookups, using arbitrary VARCHAR limits. And I've seen the pain and frustration when there is major downtime and botched migrations fixing things. AI coding could have made this better but is only making things worse. It's infuriating.

So, I (along with my awesome team at Tiger Data) built an MCP server that auto-injects Postgres best practices into AI context to help. The biggest innovation: our get_prompt_template tool lets the LLM auto-discover the right guidance without slash commands. Ask "design a schema for IoT devices" and it automatically pulls our Postgres schema design and hypertable guides.

What's different from other MCP servers: Instead of thin API wrappers, I am teaching AI things like "Always index foreign key columns - Postgres won't do it for you" and "use TEXT not VARCHAR(255)". It includes versioned Postgres docs (15-17) with hybrid search, plus TimescaleDB-specific patterns.

Try it with our free service:

```

curl -fsSL https://cli.tigerdata.com | sh

tiger auth login

tiger mcp install

```

Works with Claude Desktop, Cursor, Windsurf, VS Code. Open source.

By the way: this approach might show how to implement Anthropic's new Agent Skills (previous discussion: https://news.ycombinator.com/item?id=45607117) entirely through MCP.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection