Should MCP Tools Ever Expose Credentials to the Model? A Proxy-Injection Design
lordVader1138 · reddit · 2026-10-12
A developer building an MCP server that lets coding agents run disposable checks against a real dev backend asks whether tools making authenticated API calls should ever expose credentials to the model.
His design: credentials stay outside the model, injected by a proxy only when requests leave the worker; neither secrets nor source code reach the model; tool output (report, replay curls) never contains auth headers — the agent only sees what was called, what came back, and pass/fail.
He asks other MCP builders how they handle credentials (client env vars vs server-side vaults), whether a tool's report can be trusted as evidence in a PR or only as a hint, and what's missing from the report. He's also extending the approach to frontend/mobile sync and browser testing.
More from coding & agent
- Claude Code Pushes Urgent Security Update Across All Installations — umeshonai · 2026-10-23
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23