-
Notifications
You must be signed in to change notification settings - Fork 6k
docs: Add Neon MCP Server tutorial #3639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
blackgirlbytes
merged 5 commits into
aaif-goose:main
from
andrelandgraf:andrelandgraf/neon-mcp-server
Jul 30, 2025
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
92aacc7
add Neon MCP server to mcp docs
andrelandgraf 53a4df2
fix frontmatter
andrelandgraf ac269fa
remove unused imports
andrelandgraf a7671d4
add top-level remote and local tabs, remote config steps, local tldr,…
dianed-square 91f687a
endorse true
andrelandgraf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| --- | ||
| title: Neon Extension | ||
| description: Add Neon MCP Server as a Goose Extension | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
| import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructions'; | ||
| import GooseDesktopInstaller from '@site/src/components/GooseDesktopInstaller'; | ||
|
|
||
| This tutorial covers how to add the [Neon MCP Server](https://github.com/neondatabase-labs/mcp-server-neon) as a Goose extension to interact with your Neon Postgres databases and manage your projects, branches, and more. | ||
|
|
||
| ## Configuration | ||
|
|
||
| These steps configure the Remote MCP Server. You'll be redirected to neon.com to sign in to your Neon account. | ||
|
|
||
| :::tip Remote MCP Server | ||
| <Tabs groupId="interface"> | ||
| <TabItem value="ui" label="Goose Desktop" default> | ||
| Use `Add custom extension` in Settings → Extensions to add a `Streamable HTTP` extension type with: | ||
| </TabItem> | ||
| <TabItem value="cli" label="Goose CLI"> | ||
| Use `goose configure` to add a `Remote Extension (Streaming HTTP)` extension type with: | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| **Endpoint URL** | ||
| ``` | ||
| https://mcp.neon.tech/mcp | ||
| ``` | ||
| ::: | ||
|
|
||
| Alternatively, you can also use Neon's Local MCP server, using an API key to connect with a specific organization or your personal account. | ||
|
|
||
| Prerequisites: | ||
|
|
||
| - Node.js (>= v18.0.0): Ensure Node.js version 18 or higher is installed on your system. You can download it from [nodejs.org](https://nodejs.org/). | ||
| - Neon API Key: You will need a Neon API key to authenticate the Neon MCP Server with your Neon account. You can create one from the [Neon Console](https://console.neon.tech) under your Profile settings. Refer to the [Neon documentation on API Keys](https://neon.com/docs/manage/api-keys#creating-api-keys) for detailed instructions. | ||
|
|
||
| :::tip Local MCP Server | ||
| <Tabs groupId="interface"> | ||
| <TabItem value="ui" label="Goose Desktop" default> | ||
| <GooseDesktopInstaller | ||
| extensionId="neon" | ||
| extensionName="Neon" | ||
| description="Nanage your Neon Postgres databases, projects, and branches" | ||
| command="npx" | ||
| args={["-y", "@neondatabase/mcp-server-neon", "start", "<YOUR_NEON_API_KEY>"]} | ||
| /> | ||
| </TabItem> | ||
|
|
||
| <TabItem value="cli" label="Goose CLI (No Env Vars)"> | ||
| <CLIExtensionInstructions | ||
| name="Neon MCP" | ||
| command="npx -y @neondatabase/mcp-server-neon start <YOUR_NEON_API_KEY>" | ||
| timeout={300} | ||
| /> | ||
| </TabItem> | ||
|
|
||
| </Tabs> | ||
| ::: | ||
|
|
||
| For all setup and configuration options, see the [official Neon MCP Server documentation](https://neon.com/docs/ai/neon-mcp-server). | ||
|
|
||
| ## Example Usage 1 | ||
|
|
||
| ### Goose Prompt | ||
|
|
||
| ``` | ||
| List my Neon projects | ||
| ``` | ||
|
|
||
| ### Goose Output | ||
|
|
||
| ``` | ||
| I'll help you list your Neon projects using the neon__list_projects tool. By default, it will show the first 10 projects. | ||
|
|
||
| Here are your Neon projects: | ||
|
|
||
| 1. laravel-test (ID: mute-mountain-08595850) | ||
| - Region: AWS US East 2 | ||
| - Created: July 23, 2025 | ||
| - PostgreSQL: v17 | ||
|
|
||
| 2. rls-test (ID: noisy-hill-99207787) | ||
| - Region: AWS US East 2 | ||
| - Created: July 20, 2025 | ||
| - PostgreSQL: v17 | ||
|
|
||
| 3. neon-auth-test (ID: rapid-pond-81053507) | ||
| - Region: Azure East US 2 | ||
| - Created: July 7, 2025 | ||
| - PostgreSQL: v17 | ||
|
|
||
| 4. saas-starter-kit-nextjs (ID: misty-poetry-78149700) | ||
| - Region: AWS US West 2 | ||
| - Created: June 23, 2025 | ||
| - PostgreSQL: v17 | ||
| - Note: Has logical replication enabled | ||
|
|
||
| 5. neon-auth-mcp-oauth (ID: gentle-base-21700263) | ||
| - Region: AWS US West 2 | ||
| - Created: June 4, 2025 | ||
| - PostgreSQL: v17 | ||
|
|
||
| All projects are running PostgreSQL 17 and have autoscaling configured between 1-2 compute units. Would you like more detailed information about any specific project? | ||
| ``` | ||
|
|
||
| ## Example Usage 2 | ||
|
|
||
| ### Goose Prompt | ||
|
|
||
| ``` | ||
| What tables do I have in my neon-auth-mcp-oauth project? | ||
| ``` | ||
|
|
||
| ### Goose Output | ||
|
|
||
| ``` | ||
| In your neon-auth-mcp-oauth project, there is one table: | ||
|
|
||
| users_sync in the neon_auth schema | ||
| ``` | ||
|
|
||
| ## Example Usage 3 | ||
|
|
||
| ### Goose Prompt | ||
|
|
||
| ``` | ||
| Count the rows in the users_sync table. | ||
| ``` | ||
|
|
||
| ### Goose Output | ||
|
|
||
| ``` | ||
| I'll count the rows in the neon_auth.users_sync table using a COUNT query. | ||
|
|
||
| Total Records: 1 row | ||
| Table Location: Schema neon_auth, Table users_sync | ||
| Project: neon-auth-mcp-oauth (Project ID: gentle-base-21700263) | ||
| Content: Contains one user record | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey team, not sure if I need to register the extension somewhere else for this to work. Please let me know, happy to make the required changes :)