如何将 Neon 远程 MCP 连接到 Claude
约 1 分钟即可把 Neon 的远程 MCP 服务端接入 Claude。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。
Streamable HTTPhttps://mcp.neon.tech/mcp
Install in Cursor →
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"neon": {
"url": "https://mcp.neon.tech/mcp"
}
}
}claude mcp add --transport http neon https://mcp.neon.tech/mcp
Install in VS Code →
Or add to .vscode/mcp.json:
{
"servers": {
"neon": {
"type": "http",
"url": "https://mcp.neon.tech/mcp"
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://mcp.neon.tech/mcp - Complete the browser OAuth 2.1 login flow when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"neon": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.neon.tech/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"neon": {
"serverUrl": "https://mcp.neon.tech/mcp"
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"neon": {
"url": "https://mcp.neon.tech/mcp"
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.neon] url = "https://mcp.neon.tech/mcp"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"neon": {
"type": "streamableHttp",
"url": "https://mcp.neon.tech/mcp"
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"neon": {
"httpUrl": "https://mcp.neon.tech/mcp"
}
}
}接入步骤
- 打开连接器设置 — 在 claude.ai → Settings → Connectors 中选择「添加自定义连接器」。
- 填入远程端点 — 将
https://mcp.neon.tech/mcp粘贴为 Remote MCP Server URL 并保存。 - 完成认证 — 首次调用时客户端会打开 Neon 的 OAuth 授权页面——点击允许后工具即可用。
- 验证 — 在 在线 Inspector 中粘贴
https://mcp.neon.tech/mcp并运行 initialize + tools/list 验证连通性。
🧰 工具预览(23)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| list_projects ~27 tok | 🟢 Read | List Neon projects. | — |
| list_shared_projects ~32 tok | 🟢 Read | List projects shared with you. | — |
| create_project ~28 tok | 🟠 Write | Create a Neon project. | — |
| delete_project ~28 tok | 🔴 Destructive | Delete a Neon project. | — |
| describe_project ~29 tok | 🟢 Read | Describe a Neon project. | — |
| get_connection_string ~33 tok | 🟢 Read | Get a Postgres connection string. | — |
| run_sql ~31 tok | 🟠 Write | Run a SQL statement in a Neon database. | — |
| run_sql_transaction ~36 tok | 🟠 Write | Run multiple SQL statements in one transaction. | — |
| describe_table_schema ~31 tok | 🟢 Read | Describe a table's schema. | — |
| get_database_tables ~32 tok | 🟢 Read | List tables in a Neon database. | — |
| create_branch ~28 tok | 🟠 Write | Create a Neon branch. | — |
| describe_branch ~29 tok | 🟢 Read | Describe a Neon branch. | — |
| delete_branch ~28 tok | 🔴 Destructive | Delete a Neon branch. | — |
| prepare_database_migration ~36 tok | 🟠 Write | Prepare a schema migration on a branch. | — |
| complete_database_migration ~34 tok | 🔴 Destructive | Complete a prepared migration. | — |
| explain_sql_statement ~35 tok | 🟢 Read | Get the execution plan of a SQL statement. | — |
| prepare_query_tuning ~34 tok | 🟢 Read | Prepare query tuning recommendations. | — |
| complete_query_tuning ~32 tok | 🟠 Write | Apply prepared query tuning. | — |
| list_slow_queries ~31 tok | 🟢 Read | List slow queries in a project. | — |
| provision_neon_auth ~33 tok | 🟠 Write | Provision Neon Auth for a project. | — |
| get_project_id_from_uri ~34 tok | 🟢 Read | Resolve a project ID from a Neon URI. | — |
| list_organizations ~30 tok | 🟢 Read | List Neon organizations. | — |
| list_branch_computes ~31 tok | 🟢 Read | List computes of a branch. | — |