Your Actor should never see my credentials: the security case for MCP connectors
说明与用途
文章说明如何使用 Apify MCP 连接器将服务令牌保留在平台上,避免在自动化任务中泄露凭据。连接器存储 OAuth 令牌,Actor 仅接收连接器 ID 并通过代理进行通信,代理强制执行最小权限工具访问,从而安全发布和共享 Actor。
问题
Passing service tokens as Actor inputs leaks credentials through logs, shared inputs, and third‑party code.
结果
Credentials never leave the platform; Actors can be published, shared, and run untrusted code without credential leakage.
工作流
- Authorize third‑party service in Apify Console (OAuth)
- Configure Actor input schema to declare required mcpConnector and mcpServers rules
- Run Actor with connector ID instead of raw token
- Actor talks to Apify MCP proxy using APIFY_TOKEN
- Proxy enforces declared tool permissions and returns only allowed tools
证据
The practical consequence: you can publish the Actor's source, share its runs, and paste its input JSON into a forum. There is nothing in any of those artifacts worth stealing.
Verified in a real run log. My Actor's schema used the declaration above. When it called list_tools() through the proxy, it saw exactly 7 tools...
- 记录日期: 2026-09-21T16:30:11.498Z