MCP Servers with OAuth (The Book (Early bird))
MCP Servers with OAuth
A full introduction to MCP, from zero to deployment in one weekend
About the Book
Special Note: The book should be done in mid July. For now it is offered at a discounted price.
A paid subscription to my newsletter unlocks all future books including this one for free.
This book provides the fastest way to get up to speed using the latest Model Context Protocol authentication specification that was finalized in May 2025. I am in progress, with some sections completed for the June 18, 2025 specification update as well. I'm even working on adding a section where we utilize our MCP in the Gemini CLI, which was released June 25th, 2025. I'll do my best to keep this as the most update to date, all in one MCP source as the specification isn't even one year old yet.
We cover advanced ideas like dynamic tool registration and meta programming uses.
I provide a realistic and unique example of each feature of the server spec, helping you think of creative ways to build AI integrations.
We take advantage of VS Code MCP support that was added in June 2025, allowing us to write our MCP Server, fully use, and test it, without requiring other applications. This lets me teach faster, and for you to learn faster than other courses. Others may have you manually install separate MCP clients along the way, because this support was only added on June 12th.
You can pay $200+ for a course session, or $20 for this book and dedicate the next few hours and be just as competent.
I’ve already built MCP servers that connect directly to Claude’s Integrations section. Using OAuth specifically.
This revealed a few quirks that are not mentioned in the official remote specification in order to connect via OAuth to Claude, which is well covered in this book.
My motto has always been to ship fast. While others are debating decisions, we are already releasing.
That’s a theme in this book as well. The goal is to provide a solid and fast foundation to creating a production ready MCP service. Without derailing into tangential information.
You will learn how to setup Streaming HTTP MCP servers using TypeScript.
Everything we learn will apply to Python, Go, C# and other languages that have an official model context protocol binding.
We will cover integration of REST and GraphQL APIs inside of MCP tool definitions.
Upon completion you will know how to add your server directly inside Claude Desktop, Cursor, other MCP clients, and have access to the currently logged in user from inside any MCP tool calls.
Please bring a foundational understand of REST APIs, TypeScript, and OAuth to get the most out of this book.
Packages
The Book (Early bird)
Early bird pricing while the book is in progress. Estimated completion by mid July.
PDF
EPUB
WEB
English
The Book + Source Code (Early bird)
Early bird book pricing plus source code. Source code is in progress.
Includes:
Source Code
Each chapter has its own source code file that is immediately usable. This will be completed by the end of the book, some chapters are here already.
PDF
EPUB
WEB
English
Team Discounts
Get a team discount on this package:
The Book (Early bird)
About the Contributors
Senior Software Engineer
Chris is an ambitious web developer with a creative technical background who possesses a self-motivated attitude to work under minimal supervision. He is a great team player that thrives on engaging and collaborate among others to formulate creative solutions. Chris is a quick learner with the ability to communicate effectively in a team environment.
Table of Contents
- Work In Progress Changelog
- Book Changelog
- Introduction
- Library Choice Is Critical
- Sharing data across AI Providers
- Integration into your system
- It’s REST, but for LLMs
- Why are they needed
- Environment Setup
- VS Code
- Installing Bun
- Initialize our first project
- Bun init
- Our First MCP Server
- Installing the official implementation
- Adding our first feature
- Testing with the official MCP Inspector
- MCP Deep Dive
- Resources
- Tools
- Sampling (Completions)
- Elicitation
- Choosing the right features to use
- Dynamic Prompts and Tools
- Upgrading to HTTP Streaming
- Other MCP Clients
- Security Concerns
- Deployment
- OAuth
- OAuth Server Setup
- Adding the OAuth Proxy to our MCP Server
- Checking if users are paying before tool use
- Optional Logins
- Quirks for Claude.ai integration
- MCP Clients
- Gemini CLI
- Claude Code
- Claude Desktop
- Claude Website
- Cline
- Work In Progress Changelog
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.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
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 earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
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