Error: ANTHROPIC_API_KEY is not set | MCP configuration

Thanks for reporting a bug you have found in Cursor!
Please add the following info to help us diagnose your issue:

I tried to configure MCP server in “.cursor\rules\mcp.json” path

{
    "mcpServers": {
      "kubernetes": {
        "command": "npx",
        "args": ["mcp-server-kubernetes"]
      }
    }
  }

getting below error:

npx mcp-chat --server "npx mcp-server-kubernetes"
Need to install the following packages:
[email protected]
Ok to proceed? (y) y


    throw new Error("ANTHROPIC_API_KEY is not set");
          ^

Error: ANTHROPIC_API_KEY is not set

:white_check_mark: Check the forum to ensure the issue hasn’t been reported already
:lady_beetle: Provide a clear description of the bug
:counterclockwise_arrows_button: Explain how to reproduce the bug (if known)
:camera: Attach screenshots or recordings (e.g., .jpg, .png, .mp4).
:laptop: Tell us your operating system and your Cursor version (e.g., Windows, 0.x.x).
:prohibited: Tell us if the issue stops you from using Cursor.