---
title: Track usage programmatically, simpler MCP Server setup, and new PG18 extension support
---
## Track your usage programmatically on paid plans
A new consumption history API for current usage-based plans is now available on all paid plans, including Launch. The metrics returned align directly with [usage-based billing](/docs/introduction/plans), so what you query matches what you see on your invoice.
Use this API to build custom dashboards, integrate with your reporting tools, or set up usage alerts. Query at hourly, daily, or monthly granularity for metrics like compute usage, storage (root and child branches), instant restore, data transfer, and extra branches.
This example retrieves month-to-date usage for all metrics:
```bash shouldWrap
curl --request GET \
--url 'https://console.neon.tech/api/v2/consumption_history/v2/projects?from=2026-02-01T00:00:00Z&to=2026-02-06T00:00:00Z&granularity=daily&org_id=$ORG_ID&metrics=compute_unit_seconds,root_branch_bytes_month,child_branch_bytes_month,instant_restore_bytes_month,public_network_transfer_bytes,private_network_transfer_bytes,extra_branches_month' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $NEON_API_KEY' | jq
```
For API details, see [Retrieve project consumption metrics](https://api-docs.neon.tech/reference/getconsumptionhistoryperprojectv2). For more information, see [Querying consumption metrics](/docs/guides/consumption-metrics).
**Try it with your AI agent:**
## Simpler MCP Server setup
You can now configure the Neon MCP Server for all detected AI agents and editors in your workspace with a single command:
```bash
npx add-mcp https://mcp.neon.tech/mcp
```
This adds the MCP config to your editor; restart your editor (or enable the MCP server in settings). When you use the connection, an OAuth window will open in your browser to authorize access. For the full setup (MCP server plus agent skills and VS Code extension), use `npx neonctl@latest init` instead. It configures the MCP server for Cursor, VS Code, Claude Code, and others using API key authentication.
With OAuth, the MCP server uses your personal Neon account by default. To use organization projects, provide `org_id` or `project_id` in your prompt. For API key-based authentication (e.g., remote agents), use:
```bash
npx add-mcp https://mcp.neon.tech/mcp --header "Authorization: Bearer $NEON_API_KEY"
```
For more setup options (including global vs project-level), see [Connect MCP clients to Neon](/docs/ai/connect-mcp-clients-to-neon) and the [add-mcp repository](https://github.com/neondatabase/add-mcp).
## Postgres extension updates
We've expanded extension support for Postgres 18:
| Extension | Version | Description |
| :------------------------------------------------ | :------ | :-------------------------------------------------------------------------- |
| [pg_graphql](/docs/extensions/pg_graphql) | 1.5.12 | Adds a GraphQL API layer directly to your Postgres database |
| [pgx_ulid](https://github.com/pksunkara/pgx_ulid) | 0.2.2 | Generates universally unique lexicographically sortable identifiers (ULIDs) |
To install these extensions, run:
```sql
CREATE EXTENSION pg_graphql;
CREATE EXTENSION pgx_ulid;
```
For a complete list of Postgres extensions supported by Neon, see [Postgres extensions](/docs/extensions/pg-extensions).
**Neon API**
- You can now set your project's default branch using the [Update Project API](https://api-docs.neon.tech/reference/updateproject) by passing the `default_branch_id` parameter. This makes it easier to automate branch management in CI/CD pipelines and scripts, for example, after a recovery operation or when promoting a development branch to production. The previous default branch is automatically unset.
```bash shouldWrap
curl --request PATCH \
--url 'https://console.neon.tech/api/v2/projects/{project_id}' \
--header 'Authorization: Bearer $NEON_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"project": {"default_branch_id": "br-example-123456"}}'
```
**Tables page**
- The Drizzle Studio integration that powers the **Tables** page in the Neon Console has been updated to version 1.3.0. This release fixes issues with uppercase letters in enum column types and adding foreign keys. For the full list of improvements, see the [Neon Drizzle Studio Integration Changelog](https://github.com/neondatabase/neon-drizzle-studio-changelog/blob/main/CHANGELOG.md).
_The **Tables** page lets you view, edit, and manage your database tables and data directly from the console. For more, see [Tables page](/docs/guides/tables)._