-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Description
When running the local MCP server with an Organization API key (not a Personal API key), the server fails with a 400 Bad Request error.
Steps to Reproduce
- Create an Organization API key in Neon Console (Settings → API Keys within an organization)
- Run the local MCP server:
npx -y @neondatabase/mcp-server-neon start <ORG_API_KEY>
- Server crashes with
AxiosError: Request failed with status code 400
Expected Behavior
Server should start successfully and be ready to accept MCP commands.
Actual Behavior
Server crashes immediately with the following error:
Server error: AxiosError: Request failed with status code 400
at settle (.../axios/dist/node/axios.cjs:2090:12)
...
at async file:///.../dist/index.js:39:26 {
code: 'ERR_BAD_REQUEST',
...
}
Additional Context
- Version:
@neondatabase/mcp-server-neon@0.6.5 - Node.js: v22 (Alpine Docker image)
- API Key Type: Organization API key (not Personal)
Verification that the API key works
Direct API calls with the same key work correctly:
# This works:
curl -H "Authorization: Bearer <ORG_API_KEY>" "https://console.neon.tech/api/v2/projects"
# Returns list of projects successfully
# This also works:
curl -H "Authorization: Bearer <ORG_API_KEY>" "https://console.neon.tech/api/v2/auth"
# Returns: {"account_id":"org-xxx","auth_method":"api_key_org","auth_data":"..."}So the API key is valid and works, but the MCP server package fails to initialize with it.
Possible Cause
The error occurs during initialization at dist/index.js:39. It seems like the server might be making a request that doesn't properly handle Organization API keys vs Personal API keys, possibly sending an incorrect request format to the /auth endpoint or another initialization endpoint.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels