# Defense in Depth for MCP Servers

DevFeed: [Defense in Depth for MCP Servers](<https://devfeed.tech/articles/defense-in-depth-for-mcp-servers-358.md>)

Original publisher: [Read original article](<https://supabase.com/blog/defense-in-depth-mcp>)

Author: Bil Harmer

Published: 2025-09-16T07:00:00Z

Content type: article

Language: en

Sources: [Supabase Blog](<https://devfeed.tech/sources/supabase-blog.md>)

Topics: [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [Security](<https://devfeed.tech/topics/security.md>), [prompt injection](<https://devfeed.tech/topics/prompt-injection.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Supabase](<https://devfeed.tech/topics/supabase.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [databases](<https://devfeed.tech/tags/databases.md>), [env-file-security](<https://devfeed.tech/tags/env-file-security.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [prompt-injection](<https://devfeed.tech/tags/prompt-injection.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

The article explains how connecting MCP servers and AI agents to live databases can enable prompt injection attacks and expose private data. It advocates defense-in-depth safeguards, especially for solo developers deploying directly against production data, and clarifies that Supabase's MCP implementation is open source and intended for self-hosting or third-party hosting.

## Source excerpt

Learn about the security risks of connecting AI agents to databases and how to implement defense in depth strategies to protect your data from prompt injection attacks.