Model Context Protocol Security
Last updated 2026-07-31What's new
- **Model Context Protocol (MCP) (a way for different AI tools to talk to each other and share features) can help AI tools discover and use each other's features without needing custom code each time, but it doesn't replace the original services.**
- **MCP can make maintaining and securing AI tools easier when the same feature is used across multiple tools, but it adds complexity and isn't free.**
- **MCP is useful when a feature needs to be used by multiple AI tools, but for single-tool use, a direct API (a way for software to talk to each other) might be simpler.**
- **Hostinger offers four ways to run AI agents on your own computers, including Open Claw (a specific AI tool), and you can get a discount with the code DIYSMARTCODE.**
- AI agents (automated tools that perform tasks) interact with systems much faster than humans, causing unexpected strain on databases, like updating user activity timestamps 60 times faster, which can be fixed by batching updates.
- Traditional permission systems for humans or simple programs (like API keys or service accounts) don't work well for agents, as they often grant too many permissions by default.
- Agents challenge the assumption that the entity authenticating (proving its identity) is the same as the one acting, requiring new ways to delegate access and manage permissions.
- Unlike traditional programs, agents aren't deterministic (predictable), as they can act in ways not explicitly programmed, making security reviews and inspections more difficult.
- A new tool called the Model Context Protocol (MCP) (a way for AI systems to talk to each other and share information) has made it easier for developers to connect AI agents to external tools and services.
- Security issues have arisen with AI agents, such as one that deleted a production database and another that exfiltrated (stole data from) almost 4,000 internal repositories using a malicious VS Code extension (a popular coding program).
- To address these security concerns, the company has been experimenting with and investing in ways to secure what AI agents generate, use, and do, including using Python-based hooks (a way to trigger certain actions) to scan for security issues asynchronously (in the background) after an agent writes or modifies a file.
- Loops (automated processes that use AI to perform tasks) are becoming a key part of software development, with some experts arguing they're inevitable and already transforming how engineers work.
- Pro-loop advocates, like Jeff Huntley (creator of the Ralph loop, a type of AI automation), believe loops can automate tasks like coding and research, making them faster and more efficient.
- Critics, however, argue that loops aren't a perfect solution and that the hype around them might be outpacing their real-world effectiveness.
- The debate highlights that while loops show promise, there are still challenges and unknowns in their practical application.
- AI is getting smarter but not necessarily more useful, as only 1 in 5 AI projects make it to real-world use, and 56% of CEOs see no financial benefit from AI today.
- Success in jobs isn't just about intelligence (like IQ or AI model benchmarks), but also about context—knowledge, skills, and expertise learned over time.
- AI lacks context about businesses, which is often scattered in dashboards, Slack threads, or held by individuals, making it hard for AI to be truly helpful.
- To make AI more useful, we need to help it build context about our businesses, similar to how humans learn on the job through experience, feedback, and dealing with edge cases.
- Claude Code (a tool for building AI-powered automations) lets you work with local files and online services like Gmail, Slack, or a CRM (customer relationship management system), making it more powerful than Claude Chat (a simple AI chatbot).
- Claude Code uses the same AI models (like Opus, Sonnet, or Haiku) as Claude Chat, but adds extra features for working with files and online services.
- Claude Code is like an AI harness (a tool that helps you use AI models), which sits between the AI model (the engine) and you (the driver), helping you build automations and agents (AI systems that can do tasks for you).
- The instructor, Nate, uses Claude Code to build and manage multiple businesses, showing how one person can do the work of a team with AI.
- Zed, an AI code editor, introduced a new protocol called Agent Client Protocol (ACP), a way for different AI coding assistants (agents) and tools (clients) to communicate, making it easier to use various agents in one place.
- ACP is open-source and already supported by over 40 clients, including popular tools like JetBrains and Obsidian, with agents like Open Code and Cursor built-in.
- The protocol allows agents to interact with clients through simple functions, like reading or editing files, and handles conversations in loops, making it easy to build and integrate new agents.
- Zed demonstrated making a basic AI coding agent compatible with ACP in just a few steps, showing how it can be easily integrated and used within their editor.
- MCP (Model Context Protocol) apps are a newer way to build software that lets users interact with AI tools through simple, one-click installs, and they've been around since late 2025.
- MCP apps can now return UI (user interface) elements, like buttons or forms, instead of just JSON (a common data format), making interactions more engaging and user-friendly.
- Stores from companies like Character AI and Cloud have opened up, allowing developers to submit their MCP apps for wider distribution and easier user access.
- Tools like Manufact's open-source SDKs (software development kits) and Manifold Cloud help developers build, test, and share MCP servers and apps more efficiently.
- **Domain-specific agents** (AI tools designed for specific tasks or industries) are becoming crucial, as businesses want to integrate their unique data with AI for better efficiency.
- **Agents** (software that uses AI to complete tasks) are hard to build, requiring careful management of the "agentic loop" (the process the agent follows to complete tasks) and other complex challenges.
- **Tools like Vercel AI SDK** (a set of pre-built code for common AI tasks) and Eve (a framework for building agents) are emerging to help simplify the agent-building process.
- **Many businesses**, from small agencies to large corporations, are trying to build their own custom agents to leverage AI for significant gains.
- OpenGov built OG Assist, an AI agent (a software tool that can perform tasks) that helps users interact with their software products, like budgeting and permitting tools, through a chat interface.
- They switched from using LangGraph to their own Effect Native Agent Loop (a custom-built system for managing AI agents) to have more control and better features like tracing, structured concurrency, and logging.
- Effect is a TypeScript (a programming language) library that helps write better code, and OpenGov uses it to build and improve their AI agents.
- OG Assist can understand and interact with what's on the user's screen, making it more helpful and integrated with their software products.
- AI coding assistants (tools that help write and plan code) can handle large amounts of information, but they can still make mistakes, like sending emails to the wrong people.
- You need to carefully plan and verify the work of AI coding assistants, as they might still find ways to do things you didn't explicitly allow.
- Claude Code (a popular AI coding assistant) can be used as a "second brain" to help run your business, not just for coding.
- AI tools and their uses are changing quickly, so it's important to stay updated and learn how to use them effectively.
- GLM 5.2, a new open-source AI model (software anyone can use and modify), is coming soon with a massive 1 million token context window (ability to process and remember large amounts of text), but no vision capabilities at launch.
- OpenAI, the company behind ChatGPT, introduced a new codeex (AI tool for coding) rate limit reset feature and a generous referral program, possibly reacting to competition from other AI companies.
- Google released Fusion Gemma, an experimental open model (AI software under the Apache 2.0 license) that can generate text up to four times faster than other models.
- Dcope (a service for managing access and permissions) can help secure AI agents (automated software) and servers by handling authentication (verifying identities) and access control (managing permissions) for you.
- Web MCP (Model Context Protocol) is a new web standard that lets websites offer AI agents (software that acts on your behalf) a clear menu of tools and actions, making it easier for them to navigate and interact with the site.
- To prepare for AI agents, focus on making your website accessible to everyone, using clear HTML, strong accessibility standards, and fast loading times, as this also benefits AI agents.
- Web MCP improves the performance and reliability of AI agents by allowing websites to define their capabilities as structured tools, reducing the need for agents to guess or work around site features.
- The Model Context Tool Inspector is a Chrome extension that shows the tools available on a website for AI agents to use, helping developers see and test how their site interacts with AI.
- AI companies are now focusing on "harness engineering" (designing the system around an AI model to make it more effective), which can improve performance up to six times without changing the model itself.
- Harness engineering involves creating rules, tools, memory, and safety layers that guide the AI model before, during, and after it acts, ensuring reliable and consistent results over time.
- Unlike prompt engineering (changing the words the model reads), harness engineering involves changing the invisible structure around the model, like the tools it can use, the checks it must pass, and the recovery process when something goes wrong.
- As AI models become more widely available and similar in capability, the advantage will shift to the team that builds the best system (harness) around them, making the model more reliable and productive in real-world workflows.
- **MCP (Multi-Context Protocol)** is a new open standard that helps apps like VS Code (a free code editor from Microsoft) share information with AI tools (called LLMs, or large language models) to make them smarter and more interactive.
- MCP apps now let AI tools return interactive elements like diagrams or buttons directly in the chat, making it easier to explore data or even shop online without leaving the chat.
- MCP uses three main parts: hosts (like VS Code), clients (like GitHub Copilot, a tool that helps write code), and servers (lightweight programs that provide specific functions or data).
- To keep things safe, it's best to use MCP servers recommended by VS Code or GitHub, as random internet servers might have security issues or harmful content.
- **Context engines** (systems that feed relevant information to AI agents) help AI assistants work independently, rather than requiring humans to manually search for and explain everything.
- **AI agents** (programs that complete coding tasks automatically) work better because context windows—how much information they can process—have grown dramatically since early 8K limits.
- The frontier is shifting toward **background agents** (AI assistants running in the cloud without constant human oversight) that handle multiple tasks in parallel automatically.
- Humans are becoming the bottleneck—managing multiple AI agents simultaneously causes constant context switching (bouncing between tasks), which mentally exhausts workers and slows progress.
Key points
What it is
- Model Context Protocol (MCP) is a standard that lets AI agents interact with external tools, files, databases, and APIs.
- It was created by Anthropic and is now used by big companies like Microsoft and AWS.
- MCP security is still developing, with some serious risks like prompt injection and data exfiltration.
- A big security flaw was found in Anthropic's MCP SDK, showing the dangers of giving AI agents too much access.
How to use it
- Always authenticate all MCP connections and enable the "human in the loop" API for user approval before actions.
- Install MCP servers using the command `claude mcp add <server name> <URL>` and support HTTP, SSE, and standard input/output.
- Test each tool in isolation first, review and approve the AI agent's plan before it runs.
- Build guard rails with natural language rules, like "never send customer phone numbers to any third party tool."
Watch out for
- Treat MCP connections as potential attack surfaces and restrict automatic skill triggers.
- Run skills in isolated sub-agents to prevent malicious outputs from poisoning your main session.
- Be careful with API keys and never trust approved tools blindly, as they can be silently swapped.
- Monitor your context window to prevent context rot, keeping it under 60% for reliability.
Tools named
- Higgs Field user MCP (a tool for managing MCP connections), Windsurf (an AI agent platform), Cursor (a code editor with AI features), Light LLM (a lightweight large language model), Floresse (an AI agent framework).
Lesson 1: What is Model Context Protocol Security and why it matters
Model Context Protocol (MCP) Security refers to the safeguards around how AI agents interact with external tools and data through MCP. Anthropic created MCP as a standard for AI agents to reach files, databases, and APIs. It has been adopted by Microsoft, AWS, Cursor, and Windsurf, and is now considered table stakes across the AI agent stack. However, security in MCP is still immature. Security sections in the protocol remain placeholder, and real concerns like prompt injection through tool descriptions and data exfiltration through tool chaining have no complete solutions yet.
This matters because a single line of code in Anthropic's MCP SDK, shipped in packages downloaded around 150 million times, was found by OX Security to enable remote code execution. This vulnerability underscores the danger of giving AI agents broad tool access without proper guardrails. When you connect an MCP server to an agent, you are giving the model the ability to read files, query databases, and call APIs. If an attacker can inject a prompt that tricks the model into chaining those tools together, they could exfiltrate sensitive data.
The human-in-the-loop API, which requests user interaction before executing actions, is a solid start but not a complete solution. As a developer, you must treat MCP connections as potential attack surfaces. Use disable model invocation settings to restrict which skills trigger automatically. Run skills in isolated sub-agents with their own context windows so malicious outputs cannot poison your main session. Always keep context management in mind, because context rot makes models worse over time, and a compromised agent with too much context is a severe liability.
Sources
- 2026-02-27 — Intent Engineering vs Context Engineering Which Actually Works
- 2026-02-17 — Why Every AI Developer Needs to Know About WebMCP Now
- 2026-01-05 — Once You Know This, Building RAG Agents Becomes Easy in n8n
- 2025-12-10 — How I'd Learn n8n if I had to Start Over in 2026
- 2026-04-01 — Claude Code Source Code Just Leaked… 8 Things You Must Do
- 2026-02-13 — Skills Cost Zero Context Until You Use Them
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2026-04-21 — Anthropic's MCP what OX Security found in 150M downloads
- 2026-02-07 — How I’d Teach a 10 Year Old to Build Agentic Workflows (Claude Code)
- 2026-03-15 — Stop Learning New AI Tools
- 2026-02-21 — The merge that makes Claude actually useful #claude #ai #automation
- 2026-04-20 — How to Never Hit Your Claude Session Limit Again
- 2026-01-25 — Agentic Workflows Just Changed AI Automation Forever! (Claude Code)
Lesson 2: How to use Model Context Protocol Security: step-by-step
To use Model Context Protocol (MCP) securely, start by understanding that MCP is an open standard connecting AI agents to external tools like files, databases, and APIs. Anthropic created it, and it’s now used by Microsoft, AWS, and others. A 2026 security audit by OX Security found that one line in Anthropic’s MCP SDK enabled remote code execution—meaning an attacker could run malicious code on your system—in packages downloaded about 150 million times. This shows the importance of authentication and human oversight.
Begin by authenticating all MCP connections. When you set up an MCP server, like Higgs Field user MCP, you must allow authentication explicitly—just click “allow” to connect. Never skip this step. For remote HTTP servers, confirm you have separate API keys or OAuth flows in place. The newer Web MCP standard includes a “human in the loop” API with request user interaction, where the AI asks for your approval before each action. Enable this on any browser-based tools to prevent prompt injection (when a malicious input tricks the AI) or data exfiltration (stealing your data through tool chaining).
To install MCP servers, use one command: `claude mcp add <server name> <URL>`. Support three transport types: HTTP for remote servers, SSE for legacy systems, and standard input/output for local processes. When you connect, the AI agent handles retries, rate limits, and pagination automatically. Test each tool in isolation first—let the agent propose a plan, then review and approve it before it runs. This step-by-step approval prevents unauthorized access and keeps your data safe.
Sources
- 2026-04-01 — Claude Code Source Code Just Leaked… 8 Things You Must Do
- 2026-02-17 — Why Every AI Developer Needs to Know About WebMCP Now
- 2026-04-21 — Anthropic's MCP what OX Security found in 150M downloads
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2026-05-01 — This 1 MCP Just Made AI Image and Video 100x EASIER
- 2025-12-05 — Unlock the Full Power of Your n8n Agents (new instance MCP)
- 2026-02-07 — How I’d Teach a 10 Year Old to Build Agentic Workflows (Claude Code)
- 2026-05-04 — MCP vs Skills the real difference in Claude Code!
- 2026-01-25 — Agentic Workflows Just Changed AI Automation Forever! (Claude Code)
Lesson 3: Best practices and pitfalls
Model Context Protocol (MCP) security has a clear and dangerous pitfall: one line of code in Anthropic's MCP SDK, shipped in packages downloaded around 150 million times, enables remote code execution. Oak Security published this finding, and Anthropic declined to modify the architecture, stating the behavior is expected. This means if you ship anything built on MCP, the protocol ships unchanged. Treat configs as executable code. When downstream apps pipe user input into that config, it becomes remote code — a reverse shell, anything. So far, at least 10 high and critical severity CVEs have been issued to projects like Windsurf, MCP Inspector, Cursor, Light LLM, and Floresse.
Your first best practice is to block public IPs on STDIO (standard input/output) endpoints — those local process connections. Never trust approved tools blindly, either. Research called MCPoison showed approvals can be silently swapped. For remote MCP servers using HTTP, be careful with API keys. If you're building inside a hosted environment, the system may default to sending API keys for certain endpoints in the conversation history, where other users might see them. Always explicitly send keys only inside your own environment.
You can build guard rails with natural language. Tell your system things like "never send customer phone numbers to any third party tool" or "always stop if you exceed $5 of API usage." Context rot is also a risk — as conversation history grows, the model loses track. Monitor your context window, which holds your system prompt, tools, MCP servers, and all history. Keep it under 60% to maintain reliability.
Sources
- 2026-04-21 — Anthropic's MCP what OX Security found in 150M downloads
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2026-04-01 — Claude Code Source Code Just Leaked… 8 Things You Must Do
- 2026-02-17 — Why Every AI Developer Needs to Know About WebMCP Now
- 2025-12-05 — Unlock the Full Power of Your n8n Agents (new instance MCP)
- 2026-02-07 — How I’d Teach a 10 Year Old to Build Agentic Workflows (Claude Code)
- 2026-05-04 — MCP vs Skills the real difference in Claude Code!
- 2026-04-08 — I Tested Claude's New Managed Agents... What You Need To Know
- 2026-01-25 — Agentic Workflows Just Changed AI Automation Forever! (Claude Code)
- 2026-05-01 — Build & Sell Claude Code Operating Systems (2+ Hour Course)