Authentication with an MCP server. A quick demo.
Key Takeaways
The video demonstrates how to implement authentication with an MCP server using AuthKit by WorkOS, showcasing a live example with the MCP Shop project, a TypeScript application that requires users to authenticate before accessing the API.
Full Transcript
I've had so far 2,000 conversations about MCP for a good reason. That's the future. That's where we're going. If we want to connect AI agents to the external world, to tools all over the place, we need MCP. But there has been one question that's been really hard to answer, and is how do you create an MCP server that protects the information behind that MCP server? and requires users to authenticate. So obviously the MCP team, the team behind the specification has been putting a lot of work towards it and today I want to show you full source code, full example of how to do that using OKIT by work OS. That is how you will manage the authentication. So basically, you can have an API now and and don't allow anyone to access that API unless they first either create an account or sign in using their credentials. So to do that, we're not going to go into the code, but I'm going to show you and I'm going to leave somewhere below uh a link to this project here, this opensource project, which is pretty fun. It's called the NCP shop. And this project is a TypeScript application that shows how to build that authentication. Okay, so this is the project deployed. It's just a fun little store that sells one t-shirt. Okay, this MCPT. And the idea here is that you can connect an assistant, your AI assistant, cursor, cloth, whatever. you can connect it to this MCP store and put orders like order t-shirts through MCP and in order to do that you will first need to authenticate or create an account using a third party provider signing provider like I don't know Google or Apple or GitHub or whatever it is. So they implemented it all. It's in this uh repo here. you will see all of the you know the entire app everything that's going on like if you go here transport and you go to this route here you will see this is the entire MCP server implementation so you get full access here to do that and it's pretty fun so let me show you this is the store and there is a button here in the store by the way you can just see all of the t-shirts and whatnot or all of the images there is a view ordering instructions button if you open that you will get instructions to connect to cursor or cloud integrations or a local MCP. This is the one that I'm using. So I took this configuration and I pasted it in my cloud desktop configuration. So now my local cloud application has access to this NCP shop. And the first time you do that, so as soon as you configure your cloud application, and I hope you know how to do that, uh, in case you don't know, uh, you go to the settings of cloud. Let me see if I can show you. You go to cloud settings and there is a developer section and here is my MCP shop. If you click on edit config, that will take you to the location of the file that you have to edit and enter your configuration. So now that this MCP shop is running, the first time you do this, a browser will open and we ask you to sign up for the MCP shop server. That is the authentication from work OS playing here. Okay, you're going to sign up using your Google account for example. Uh and that's it. And now you get your you get access to uh the MCP shop through an assistant. So you can ask something like are there any size L t-shirts the MCP shop? Okay. So you can ask a question like this and now cloud will connect to the MCP server and will answer your question. By the way the fun part here is and but all of this is going to happen after you authenticate. Obviously, the fun part is that you can say, "Okay, I want to order one." Okay, so I want to order one. And now Cloud is going to put in an order. It's going to ask you some information that the MCP shop is telling Cloud to ask. Uh it's saying, "Okay, so in order to to order one, you need to enter your company name and your US mailing address." I recommend you do this. See what happens after that. But the important thing here is if you have an API and you want to create an MCP server and you want to make sure your users authenticate before they access that MCP server, like your AI agent will need to have authentication in order to do anything with that MCP server. Check this source code. I'm going to leave a link below. Hope this helps and I'll see you in the next one. Bye-bye.
Original Description
Here is the GitHub Repository with the code you need to make this work: https://github.com/workos/mcp.shop
The authentication is implemented with AuthKit. Here is the GitHub Repository: https://github.com/workos/authkit
I teach a live, interactive program that'll help you build production-ready Machine Learning systems from the ground up. Check it out here:
https://www.ml.school
To keep up with my content:
• Twitter/X: https://www.twitter.com/svpino
• LinkedIn: https://www.linkedin.com/in/svpino
🔔 Subscribe for more stories: https://www.youtube.com/@underfitted?sub_confirmation=1
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Underfitted · Underfitted · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Test-Time Augmentation In Machine Learning.
Underfitted
Don't Replace Missing Values In Your Dataset.
Underfitted
Introduction to Adversarial Validation In Machine Learning.
Underfitted
Introduction To Autoencoders In Machine Learning.
Underfitted
Active Learning. The Secret of Training Models Without Labels.
Underfitted
Early Stopping. The Most Popular Regularization Technique In Machine Learning.
Underfitted
The Confusion Matrix in Machine Learning
Underfitted
3 Tips to Build a Career in Machine Learning (Unconventional Advice)
Underfitted
I can predict cars CRASHING. And it's 99% accurate!
Underfitted
A Critical Skill People Learn Too LATE: Learning Curves In Machine Learning.
Underfitted
The BEST Machine Learning Interview Strategy.
Underfitted
OpenAI’s Whisper is AMAZING!
Underfitted
5 Lessons You’re NOT Taught in School
Underfitted
TensorFlow On Apple Silicon. Step-by-Step Instructions
Underfitted
Generating Images From Text. Stable Diffusion, Explained
Underfitted
The Wrong Batch Size Will Ruin Your Model
Underfitted
8 Mistakes Holding Your Career Back | Machine Learning
Underfitted
AI Just Solved a 53-Year-Old Problem! | AlphaTensor, Explained
Underfitted
Bias and Variance, Simplified
Underfitted
Should You Stop Splitting Your Data Like This?
Underfitted
The Function That Changed Everything
Underfitted
This Model Caused A Nuclear Disaster
Underfitted
Will Your Code Write Itself?
Underfitted
The Simplest Encoding You’ve Never Heard Of
Underfitted
Superhuman AI Cracked An Impossible Game! | DeepNash, Explained
Underfitted
Can you become a Data Scientist without a Ph.D?
Underfitted
How to 10x your productivity with ChatGPT?
Underfitted
Cheating the Prisoner's Dilemma
Underfitted
We integrated OpenAI's Whisper with Spot
Underfitted
The Machine Learning School program
Underfitted
We integrated ChatGPT with our robots
Underfitted
Solving complex tasks using a Large Language Model (LLM)
Underfitted
5 problems when using a Large Language Model
Underfitted
We just discovered faster sorting algorithms!
Underfitted
The 3 most important updates to OpenAI's API.
Underfitted
People are divided! Does GPT-4 understand what it says?
Underfitted
How much should you charge hourly as a Machine Learning freelancer?
Underfitted
Building a RAG application from scratch using Python, LangChain, and the OpenAI API
Underfitted
Building a RAG application using open-source models (Asking questions from a PDF using Llama2)
Underfitted
How to evaluate an LLM-powered RAG application automatically.
Underfitted
Step by step no-code RAG application using Langflow.
Underfitted
I built a simple game using Langchain. Here is a step by step tutorial.
Underfitted
I used the first AI Software Engineer for a week. This is happening.
Underfitted
I deployed a recommendation model. Testing Models In Production using Interleaving Experiments.
Underfitted
How to run PyTorch, TensorFlow, and JAX on your Mac (Apple Silicon)
Underfitted
How to train a model to generate image embeddings from scratch
Underfitted
Building an AI assistant that listens and sees the world (Step by step tutorial)
Underfitted
Why are vector databases so FAST?
Underfitted
A Machine Learning roadmap (the one I recommend to my students)
Underfitted
How to build a real-time AI assistant (with voice and vision)
Underfitted
An introduction to Mojo (for Python developers)
Underfitted
How does Lexical Scoping in Mojo 🔥 works (under 3 minutes)
Underfitted
Building a CI workflow for those who hate it (using GitHub Actions)
Underfitted
How to run Python Code in Mojo 🔥
Underfitted
AI will not take your job. Here is what I think will happen instead.
Underfitted
How to fine-tune a model using LoRA (step by step)
Underfitted
Late initialization in Mojo🔥 (Python doesn't support this)
Underfitted
The $1,000,000 problem AI can't solve
Underfitted
A gentle introduction to RAG (using open-source models)
Underfitted
Automating feedback using ChatGPT and Zapier
Underfitted
More on: LLM Engineering
View skill →
🎓
Tutor Explanation
DeepCamp AI