Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 7 min read Announcement mediumAdept

Give your agent Neon tools

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.

Assumes: Model Context Protocol basicsOpenAPI code generationTypeScript

Related posts

  • Auto-generating MCP Servers from OpenAPI Schemas: Yay or Nay?

    Neon easyNovice

    Auto-generating an MCP server as a 1:1 mapping of an OpenAPI spec works poorly. LLMs struggle to pick among hundreds of similar tools (GitHub's API has over 600 operations), handle complex JSON payloads and optional parameters badly, and resource-centric REST endpoints don't match the task-level workflows agents perform. The recommended hybrid is to use codegen as a starting point, aggressively prune the generated tools, and rewrite descriptions to explain when and why to use each one. Then add higher-level tools that wrap multi-step workflows, while staying cautious about statefulness. Neon built its open-source MCP server this way on top of its TypeScript SDK, including a workflow for running and testing database migrations.

  • Every app needs an MCP server, and you can build it with Neon

    Neon easyNovice

    An MCP server lets users drive an app from AI assistants like ChatGPT, Claude and Cursor through tools the app defines, which keeps authorization and validation in app code instead of exposing the UI or raw database access. A production server needs a public HTTPS endpoint, OAuth 2.1 with Client ID Metadata Documents to identify users, per-user database access, and tool annotations to be listed in plugin stores. Neon's pitch covers each piece: Neon Functions host the server next to Postgres, Managed Better Auth's OAuth provider plugin issues tokens whose `sub` matches user IDs in the same database, and branches isolate development. A demo app (a 5x5 shared grid with a single paint_square tool) shows the whole build done through prompts to a coding agent.

  • Introducing @neon/sdk, our new TypeScript client for the Neon API

    Neon mediumAdept

    @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.

  • Just landed in the Neon CLI

    Neon mediumAdept

    The Neon CLI is renamed from neonctl to neon (old name kept as an alias) and gains a branch-first workflow built on `neon link`, `neon checkout` and `neon env pull`, which store project/branch context in a local .neon file and rewrite only Neon-managed env vars. New commands include `neon inspect db` for read-only Postgres diagnostics (bloat, unused indexes, locks, pg_stat_statements outliers, cache hit rate), `neon diff` for git-style schema diffs, snapshots, project-scoped API keys and credential profiles for CI and agents, and a raw `neon api` fallback. `neon init` sets up MCP and agent skills in one step, and a suggested AGENTS.md snippet steers coding agents toward the branch-per-feature loop.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: