MCP servers in vibe-coded apps: no auth, token passthrough and tools you never vetted

Last updated November 16, 2026
Steps
- List every MCP server you run and every one your app or editor connects to, with what each can read and change.
- For your own server over HTTP: require authorization on every request and verify the token on the server. The MCP security guidance says servers that implement authorization must verify all inbound requests and must not use sessions for authentication. A guessable or reused session ID is not a login.
- Only accept tokens that were issued for your MCP server (check the audience). Don’t take a user’s token from the client and pass it straight through to your database or a downstream API; the MCP guidance calls this token passthrough and says servers must not accept tokens not explicitly issued for them.
- Give each tool the narrowest permission it needs. Read tools get read-only credentials; anything that deletes, pays, emails or changes accounts checks the signed-in user’s rights in your code, not in the model’s instructions.
- If your server runs locally, prefer the stdio transport. If it listens over HTTP on localhost, require a token anyway; the MCP guidance warns that local servers left running can be reached by other processes and via DNS rebinding.
- Before connecting a third-party MCP server, read its full tool list, descriptions and parameter schemas, keep an allowlist of approved servers, and re-review when a tool definition changes. OWASP recommends pinning reviewed tool definitions and requiring review on change.
- Treat tool descriptions and tool responses as untrusted input. Don’t let a response from an outside server trigger your privileged tools without a check, and require a human confirmation, showing the full arguments, for destructive or data-sharing actions.
- Don’t install MCP servers with one-click commands you haven’t read. A local server runs with your user’s privileges and can read files, keys and SSH credentials on your machine.
- Log every tool call (who, which tool, which arguments) so you can spot abuse, and rate-limit tools that cost money.
Why it matters
The MCP specification says tools represent arbitrary code execution and must be treated with caution, that tool descriptions such as annotations should be considered untrusted unless they come from a trusted server, and that hosts must get explicit user consent before invoking any tool. The project’s security best-practices page covers confused-deputy problems in proxy servers, token passthrough, session hijacking, local server compromise and over-broad scopes. OWASP’s MCP Security Cheat Sheet describes tool poisoning (malicious instructions hidden in tool descriptions, parameter schemas or return values), tool shadowing across servers, and the confused deputy problem where a server acts with its own broad privileges instead of the user’s. This page is for checking and fixing your own app and setup.
Sources
Model Context Protocol: Specification (2025-11-25), Security and Trust & Safety — https://modelcontextprotocol.io/specification/2025-11-25
Model Context Protocol: Security Best Practices — https://modelcontextprotocol.io/docs/2025-11-25/tutorials/security/security_best_practices
OWASP Cheat Sheet Series: MCP Security Cheat Sheet — https://cheatsheetseries.owasp.org/cheatsheets/MCP_Security_Cheat_Sheet.html
Checked at the source on November 16, 2026.
Related patterns
- AI features that can take actions you never meant to allow (excessive agency)
- Prompt injection in your app's AI chatbot or AI features
- Secrets and access rules hidden in your AI system prompt (system prompt leakage)
- API routes with no auth check
- JWTs decoded but never verified
- Server-side URL fetching that can reach internal services (SSRF)
FAQ
My MCP server is only for me. Does auth matter?
Yes, if it listens over HTTP. Anything else on your machine or network that can reach the port can call it. Use stdio for local-only servers, or require a token.
Can I tell the model “never call the delete tool without asking”?
Use that as a hint, not a control. Put the permission check and the confirmation step in your code, where an injected instruction can’t talk its way past it.
Found a problem you'd rather not fix yourself?
Tell us what's wrong. A StorenTech engineer reviews your app and replies with a fixed quote, so you know the cost before any work starts.
Get it fixed by StorenTechVibe Security Weekly
One email a week with new failure patterns and how to fix them.
By joining you agree we may email you this newsletter. See our privacy policy. Free. Unsubscribe anytime. We'll never sell your email.