# MCP에서 API_KEY 안전하게 보관하는 방법

- 진행 순서:

1. 모든 민감 정보(키, 토큰 등)를 찾아 변수명으로 치환

2. .env 파일에 변수명=값 형태로 정리

3. claude_desktop_config.json에서는 ${VARNAME} 형태로 변경

- .env 파일을 프로젝트 루트에 두시면, claude_desktop_config.json에서 환경변수로 안전하게 불러올 수 있습니다.

### `.env`

```javascript
APIFY_TOKEN=apify_api_********
```

### claude_desktop_config.json

```javascript
{
  "mcpServers": {
      "apify": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server"
      ],
      "env": {
        "APIFY_TOKEN": "${APIFY_TOKEN}"
      }
    }
  }
}
```

For the site tree, see the [root Markdown](https://slashpage.com/n8n-guide.md).
