The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

What MCP does is connect AI agents to your real tools and data, which makes it a target. This bundle will take you from building MCP integrations to defending them against code injection, rug pulls, OAuth flaws, and prompt attacks. You can build powerful AI safely.
Bought separately
$89.97
Minimum price
$69.99
$76.99
About the Bundle
As MCP becomes the standard way to connect AI agents to real tools and data, securing those servers is no longer optional.
This bundle will take you from building MCP integrations to locking them down against real-world threats. There's a great book called MCP Integrations for Microsoft 365 that shows you how to turn Office apps into AI-driven automation hubs. Another one, Build GenAI Agents with OpenAI + vLLM, covers the agent architectures that MCP servers expose. Then, Hardening MCP Servers is another book that protects the whole stack against code injection, rug pulls, OAuth flaws, and prompt attacks.
All these books help you build AI systems that are both powerful and safe.
About the Books
This book practically brings you the easy-to-follow solutions wherein you can connect AI-driven automation to everyday business tools using Model Context Protocol (MCP), with Microsoft Excel and Word as the primary execution and delivery surfaces. This book focuses on practical integration patterns that developers and technical teams can apply directly in real business environments. You won’t find any discussions of model internals or theoretical AI concepts here.
The book presents a structured approach to building governed, auditable workflows. It shows how Excel rows act as requests, YAML playbooks define execution logic, and tools such as Jira, databases, document repositories, and reporting systems are integrated through well-defined contracts. We use Microsoft Word as a controlled output surface for reports and deliverables. There are audit logs and approval mechanisms in place to ensure transparency and traceability throughout the workflow lifecycle. I will guide you through designing MCP tool contracts, mapping Excel columns to tool arguments, normalizing results for analytics, and shaping outputs for Excel and Power BI. In this book, you will learn to implement safety patterns such as idempotency, retries, policy allowlists, tenant isolation, and least-privilege access. It includes practical chapters on connector development, authentication and secrets handling, governance controls, diagnostics, testing strategies, and deployment patterns for both scheduled and on-demand execution.
I strongly recommend this book to developers, platform engineers, and technical architects who work with Microsoft 365. These professionals will learn to integrate AI-assisted workflows into existing business processes without unnecessary complexity.
Key LearningsAI agents are getting easier to build, but the surrounding ecosystem of models, SDKs, and frameworks is changing quickly. A lot of agent apps get tricky to maintain since they depend too much on a certain provider, library, or deployment setup. This book looks at a practical alternative, which is to make AI agents whose main logic doesn't change while models, SDKs, and runtimes can be changed around it. It's not about using complicated frameworks. Rather, this book shows you simple architectural patterns that let you set up an agent application so that tools, schemas, prompts, and business logic can stay separate from the runtime layer.
For starters, it'll be a simple loop with agents, and we'll gradually build on that with tools that make things deterministic, outputs in a structured JSON format, and schema validation. It'll teach skills, like switching between models through configuration, running the same agent with hosted models or local inference using vLLM, and isolating SDK-specific integrations behind small adapter layers. Later, we will focus on packaging and deployment, in which we will convert the agent into a command-line tool, expose it through a minimal HTTP API, and package the application using Docker. Ultimately, the book puts the project together as a reusable starter template that can be used as a basis for future agent-based applications.
Instead of talking about shortcuts or automation, this book focuses on practical development patterns for building maintainable AI agents. Basically, this book is perfect for Python developers, software engineers, and AI practitioners who want a step-by-step process for designing agents that can adapt as the surrounding ecosystem changes.
Key LearningsAI is moving into a new phase, with the Model Context Protocol turning isolated AI models into agents that can read files, call APIs and act across your systems. On top of that, it gave attackers a brand-new, wide-open surface. In less than two years, MCP went from being a good idea to being a critical infrastructure, and its security never kept pace. This practical, solution-focused field book is the first thing you need to get the job done.
This cookbook is built around a single server and you can use it to harden things recipe by recipe. It works through more than fifty real vulnerabilities drawn from a scan of over eleven thousand production servers. You'll be closing code-execution sinks, pinning a runaway dependency supply chain, catching tools that mutate after approval, and enforcing authentication that servers only pretend to require. It'll be your job to defend the agent's own context against prompt injection and tool poisoning, lock down OAuth flows, protect consent screens, isolate untrusting servers on a shared host, and set the operational defaults that decide how far any single flaw can travel.
Every recipe describes the problem, shows the working code to solve it, and proves that the solution works. If you build, run, or secure MCP servers on Linux, this book will help you turn your experience into everyday, repeatable practice.
Key Learnings
Table of Content
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.