Introducing @neon/sdk, our new TypeScript client for the Neon API
@neon/sdk is a fetch-based, zero-dependency, ESM-only TypeScript client for the Neon API, replacing the axios-based @neondatabase/api-client. It has two layers: a raw surface generated from Neon's OpenAPI spec with Hey API, exposing every endpoint as a tree-shakeable function, and an ergonomic client that adds retries, readiness polling of background operations, pagination, errors as values and multi-step workflows. Examples include createAndConnect for projects and branches, snapshot restore with a preview callback that commits or rolls back, and cross-organization project transfer. Neon recommends it over the MCP server and CLI for programmatic integration such as CI/CD and platform provisioning, and the old client is not being deprecated.
Related posts
- Introducing neon.ts: infrastructure as code for your Neon projects
Neon mediumAdept
neon.ts is a TypeScript infrastructure-as-code file for Neon projects that declares services (Postgres, Neon Auth, Data API, with functions, buckets and an AI gateway coming under a preview block) and provisions them with `neon config plan` and `neon config apply`. A companion `@neondatabase/env` package provides `parseEnv`, which validates `process.env` against the declared services and returns a typed env object, with optional per-app subsets. A programmable `branch` function sets TTL, autoscaling limits and scale-to-zero for new branches created via `neon checkout`. Type-level encoding of service dependencies turns cryptic `never` errors into messages that explain the fix, such as requiring Neon Auth for the Data API.
- Announcing @neon/effect
Neon mediumAdept
@neon/effect wraps the Neon SDK for Effect 4, keeping the same method names while returning Effects for API calls and Streams for paginated lists. SDK failures become tagged errors such as NeonNotFoundError, NeonNetworkError and NeonWaitTimeoutError that can be handled with Effect.catchTag and composed with Effect.retry schedules. A wait timeout carries the outstanding operations so callers can resume polling. Interruption via Effect.timeout or Fiber.interrupt aborts the in-flight HTTP request and stops readiness polling, which suits platforms that provision per-user Postgres projects as part of a larger distributed workflow.
- Give your agent Neon tools
Neon mediumAdept
Neon's new @neon/tools package turns the ergonomic @neon/sdk client into typed agent tools, using Zod request schemas generated from the OpenAPI spec, with adapters for MCP, Mastra and Vercel's Eve. A raw 1:1 OpenAPI-to-MCP mapping still makes a poor default even now that progressive tool discovery has eased context bloat, because agents need workflow-level operations such as branches.createAndConnect (create branch, attach compute, fetch connection string) rather than raw REST calls. The package now powers the hosted Neon MCP Server, which grows to 104 tools: 85 Management API tools plus 19 hand-written tools for SQL, migrations and diagnostics. The server can be filtered by category, scoped to a project or made read-only, and all non-read operations carry approval annotations that the host is responsible for enforcing.
- Neon for Agent Platforms: A Companion Skill for the AI Agent Program
Neon mediumAdept
neon-for-agent-platforms is an open-source companion Agent Skill and set of TypeScript scripts for running fleets of Neon Postgres databases on agent platforms. It covers a dual-org model that separates sponsored free-tier and paid customers, with one project per tenant transferred to the paid org on upgrade. It also covers copy-on-write dev and preview branches with shorter suspend timeouts to keep costs predictable, branch-based compound checkpoints, and the consumption API for per-customer cost attribution. Both skills install via npx, and the scripts can also be run directly against a Neon API key and org ID.
- @neondatabase/serverless hits 1.0.0
Neon mediumAdept
Neon's JavaScript/TypeScript serverless driver, which carries Postgres queries over HTTP and WebSockets for environments without raw TCP such as V8 isolates and browsers, reaches 1.0.0 after a refactor that adds auto-generated types via api-extractor and CI tests across Node, Bun, Deno, browsers, Cloudflare Workers, Vercel and the Prisma/Drizzle adapters. Tagged-template queries are now composable, because placeholder numbering is deferred until execution. A breaking change makes calling sql(...) as a plain function an error, since that form used ordinary string interpolation and invited SQL injection. New sql.query and sql.unsafe helpers cover the parameterized and trusted-raw-SQL cases. Binary inserts over HTTP now hex-encode roughly 10x faster, though WebSockets remain the recommended path for large blobs.