---
title: "Discussion on \"Your AI Agent Has the Keys: A Practical Guide to MCP Security\" | Hashnode"
description: "Discussion on \"Your AI Agent Has the Keys: A Practical Guide to MCP Security\". SpaceDev CEO Federico Sendra explains how to secure AI agents, MCP tools, identities, permissions, and data against prompt injection and tool misuse."
url: "https://hashnode.com/posts/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security/6a761ce7124ca7db3c531d8b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Your AI Agent Has the Keys: A Practical Guide to MCP Security](https://fsendra.hashnode.dev/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security?utm_source=hashnode&utm_medium=feed)

SpaceDev CEO Federico Sendra explains how to secure AI agents, MCP tools, identities, permissions, and data against prompt injection and tool misuse.

Aug 7 · 8 min read · fsendra.hashnode.dev  
Updated Sep 3  
Read the article

-   [#mcp](https://hashnode.com/tag/mcp)
-   [#claude](https://hashnode.com/tag/claude)
-   [#ai-development-services](https://hashnode.com/tag/ai-development-services)
-   [#guide](https://hashnode.com/tag/guide)
-   [#mcp-server](https://hashnode.com/tag/mcp-server)

## Written by

[Federico Sendra](https://hashnode.com/@fsendra)

@fsendra · Montevideo, Uruguay

  
[View profile](https://hashnode.com/@fsendra)

CEO | AI, Blockchain & Cybersecurity | Driving Innovation with Smart Tech

Co-Founder &amp; CEO of SpaceDev. Entrepreneur and tech strategist focused on AI agents, blockchain, cybersecurity, and building groundbreaking solutions with business value.

## Responses 4

Markdown supported · ⌘↵ to post

[Skillselion](https://hashnode.com/@skillselion)

[Aug 12](https://hashnode.com/posts/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security/6a761ce7124ca7db3c531d8b/comment/6a7c8033a2b55dbad8e930b3)

Against your own best insight, one row of the approval table looks wrong to me. The insight: "authorization is not the same as safety when actions can be recombined." The row: "Open PR: automatic + validation." Opening a PR is not a passive write in most orgs, it is a trigger: CI runs on PR events, workflows execute repository code, and misconfigured pipelines (pull\_request\_target with checkout of the head ref being the classic) run it with access to secrets. So an agent that can create branches and open PRs automatically holds a path from "harmless write" to "code execution in a privileged context," which is precisely the composition risk your recombination point warns about. In repos where CI carries secrets, PR creation belongs in the approval tier, or the validation step must include a diff scan for workflow-file changes. The least-agency framing is a real contribution; role-based thinking fails for agents exactly because roles bundle powers that recombine.

[Federico Sendra](https://hashnode.com/@fsendra)

[Aug 12](https://hashnode.com/posts/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security/6a761ce7124ca7db3c531d8b/comment/6a7c8033a2b55dbad8e930b3#reply-6a7cd2e5d285cada97628fa3)

Issue addressed! Thank you very much for reading

[Andrew](https://hashnode.com/@rizzdev)

[Aug 7](https://hashnode.com/posts/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security/6a761ce7124ca7db3c531d8b/comment/6a763b9bf9c6bd7872f73fb8)

The real cost behind the policy gateway is the review capacity it assumes you have. Once the agent is chaining across Jira, GitHub, Slack, and deploy the intent log grows faster than anyone can read so approval where it matters quietly turns into rubber stamps the moment a deadline hits

[Federico Sendra](https://hashnode.com/@fsendra)

[Aug 8](https://hashnode.com/posts/your-ai-agent-has-the-keys-a-practical-guide-to-mcp-security/6a761ce7124ca7db3c531d8b/comment/6a763b9bf9c6bd7872f73fb8#reply-6a77a8278e84aa87366c7451)

Agree!
