Stop Sharing API Keys with LLMs - Use Docker MCP Catalog Instead! 🤖💡

Stop Sharing API Keys with LLMs - Use Docker MCP Catalog Instead! 🤖💡

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (5 сегментов)

Segment 1 (00:00 - 05:00)

You guys, Docker just dropped a new standard for AI tools and it completely changes how we build things. They took the raw MCP protocol and they turned it into something that anyone can use. You just click on a few buttons and you give your agents an entire collection of superpowers. You don't need any terminals or memorizing Docker commands. Now everything is done through a friendly interface that even grandma approves. You can't remember where you saved your API keys? That's okay. You don't need them anymore. You don't have the time to search for reliable servers. You don't have to. They are all bundled in one catalog with verified publishers. You just pick and choose. And for the first time ever, these friendly tools were made both for AI users and AI developers. So, not only can you pull them into desktop assistants like Corsor and Claw, but you can also integrate them in your own AI projects that you build in VS Code. So today I will show you three demos. We will start by setting up Docker MCP for Corsort and Claude. We will then integrate it into a basic Python application and then finally we will combine it in a full stack professional LLM GUI application, our own supercharged chat GPT. So if you're ready, let's roll. So, let's quickly see how it works before we dive into details. Let's say you're using something like Claude and you want your AI agent to be a bit more powerful. Instead of just chatting with it, you also wanted to access your Stripe account and read from it, check your invoices, create new ones, generate reports, and so on. But why would you do that if Claude can? So, first we will make sure we have the latest version of Docker Desktop installed, 4. 54 on my end. Then we will open the MCP toolkit tab on the left. And if you're not sure what MCP means, it is a book of rules that allows AI agents to read from external resources. So, for example, your chats on Discord or your financial records on Stripe or your emails on Gmail. We do it from special servers that Discord or Stripe or Gmail designed using the tools that they've built like read emails or list contacts and so on. Now the first thing we'll do in our toolkit is look at the clients where we can either download or connect to all kinds of AI desktop apps. In my case, I'll go for Claude as well as for Corsor. And then last but not least, I will go for Visual Studio Code. Let's connect to it. And while Corsur and VS Code are free, you will need a pro account for Claude, at least for its MCP features. I've purchased it especially for this video so that you don't have to. Now, once our connection is successful, we will go ahead and relaunch one of these apps. In my case, I'll go for Corsor. Then, we will navigate to file followed by preferences followed by Corsor settings and then tools and MCP. And beautiful. We already see MCP Docker available right over here. And we also see that we have six different tools installed automatically. Now these are special smart MCP tools that Docker provides. They don't come from Stripe or Gmail, but they are automatically embedded inside the toolkit. So what does it mean? Well, if we close this settings tab and we start a new chat with Ctrl I, we can then ask our agent to find the official Stripe MCP server. And then Corsor will use one of the Docker MCP tools, this time MCP find to proceed with our task. So, let's quickly give it permissions. And beautiful, we see that it found two different servers. One of them is local and the other one is remote. So let's quickly ask it to go for the remote server. And now it will need another smart tool. This time MCP add. And while we give it permissions, let's quickly talk about the difference between local servers and remote ones. Now back in Docker Desktop, we see that both servers are official given this known publisher icon. The local server is something you download and then it runs on your system. While the remote server runs somewhere far away on Stripe's cloud, given this cloud icon, meaning you're not downloading it and unlike the local server, this one is fully maintained by Stripe. They're constantly enhancing it and patching it. So, it is always up to date. You connect to it once and then you forget about it. In contrast, the local server is not automatically updated. If there is a new version, it is up to you to upgrade it by downloading it again and again. Another benefit of remote servers is advanced security, protecting you from prompt injections and all kinds of

Segment 2 (05:00 - 10:00)

malicious input. And then finally, remote servers don't need secrets or API keys, while the local servers do. If it sounds a bit wild, let's see how it works right away. So back in Corsor, we will allow it to open the browser authentication and we'll hit submit. Then we will simply log in to our account like we usually do. I will log into my fake account which is a very appropriate name and I will hit authorize. Then don't forget to hit on open docker desktop because this is very important. Now if you're having some issues with a corsor authentication then you can also authenticate through docker desktop. Just expand the server and then go to the configurations tab clicking on this authorize with the stripe oath provider link and then you can hit authorize right over here and it will take you to the exact same browser page where you can authenticate it from here. But if everything fails, okay, and the remote server goes buggy for some reason, then you can always connect to the local one. So let's find this one again. This time not the cloud one but the local one. And then inside the configurations tab we will provide a secret key. And here you paste your secret key. Where do you find it? Well, back in your Stripe dashboard. Just type API and follow this developers API keys link here. We will scroll down and we will create a secret key. We will do so for building your own integration. We will give this key some kind of a name. Let's call it Corsor. Okay, let's create it. Then we will copy it and we will paste it inside our secret key section and we'll hit on this check mark. Beautiful. Now we can't access this key. We cannot see it. It is absolutely blocked. It is hidden even from us and we created this thing. So this is quite secure and it's just a nice alternative in case the remote server goes down or something goes wrong. Now a quick troubleshooting note before we move on. If you properly set up your servers, but you still cannot see them in your my servers tab. Let's go back to the catalog and let's add them manually. We will do so by typing Stripe and we will click on this plus icon to add these servers. We'll do it for both of them. And it happens because the MCP toolkit is still in beta. So, they're still working on it. Now, once we fix the issues with my servers, we can then go back to Corsor where we have 31 tools and not just six. Most of them are Stripe tools. Great. So now we can close these settings. We can start a new chat. And we can then ask Corsource, do I have any unpaid invoices on Stripe? And okay, it found an invoice. I have one unpaid invoice for the amount of $1,000 from a customer that ends with B4Y. Now, this is not the customer name. This is just a unique ID that we are using for confidentiality. If we are now navigating to my Stripe account, specifically to my open invoices, we see that I have one open for the amount of $1,000. Amazing. So, Corsor does have access to my account. But here's something even cooler. If now we are opening Claude, then we don't need to set up anything. We can immediately ask it to list all my customers and products on Stripe. And beautiful. It found two customers and one of them ends with B4 Y which is a perfect match to our Corsor results. Amazing. So now what we're going to do is we're going to ask Claude to create a new invoice for customer one, the other guy that's right over here for the product of AI consulting. Okay, let's give it a run. And perfect, the invoice was officially created and we can view it right over here. Okay, there you go. We have $500 that Eugene Krabs owes me. If we refresh our open invoices, we now have two of them. Amazing. But now the final part of our demonstration. We'll go back to Corsor and we'll ask it, were there any updates since the last time we checked? Let's see what it says. Let's expand it. Let's scroll up and okay, we have a new unpaid invoice for the amount of $500 for a customer that ends with 3. Amazing. So, we have both of our agents interacting with my Stripe account in real time. Wow. Now, what happens under the hood is we are setting Docker as a gatekeeper between MCP servers and AI applications. It acts as sort of a middleman. So in terms of Corsor, it doesn't really know that three servers from three different providers are involved. That's because the only thing it communicates with is Docker. It doesn't count three tools for Gmail and 22 tools for Stripe and 20 tools for

Segment 3 (10:00 - 15:00)

Discord. Instead, it counts 45 tools for Docker plus the six smart tools that we got automatically. Okay, [snorts] but what if we don't care about using MCP servers? What if we want to plug them into our own applications? For example, let's say you're building a costume AI app like Chad JPT and you want your users to enjoy Docker's MCP catalog. For this, we will switch to good old VS Code and we will leverage Docker's MCP gateway, which is basically our catalog but packaged in a container. So let's quickly clone some starter files from my GitHub repository. There you go. Dockermc GUI app. You can find the link in the description. We will click on code and we will copy the https address. Then in our VS code terminal, we will clone it with git clone followed by the address. And we see that our project folder has two applications. So let's start with the MCP demo app which is the bare minimum we need to run MCPS with Docker. So let's go ahead and open our docker compose file where we set different components of our app. So if you are completely new to this check out one of my previous docker tutorials otherwise I will briefly explain it here and let me make things a bit smaller. Now in docker compose we will need three different services or three independent components of the app. The first one is the interface that users can access. This is how users communicate with the app. In our case, just through the console. It's a simple demo. So, this is all we need. Next, we have a gateway for local servers. And it looks like that. And then finally, we have a gateway for remote servers. And it looks similar to the local one, but there's a few quirks here that we will discuss shortly. Now when we access our local servers in my case duck. go and stripe we only specify their names and we also mention that their secrets are configured inside docker desktop like we've done earlier with stripe. We stored the secret key actually let me pull it out. We went to docker desktop the local server and in the configuration tab we have this super secret key. Great. Now the way we talk to these servers is through a port on our system. In my case, port 9011. This is where our local servers live. The remote ones, on the other hand, are communicating through port 8080. And we're not just specifying their names like we've done over here, but we are also including them in a special catalog file that you can find in the same folder. It's called catalog yaml. And the idea is we register each server separately. Okay, we have hugging face here and we have the stripe remote server right below it. And we don't just specify the name, but we also specify the URL of these servers. How do we find this URL? Well, we'll just go to docker desktop. We will pull, let's say, the hugging face server. And then in the overview section, you find a link to the documentation. Then we will scroll down and we'll open the visual studio code tab where you can of course find this URL right over here. Now another important component of this catalog file is this secret key authorization. So when we embed these servers into our personal applications the browser authentication that we've used earlier is not going to work at least not at this point in time. So if we want to access our remote Stripe account, we will need to copy our secret key from earlier. I have it right over here. And it will paste it in the file replacing this placeholder with it like so. Now, usually we don't store it here directly because this is very confidential information. I've put it here just to keep things simple, but I will show you a safer spot to store it shortly. Another thing we need is a docker file where we include instructions for our container like installing Python and pip installing a bunch of modules and even running app. py which is the last file we need. So let's quickly open it and as you may guess this is where our python application lives. Now in my case I created a special function to call different tools from different servers. You can use it for any kind of tool from either remote or local servers and you can call it with arguments or without arguments. It's a very versatile function and please feel free to adopt it. But before you call it, make sure that you set up a proper URL for your remote and local gateways. So the port number as well as the service name must

Segment 4 (15:00 - 20:00)

be a perfect match to what we have in Docker Compose. For example, if we set our gateway local service to the port of 9011, that's exactly what we write inside app. py. You also need to know the name of the tool that you'd like to use. So, let's scroll down to this section and each and every tool call is separated by a whole bunch of hashtags. So for example here we are calling the list customer tools from stripe and this tool doesn't expect any arguments but on the other hand the search tool from duckgo expects some kind of a search keyword in our case cats. Now I will show you where to find all these tool names and all their details shortly but for now let's quickly run this app. Mind you, because of how Docker structured things, we don't even mention Stripe or Duck D. Go by name. Okay, we skip the server names alto together and we only use the tool names because again, as far as VS code is concerned, the only server that exists is MCP Docker. There's no such thing as Stripe or Doug. go because only Docker knows that they exist. Great. So now, let's pull up some kind of a terminal. Let's create a new one. Gh. No, not a PowerShell one. Okay, a WSL one. And let's make sure we are in the correct directory. So, we will navigate to cdm MCP demo app. And from here, we can run our demo application with docker compose up dash build. And perfect. Let's have a look at the results. Just going to increase everything. Great. So, the list customers tool from Stripe, both the local and the remote, returned the exact same result. Here's our Bruce Wayne ID. And here's our who is it? Eugene Crab ID. Amazing. So, Stripe officially works. But how about Duck Go? And okay, it found 10 search results for cats. Great. And how about hugging face? Let's scroll up. Beautiful. It found two papers that match the query dolphins. Amazing. So now that we roughly know how these MCP tools work, let's go ahead and combine them in a proper AI chat application. For this, we will switch to the complete app right beside our MCP demo. And this is a public template that I designed especially for you guys. It is a solid foundation for professional AI assistance. So please don't be shy to use it. And what I did here is combining the new MCP functionality with my full stack LLM application from previous tutorials. I already showed you how to build it. Okay, you may remember it. I showed it in this video and we did it step by step absolutely from scratch. We used Docker Model Runner for this one and now we are just embedding Docker MCP in it. of course including links both to this tutorial and to this uh GitHub repository but everything you need is already on your computer and we just need to slightly set it up. Now the first thing we'll do here is we will rename our example file. Oo that is too zoomed in. Okay we will rename this file to simply env. Then we will copy our stripe secret key from earlier and we will then paste it inside this N file replacing our placeholder right over here. Beautiful. So now instead of hard coding our secret key inside catalog YAML like we've done earlier, we are simply assigning it to an environment variable named stripe secrets and then we are specifying it in the catalog. This is way more secure because the N file is a hidden file. Also, if you haven't watched my full stack tutorial, you will need to open your Docker desktop and navigate to your models tab followed by the Docker Hub tab. And here you will search for Gemma 3. Okay, there you go. We found it here and we can pull it into our computer and beautiful JMA 3 is officially installed. And this is a super small and friendly enough model to run on your CPU. That's why I'm using it. Now, you can install any other model. Just please make sure you update the model name inside your env file. Okay? So, if you're downloading something else, you can say AI/w. 5 or whatever it is you're using. Now once our application is up and running we will navigate to our browser specifically to localhost in the port of 8501 and beautiful this is where our guey application lives and we can interact with our model through it. Now in addition to chatting with the model let's ask it hi how are you and then

Segment 5 (20:00 - 23:00)

we'll get responses as usual we can also invoke some MCP tools and I actually prepared some templates for these tools. We can search for something on the web through duck. go or hugging face. If you're curious to see how it works, just find inside app. py look for the get search topic function. This function is listening to instances of search inside your prompt and it checks if it ends with on hugging face or on the web or on the internet and so on. It will then extract the search topic from the prompt and then it will automatically call the appropriate MCP tool. Okay. So, how does it work? Let's say search Maria Sha on the web and tell me who she is. Okay, let's have a look at the results. Now, to remind you, Gemma is way too small to know who I am. So, unless it actually got access to web search, it will have no idea. Okay, it will start hallucinating or something. So, let's scroll up and let's see. Maria Sha is a software developer and a content creator focused on making programming and AI accessible. Wow. Okay. Primarily known for her YouTube channel, Python Simplified. So, it even found this channel and it also found my LinkedIn, my Instagram, my GitHub, my website. Holy moly. Now, another cool thing is that in addition to this response from the model, we are also displaying the full search results from duck. go. Now, if you're curious about other tools that we haven't tried yet, just go back to your docker desktop and expand any kind of server. Let's go for playright. And inside the tools section, you will find all the tool names as well as their description. At least a brief description. But if you're looking for more information, you can always navigate to their GitHub. And at the very bottom of this readme, you will find a detailed list of tools. So if we expand one of these categories, you'll find way more properties and features and so on. The fun part is that you can actually build your own MCP servers and your own MCP tools. So this is just the tip of the iceberg. Congratulations. Now you know exactly how to use Docker's MCP toolkit. And as I mentioned earlier, please feel free to use my code as a template for your projects. It will save you so much time and allow you to focus on the important stuff, stuff that I haven't figured out yet and also it will make me very happy. So if you enjoy my videos and you want to support my channel, the best way to do so is by adopting my code and enhancing it and making it better and better. And thank you so much for watching. If you found this video helpful, please share it with the world and don't forget to leave it a huge thumbs up and all kinds of comments. Now, if you'd like to see more videos of this kind, you can always subscribe to my channel and turn on the notification bell. I'll see you soon in an awesome tutorial. So, in the meanwhile, bye-bye.

Другие видео автора — Python Simplified

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник