Lakebase Postgres is built on object storage, but 99.99999% of reads are served from high-performance local caches
/AI agents on Neon/VS Code and GitHub Copilot

Set up Neon in VS Code and GitHub Copilot

Install the Neon plugin, the Neon MCP Server, or Neon's custom agents for GitHub Copilot

View as Markdown

GitHub Copilot in VS Code gets Neon through the Neon plugin, which bundles Neon's agent skills and the Neon MCP Server. To use MCP servers in VS Code, you need the GitHub Copilot and GitHub Copilot Chat extensions.

Install the plugin

Run:

npx neon@latest plugins --agent vscode

The GitHub Copilot CLI uses the same plugin target (github-copilot), so --agent github-copilot-cli installs to the same place.

npx neon@latest init sets up VS Code with the skills and MCP Server installed separately (not the plugin) and links a Neon project.

Check that it works

Open GitHub Copilot Chat, switch to Agent mode, and ask:

Get started with Neon

Other ways to install

MCP Server only

npx add-mcp https://mcp.neon.tech/mcp -a vscode

This writes .vscode/mcp.json in your project (-g writes your user-level mcp.json). Restart VS Code or enable the server in settings, and click Authorize when the OAuth window opens. Or run npx neon@latest mcp --agent vscode.

To configure it by hand with a Neon API key, add this to .vscode/mcp.json:

{
  "servers": {
    "neon": {
      "type": "http",
      "url": "https://mcp.neon.tech/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_NEON_API_KEY>"
      }
    }
  }
}

For read-only mode and other access controls, see the Neon MCP Server reference.

Skills only

npx neon@latest skills --agent vscode

Neon VS Code extension

The Neon VS Code extension lets you browse projects, branches, and tables in the editor. When you sign in, it also configures the Neon MCP Server.

Neon custom agents for GitHub Copilot

Neon publishes two custom agents for GitHub Copilot in the awesome-copilot repository. Both work on temporary branches (default TTL of 4 hours), away from your main branch:

  • The Neon Migration Specialist tests a migration on a temporary branch, then opens a PR with the migration files for you or your CI/CD to apply. It works with your ORM's migration system (Prisma, Drizzle, SQLAlchemy, Django, Rails, and more) and never runs migrations on your main branch.
  • The Neon Performance Analyzer finds slow queries with pg_stat_statements and EXPLAIN, tests indexes and query rewrites on a temporary branch, and opens a PR with before and after metrics.

Both agents call the Neon API directly, so they need a Neon API key and a project ID or connection string. They ask for these if you haven't provided them. To install an agent, use its Install in VS Code button in the awesome-copilot custom agents list, or add its .agent.md file to your repository's .github/agents/ directory. Then mention it in GitHub Copilot Chat:

@neon-migration-specialist Add a new email column to my users table

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.

Was this page helpful?
Edit on GitHub