Skip to main content

functions

Browse all articles, tutorials, and guides about functions

5posts

Posts

DevOps
|10 min read

A Postgres-Backed MCP Server in ~20 Lines

Most of what an MCP server does is run database queries on behalf of an AI agent. So I put one right next to the database. Here is a Postgres-backed MCP server built on Neon Functions, deployed onto a database branch, with the code, a live client test, and the repo.

DevOps
|9 min read

Compute That Lives on Your Database Branch

Neon Functions run your code in the same region as your Postgres, on a per-branch URL. To see why that matters I deployed a small API and timed a query from inside the function versus from a machine across the Atlantic: 1.2 ms against 135 ms. Here is how it works, with the real numbers and the repo.

DevOps
|9 min read

Streaming an AI Agent Without a Function Timeout

Long agent loops and long token streams run into the same wall: a serverless function that hits its execution cap and cuts the connection. Neon Functions hold long-lived streaming connections by default. I deployed two endpoints to prove it: one streamed for 90 seconds, the other streamed an agent token by token starting at 466 ms.

Terraform
|7 min read

How to Convert a List to a String in Terraform

Learn different methods for converting lists to strings in Terraform using join(), jsonencode(), and format() functions for various use cases.

Terraform
|7 min read

How to Concatenate Lists in Terraform Using concat()

Learn how to combine multiple lists in Terraform using the concat() function, plus advanced patterns for merging and manipulating list data.