# Your Neon database. Read before it is changed.

Source: https://corespeed.io/integrations/neon

Connect Neon to Claude Code, Codex, Cursor or any MCP agent through CoreSpeed. Your agent lists projects and branches, reads table schemas, compares a branch's schema with its parent and finds slow queries. CoreSpeed proxies Neon's own hosted MCP server. Running SQL, or explaining a query with analyze, can change a database, and approvals can hold either call.

## Set up an agent

Give your agent this line: `set up https://corespeed.io/SKILL.md (read it raw, e.g. with curl)`

It fetches the skill at https://corespeed.io/SKILL.md, adds the CoreSpeed MCP server, signs you in (or up), and keeps the skill for next time. Connect Neon after setup. Access follows the connected account and its permissions. Create an account: https://app.corespeed.io/sign-up

## Find the slow query. Plan the fix

Have your agent rank the slow queries, read the table behind the worst one, and explain its plan. You get an index to review, not a change.

You ask your agent: "In my Neon project, list the slowest queries on the main branch, describe the orders table, and explain the worst query without analyze. Do not run anything that writes."

It calls CoreSpeed:

- `neon__list_slow_queries`: ok, 534 ms
- `neon__describe_table_schema`: ok, 318 ms
- `neon__explain_sql_statement`: ok, 402 ms

It reads from: Neon.

### Query review: An index would remove the scan.

The slowest query filters orders by customer_id, and the table has no index on it. The plan reads every row.

**Suggested change**

- CREATE INDEX CONCURRENTLY ON orders (customer_id)
- Try it on a branch first.

**Not done**

- No SQL ran. Creating the index is a run_sql call you approve.

_Illustrative project and queries · Nothing changed in Neon_

All connectors: https://corespeed.io/docs/connectors

## From a slow query to a reviewed fix

Requests you can make once Neon is connected. The data is fictional.

### Find the slow query

Slowest by mean time · pg_stat_statements, on main

- Slowest: Orders by customer, 1.8 s mean
- Calls: 12,400 since the last reset
- Read only · No SQL run

### Check a branch

Schema diff against main · Branch: add-refunds

- Added: orders.refund_reason
- Added: An index on refunds.order_id
- Compared, nothing merged

### Hold the SQL

A statement, waiting · CoreSpeed approvals

- Tool: Run SQL
- Rule: Ask before any SQL runs
- Ask

Full example: https://corespeed.io/solutions/agent-approvals (Markdown: https://corespeed.io/solutions/agent-approvals.md)

## Keep your agent. Bring your work

One CoreSpeed account, across compatible agents.

1. **Set up CoreSpeed**: Give your agent the setup line. It adds CoreSpeed and signs you in.
2. **Connect Neon**: Authorize the account and the content you need.
3. **Start with one task**: Ask for a summary, a brief, or a draft. Review the answer.

Setup guides: Claude Code https://corespeed.io/docs/mcp#claude-code · Codex https://corespeed.io/docs/mcp#codex · Cursor https://corespeed.io/docs/mcp#cursor

## Questions

### Which calls can change my Neon database?

Running SQL changes data when the statement writes, and explaining with analyze executes the statement. Listing, describing, comparing schemas and ranking slow queries only read.

### How do I connect Neon?

Sign in with your Neon account. Your agent works with the projects that account can reach.

### Should I connect a production database?

Neon recommends its MCP server for development and testing. Point your agent at a branch, and keep SQL on production behind approvals.

### Do I have to switch agents?

No. CoreSpeed adds tools to the agent you already use: Claude Code, Codex, Cursor, or another MCP client. Each one signs in once.

### Can my agent access every account in our organization?

No. Access follows your CoreSpeed identity, each connection's visibility, and the app's own permissions. Personal connections stay private.

### Does this work without connecting an account?

No. Connect the app's account first; your CoreSpeed workspace shows what each app needs. The examples on this page use fictional data. All connectors: https://corespeed.io/docs/connectors

Every tool and price: https://corespeed.io/catalog/neon

## Related pages

- [Approval gates for AI agent tool actions](https://corespeed.io/solutions/agent-approvals): Set approval policies for writes through CoreSpeed. Review held tool actions while your team keeps using its preferred agents.
- [App integrations for Claude Code, Codex, and Cursor](https://corespeed.io/integrations): Connect Gmail, Slack, Notion, GitHub, and more to Claude Code, Codex, Cursor, and other MCP clients. Manage private and shared connections.
- [PagerDuty for Claude Code, Codex, and Cursor](https://corespeed.io/integrations/pagerduty): Bring PagerDuty incidents, alerts, and on-call schedules into your agent. Get the timeline and who is on call before you touch anything.
- [Supabase for Claude Code, Codex, and Cursor](https://corespeed.io/integrations/supabase): Let your agent work in your Supabase project: tables, SQL, migrations, logs and advisors, through your own Supabase account.

## Sources

- Connectors: https://corespeed.io/docs/connectors
- Neon: MCP server: https://neon.com/docs/ai/neon-mcp-server
- Neon: API keys: https://neon.com/docs/manage/api-keys
- Neon: Branching: https://neon.com/docs/introduction/branching

Reviewed 2026-11-14.

## Links

- Product overview: https://corespeed.io/ (Markdown: https://corespeed.io/index.md)
- All integrations: https://corespeed.io/integrations (Markdown: https://corespeed.io/integrations.md)
- Documentation: https://corespeed.io/docs
- Pricing: https://corespeed.io/pricing (Markdown: https://corespeed.io/pricing.md)
