#MCP Server Authentication Issue - "Not Authorized" Error

1 messages · Page 1 of 1 (latest)

queen crane
#

Hi! I'm having trouble getting the Convex MCP server to work with Claude Code (Anthropic's official CLI).

Environment:

  • OS: Arch Linux (native, not WSL)
  • Convex version: latest
  • Using: Claude Code CLI with MCP integration
  • Project: Anonymous local deployment (not logged in)
  • Working directory: /mnt/storage/workspace/projects/wineapp

Issue:
When trying to use the MCP server tools through Claude Code, I consistently get:
{"error":"Not Authorized: Run npx convex dev to login to your Convex project."}

What I've tried:

  1. Running npx convex dev - backend starts successfully at http://127.0.0.1:3210
  2. Running npx convex mcp start - process starts but authentication fails
  3. Checked .env.local - has CONVEX_DEPLOYMENT=anonymous:anonymous-wineapp
  4. No ~/.convex/credentials file exists (using anonymous deployment)
  5. Backend is accessible via dashboard at http://127.0.0.1:6790/?d=anonymous-wineapp

MCP Configuration (.mcp.json):
{
"mcpServers": {
"convex": {
"command": "npx",
"args": ["-y", "convex@latest", "mcp", "start"],
"env": {}
}
}
}

Claude Code can see the MCP server configuration but can't authenticate with it. Is MCP server authentication supported
for anonymous local deployments, or does it require a logged-in Convex account? Any guidance would be appreciated!

crystal marlin
#

I'm having the same issue in the Augment Remote Agent interface. Seems like the mcp server doesn't play nice with anonymous agent mode.