Missing API Key Configuration for Claude MCP Serve with Desktop
Status Closed — not planned
Maintainer reply None cached
Activity 3 comments · opened Jun 5, 2025 · closed Dec 10, 2025
Bug Description
I'm experiencing an issue with the claude mcp serve command in Claude Desktop (Max plan) where it consistently fails with a missing API key error whenever the task tool is invoked.
Setup details:
- Using claude CLI with local migration
- Binary location:
~/.claude/local/claude - Attempted to set
CLAUDE_CONFIG_DIRenvironment variable with absolute path
Current MCP configuration:
"claude-code": {
"command": "/Users/myuser/.claude/local/claude",
"args": ["mcp", "serve"],
"env": {
"CLAUDE_CONFIG_DIR": "/Users/myuser/.claude"
}
}
What I've tried:
- Running with the above configuration including
CLAUDE_CONFIG_DIR - Running without the environment variable
- Using absolute paths throughout
Both approaches result in the same missing API key error when invoking the task tool. I haven't been able to successfully configure and use this MCP server.
Any guidance on proper configuration or troubleshooting steps would be appreciated.
Environment Info
- Platform: macos
- Terminal: cursor
- Version: 1.0.11
- Feedback ID: 94a65432-c79d-45bd-b4c0-75a00c5f2206
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at JZ (file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:683:2402)\n at file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:11763\n at Q (file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n at LU (file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10909)\n at HG (file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10355)\n at lO2 (file:///Users/namik/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2042:4758)","timestamp":"2025-06-05T13:10:06.458Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗