WEBVTT

00:00.120 --> 00:00.800
Okay.

00:01.120 --> 00:05.320
And with that, I can go back to my AI agent.

00:05.400 --> 00:06.640
Here it is.

00:06.680 --> 00:07.880
We've got everything set up.

00:07.880 --> 00:09.360
We can chat with this.

00:09.400 --> 00:10.920
It will use open AI.

00:10.960 --> 00:13.120
It's going to try and produce this structured output.

00:13.200 --> 00:21.080
We just have to give it access to search the internet for, uh, sales prospects to answer our question.

00:21.440 --> 00:23.800
And we've found a great platform for that.

00:23.800 --> 00:25.440
We used Fire crawl.

00:25.600 --> 00:27.680
And fire Crawl was very effective.

00:27.680 --> 00:33.120
But do you remember Fire Crawl had a little particular thing about it, which is that fire crawl, as

00:33.120 --> 00:39.280
it happens, doesn't have a tool built out in Nan, at least not as of today.

00:39.440 --> 00:42.680
By the time you do it, it might be there, but as of today, it's not there.

00:42.680 --> 00:43.600
There's no tool.

00:43.840 --> 00:48.040
And there is, of course, a proper core node.

00:48.080 --> 00:52.040
You could have it here, but that would be no good because there is a fire crawl core node.

00:52.280 --> 00:58.840
But we want to be able to have the Lem drive it and make its own decisions about what it wants to call.

00:58.840 --> 01:04.390
So ideally, we'd want to be able to add a tool right here in these tools that could call fire crawl.

01:04.670 --> 01:06.150
Well, how are we going to do that?

01:06.190 --> 01:14.070
Wouldn't it be great if Fire Crawl had an MCP server, a fire crawl MCP server that we could connect

01:14.070 --> 01:21.310
to here by adding an MCP client, giving us the ability to equip our AI agent with a tool to search

01:21.310 --> 01:22.110
the internet.

01:22.150 --> 01:23.590
Wouldn't that be great?

01:23.870 --> 01:25.710
Oh, but you know me too well, don't you?

01:25.750 --> 01:26.830
Yes, yes, yes.

01:26.870 --> 01:27.430
Of course.

01:27.470 --> 01:32.350
It turns out Farkle does have an MCP server, and it's not an Stdio one.

01:32.350 --> 01:36.470
It's a proper one that we can connect to from within nw10.

01:36.510 --> 01:36.790
So.

01:36.830 --> 01:37.470
Oh, joy.

01:37.750 --> 01:42.790
We found something that doesn't have a tool node, and that's ideal for our use case.

01:42.830 --> 01:46.750
Let's build an MCP integration right now.

01:46.950 --> 01:48.230
It's going to be so easy.

01:48.430 --> 01:52.110
So here I've logged into Fire Crawl and here I am signed in.

01:52.150 --> 01:53.230
That's my API key.

01:53.270 --> 01:54.750
Hey I'm going to copy it to my clipboard.

01:54.750 --> 01:56.990
And so should you because we're going to need it in just a second.

01:57.150 --> 01:59.630
And now I'm going to go to the docks up here.

01:59.630 --> 02:03.030
And in the docks you'll find there's a whole page on MCP server.

02:03.230 --> 02:12.410
And if I scroll down here you'll see that they have a URL for running, and this is a streamable HTTP

02:12.610 --> 02:13.210
type.

02:13.490 --> 02:19.610
Uh which, which uh for, for the the pros that know it, you can tell because it ends with slash MCP

02:19.650 --> 02:20.370
like that.

02:20.530 --> 02:28.770
Um, and they call it a remote hosted URL, uh, which as it says right here has streamable HTTP support.

02:28.810 --> 02:35.690
That is the, the the third type that I showed you in the three types of transport mechanism.

02:36.130 --> 02:36.770
Okay.

02:37.050 --> 02:43.490
So we are going to want to use this URL right here to connect to our MCP server.

02:43.810 --> 02:46.090
But first up there's something else we need to do.

02:46.130 --> 02:52.210
We need to get this fire crawl API key in as a variable into our environment.

02:52.210 --> 02:53.570
And let me show you what I mean.

02:53.570 --> 02:57.810
So I want you to come back to the Project amplify right here.

02:57.850 --> 02:59.090
Oh, definitely save.

02:59.530 --> 03:03.130
Uh, and there is a whole section called variables just here.

03:03.370 --> 03:07.450
And if you go to variables, you'll see that you can add in a new variable.

03:07.450 --> 03:09.890
You can do create variable which I want you to do.

03:09.930 --> 03:15.600
And I want you to call it fire crawl API key like that.

03:15.920 --> 03:18.800
And it's not going to let me because I've already got it, you can see.

03:18.840 --> 03:21.160
But you should not get that red message.

03:21.280 --> 03:25.720
And in here you will paste in the key that you just copied from Fire Crawl.

03:25.720 --> 03:27.040
And you've got to be careful with this.

03:27.040 --> 03:30.320
If I haven't said this a million times, I'm going to set 1,000,001.

03:30.320 --> 03:31.480
You need to get it right.

03:31.480 --> 03:33.320
You need to call it exactly this.

03:33.360 --> 03:34.760
You need to paste it in here.

03:34.760 --> 03:37.760
And if you don't, then don't come complaining to me about it.

03:37.800 --> 03:40.920
You're going to have to keep hammering away at it until you get it right.

03:41.640 --> 03:42.160
So, uh.

03:42.160 --> 03:43.160
But but I know you.

03:43.200 --> 03:44.200
You always get it right.

03:44.200 --> 03:44.920
Thank you.

03:44.920 --> 03:49.760
So you you put that in, and, uh, everything is looking good.

03:49.800 --> 03:54.040
I'm going to change my key before, uh, before you go and use all my credits.

03:54.160 --> 04:01.280
Uh, so at that point, it's telling you right here, this is how you use that, anywhere that you need

04:01.280 --> 04:02.320
to use it.

04:02.680 --> 04:03.440
Okay.

04:03.800 --> 04:12.240
So with that, we are now going to go on and build our, uh, our MCP client to connect to this MCP

04:12.280 --> 04:12.760
server.

04:12.800 --> 04:13.200
Okay.

04:13.270 --> 04:19.870
I've now just gone back to the Fire Crawl MCP docs and here is the link to the remote hosted URL.

04:19.910 --> 04:21.310
You can see it in there.

04:21.510 --> 04:27.310
And the only sneaky thing is that it's a normal URL, but they need you to put the API key in the middle

04:27.310 --> 04:28.870
of the URL like that.

04:29.150 --> 04:30.350
Ah, that's a thing.

04:30.430 --> 04:37.790
So we're going to copy this to the clipboard like so make sure you copy that remote hosted URL.

04:37.830 --> 04:38.270
All right.

04:38.310 --> 04:42.950
Going back to workflows go back into MCP.

04:42.990 --> 04:46.830
Go back into my workflow, whatever you may have named it.

04:47.070 --> 04:50.630
And what we're going to do now is we want to add a tool.

04:50.830 --> 04:55.550
And we know that we unfortunately can't add a fire crawl tool because it doesn't exist.

04:55.550 --> 05:03.310
So we are going to add an MCP client tool, a general connector to any MCP server.

05:03.590 --> 05:05.670
And this is the endpoint right here.

05:05.950 --> 05:08.750
First of all you'll see here it says server transport.

05:08.750 --> 05:14.430
This is where you pick between http streamable and the deprecated server sent events.

05:14.470 --> 05:19.730
SE if I click this, then it it would want it to be a particular kind of URL.

05:19.730 --> 05:20.330
We don't want that.

05:20.330 --> 05:25.410
We want http streamable which is the type that we are using.

05:25.410 --> 05:32.690
And now I'm going to click in endpoint and I'm going to paste in here this URL that I took just a second

05:32.690 --> 05:33.810
ago from over there.

05:34.410 --> 05:37.490
But and I should change it from being fixed to being an expression.

05:38.010 --> 05:41.090
But you can see this is the endpoint that I've typed in here.

05:41.090 --> 05:43.610
And this is the result of evaluating that expression.

05:43.610 --> 05:45.690
And it's just kept that in there.

05:45.690 --> 05:49.770
Because a single curly doesn't mean anything in any land.

05:49.770 --> 05:54.050
For this to be an expression, it has to be a double curly like so.

05:54.290 --> 05:56.210
And now this becomes an expression.

05:56.450 --> 06:01.370
But it's not a good expression because this word firewall API key doesn't mean anything to Nan.

06:01.450 --> 06:03.170
Do you remember what does mean something?

06:03.410 --> 06:05.010
It was actually on the previous screen.

06:05.010 --> 06:06.730
It was on the screen of variables.

06:06.730 --> 06:12.850
It told us that this has to actually be not dollar JSON, because dollar JSON refers to whatever comes

06:12.850 --> 06:13.450
in here.

06:13.450 --> 06:19.010
There's another thing which is dollar vars, which refers to any variables that you've set.

06:19.050 --> 06:26.400
And as soon as I do that, the URL becomes my v2 mcp.

06:26.560 --> 06:28.200
I must remember to change that key.

06:28.440 --> 06:29.280
Uh uh.

06:29.440 --> 06:31.480
So, uh, so there you have it.

06:31.760 --> 06:36.040
And now, of course, if you wish, you could just simply type this, this whole thing in as it is and

06:36.040 --> 06:37.600
put that in this end point right here.

06:37.600 --> 06:42.200
You don't need to do this, but it's a good, good to know that this is the way to do it.

06:42.240 --> 06:44.280
Using Dollar Vase like this.

06:44.280 --> 06:47.560
And then you have one place to change your fire crawl API key.

06:47.760 --> 06:49.640
So that's what we're doing.

06:49.640 --> 06:52.080
We've now configured the endpoint correctly.

06:52.080 --> 06:56.120
We've told our MCP client how to access the MCP server.

06:56.160 --> 07:01.640
And this approach for putting the API key in like this in the URL that's a bit non-standard.

07:01.880 --> 07:06.840
Uh, it's more common to use something where the token is passed in separately.

07:06.840 --> 07:09.560
And this dropdown gives you some of those other common ways.

07:09.720 --> 07:15.280
And if, if you're using if you use an MCP server that uses one of those ways, you could just ask ChatGPT.

07:15.320 --> 07:18.200
It will tell you exactly how you populate this correctly.

07:18.200 --> 07:19.680
It's actually pretty straightforward.

07:19.680 --> 07:22.040
In fact, to be honest, everything here has been straightforward.

07:22.040 --> 07:25.230
All we've actually done is pasted a URL in here.

07:25.430 --> 07:31.350
Uh, after all this terminology, all this stuff explaining MCP, actually putting it in here has been

07:31.350 --> 07:32.150
really simple.

07:32.310 --> 07:36.390
I basically done it that has set up this MCP client.

07:36.630 --> 07:41.070
Uh, all we've really got left to do almost is just test this.

07:41.070 --> 07:43.350
But there's just one more little thing I want to do.

07:43.390 --> 07:49.590
The final thing I want to do is update the system prompt for this agent to be super clear on what it

07:49.590 --> 07:50.270
has to do.

07:50.470 --> 07:51.710
So let's do that.

07:51.750 --> 07:53.710
We come here to add an option.

07:53.710 --> 07:55.910
I'm going to add in the system message.

07:55.990 --> 08:00.990
So I'm going to say you find sales prospects.

08:04.150 --> 08:20.270
Based on a specific query from the user you use your tools to search the the internet and scrape websites

08:20.470 --> 08:36.700
as necessary to find the best, uh, potential clients for the user and respond with, how many should

08:36.700 --> 08:37.020
we say?

08:37.020 --> 08:40.780
Let's say with with five sales prospects.

08:42.780 --> 08:48.940
Okay, that's the system message that tells it what what business function we want it to do that has

08:48.940 --> 08:49.980
now been saved.

08:50.460 --> 08:53.220
Now, you may be wondering one thing.

08:53.220 --> 08:56.140
There may be one thing on your mind that doesn't quite feel right.

08:56.180 --> 08:58.220
Here's here's the thing that might be puzzling you.

08:58.220 --> 08:58.900
And it should be.

08:59.060 --> 09:00.860
It's that we've got an AI agent here.

09:00.860 --> 09:02.100
We've given it a system prompt.

09:02.100 --> 09:03.980
It's got to find sales prospects.

09:04.260 --> 09:09.900
It's got a, uh, an MCP client which has just got a URL in it.

09:09.900 --> 09:13.020
That's that's pointing to somewhere in fire crawl land.

09:13.180 --> 09:16.020
And it's been told it needs to produce outputs in this format.

09:16.460 --> 09:24.500
But nowhere have we actually told it that this thing gives it access to tools which can search the internet

09:24.500 --> 09:27.340
and crawl the internet, and this is what the input should be.

09:27.340 --> 09:29.200
This is how it uses the tools.

09:29.200 --> 09:30.440
This is what they are all about.

09:30.480 --> 09:34.960
And this is the difference between searching and crawling and everything else that Firebase can do.

09:35.000 --> 09:36.120
We haven't done that.

09:36.120 --> 09:38.520
All we've done is just put a URL in there.

09:38.520 --> 09:45.560
Surely somewhere we have to explain what this is doing to the LM so that it knows how to use this to

09:45.600 --> 09:46.840
achieve our objective.

09:47.200 --> 09:51.160
Well, no, that is what MCP is all about.

09:51.320 --> 09:53.880
Firebase will do that for us.

09:54.080 --> 09:59.320
The MCP server that this attaches to is going to explain what it can do.

09:59.680 --> 10:02.040
That's the point of the MCP protocol.

10:02.200 --> 10:06.000
It's going to explain everything Firebase can do to our LM.

10:06.000 --> 10:09.160
So it then knows how to use this tool properly.

10:09.160 --> 10:10.840
And it's just going to work.

10:11.200 --> 10:12.400
That's the magic.

10:12.520 --> 10:17.080
And when you have like a packaged tool in the team has done that for you.

10:17.120 --> 10:18.280
They've written the prompts.

10:18.280 --> 10:22.920
They've packaged everything up into things that will make sense to the LM, but without that, in the

10:22.920 --> 10:28.880
absence of that packaged tool, if we're using MCP, then it's the MCP server that does it for you,

10:29.720 --> 10:33.000
and you don't need to take my word for it because we can give it a try and see.
