تدريب Shadowing: Demystifying MCP | Architect Insights - تعلم التحدث بالإنجليزية عبر الفيديو

جارٍ إنشاء الدرس...
1
Hi, I'm Scott Reila, Principal Architect Evangelist at Salesforce.
2
In this episode of Architect Insights, we're going to be exploring Model Context Protocol, or MCP.
3
Often called the USBC for AI, MCP is an open standard revolutionizing how AI agents dynamically connect to external tools and data.
4
Today, we will unpack how it works, examine the architectural trade-offs, and discuss why this new protocol complements your standard APIs.
5
Let's get started.
6
Before we dive in, please note that we may be discussing some forward-looking products and features today.
7
Please make all purchasing decisions based on what is currently available.
8
There are two types of MCP interactions at Salesforce.
9
On the left side, we have Agent Force acting as a client.
10
These are Agent Force agents
11
that need to connect to other external systems to get access to information like order status or inventory availability, or even to execute tasks based on the conversation.
12
On the right side, Salesforce acts as a server.
13
In this scenario, we have external or local agents that need to be able to use Salesforce data via Headless 360.
14
We'll be touching on both sides in our discussion today.
15
But before we go any further, we need to understand exactly what the model context protocol is.
16
MCP is the new open standard for connecting AI to outside tools and data.
17
It was introduced by Anthropic in November of 2024 to solve major integration bottlenecks.
18
Traditionally, if you wanted an agent to interact with a system, you would have to build custom skills or code API or SOC will calls for every single interaction.
19
MCP changes this by providing one unified connection standard, eliminating the need for those custom agent specific builds.
20
It allows AI models to consistently discover and use external features, and because it is open source, it works seamlessly across all AI providers.
21
MCP is often called the USBC for AI.
22
Just like you no longer want to carry around separate micro USB and Lightning cables,
23
MCP means we finally have a single unified configuration protocol for all of our AI agent integrations.
24
Now that we know the what, let's talk about how MCP actually works.
25
Let's start with the component view.
26
Looking at the left side of the screen, we have our hosts.
27
These could be chat interfaces like Claude or ChatGPT, code editors like VS Code or Claude Code or Cursor, or agents like AgentForce.
28
Each of these hosts has its own LLM connection and an embedded MCP client.
29
You can think of the host and the embedded client as sitting together as one unit for now.
30
In the middle, we have the MCP server.
31
The server handles the information discovery and setup, illustrating the different tools, resources, and prompts that are available to the host.
32
There are three types of interactions the MCP server provides.
33
First, we have tools, basically any callable code like APEX, API, whatever.
34
Tools are called dynamically by the agent.
35
For example, if I ask for an order status, the agent will gravitate towards an order status tool to make that call.
36
If there's no appropriate a tool, the LLM will tell me that it can't get the information, or worse, it may actually try to hallucinate the answer.
37
Guardrails are very important here.
38
Next are resources.
39
These represent data or files, and they are fundamentally different from tools because they are not directly callable by the agent.
40
To use the resource, the user must specifically mention it in their question, such as asking for a specific order using a manual pointer like at order 123.
41
Additionally, resources can handle notifications and follow-up information, which only trigger if the underlying system explicitly tells the MCP server that the resource was updated.
42
Lastly, we have prompts.
43
These are essentially just prompt templates.
44
It is critical to note that there is no LLM interaction on the MCP server side.
45
All LLM processing happens over on the host side.
46
Now that we know the components, let's discuss initialization.
47
Anytime you add a new mcp server
48
or start your agent an initialization step occurs exposing an mcp server without security is a bad idea even
49
if the data isn't highly sensitive like a weather app for
50
instance you absolutely must protect your server from denial of service attacks
51
if someone asks an open server for the weather in every
52
single us zip code it could easily crash your mcp server the admin or user
53
if local pre-configures the api key in the headers of the
54
host mcp json config file the host initiates the connection sending a request to the remote mcp server
55
while passing those authorization headers the server then validates the key
56
and if it is a valid api key the server successfully returns the tool list
57
and capabilities for the host to store we'll talk more about storage a little bit later
58
if the key is invalid
59
or missing the server immediately rejects the call with a 401 unauthorized
60
or a 403 forbidden error this step is essential
61
because it allows the mcp server to to identify exactly who is making the call, enabling the server to enforce strict rate limiting or resource throttling.
62
Now let's talk about user authentication, which is what Salesforce uses for Headless 360.
63
This one starts off the same way, where the user or admin configures their host.
64
Looking at step one, the initial connection attempt goes from the client host to the remote MCP server.
65
However, it returns a 401 unauthorized, which prompts the host to fire up a browser and go to the token URL.
66
This takes us to step two where the user logs in through a PKCE or Pixie challenge.
67
Once the user authenticates, Salesforce uses the external app to grant your scopes and determine which MCP servers your user can access.
68
Moving down to step three, the code is exchanged for a bearer and access token.
69
The host connects the user using that bearer token, And as long as the user has the right scopes,
70
the server returns the tool list and capabilities that the user is allowed to access.
71
As you can see, this is a little bit more involved.
72
But this is exactly where we start talking about why it is so important to know who the user is.
73
Every user in Salesforce has different permissions and capabilities.
74
And in this OAuth flow, it ensures that our agent
75
and our chat client can only execute what is specifically available to
76
that user and only access the MCP servers that are enabled.
77
Now that the MCP is initialized, let's talk about the actual tool invocation.
78
Let's say a user asks a question like, what's the humidity level in Chicago?
79
Starting on step one of the diagram, the host app sends the user's prompt alongside a list of available tools stored in the host to the LLM.
80
This is a critical detail depending on how many MCP servers you have connected.
81
The first call can consume a massive amount of your context window
82
because every single associated tool is sent to the LLM with the question in context.
83
The LLM then evaluates the tool descriptions to decide which one to call.
84
Once the tool is selected, like get current weather, we move to step two.
85
The host sends the tool call request, including inferred arguments like the Chicago zip code, to the MCP server.
86
The server executes the action with the external system and then returns the raw data back to the host.
87
Finally, in step three, the host passes the original question alongside that raw tool result back to the LLM.
88
The LLM extracts the specific data, like finding the 76% humidity from a large block of data, and generates the final natural language response for the user.
89
Notice the token burn happening here.
90
We are making multiple LLM calls per interaction, consuming tokens during both the tool selection phase and the final answer generation phase,
91
which is why managing your context window is very important.
92
Now that we have an idea of what MCP call looks like, let's check out a quick demo.
93
I have an MCP server for weather connected right here.
94
When I initialize my connection, look at the list of tools that populate.
95
We have get current weather, get weather conditions, get current air quality, and so on.
96
Notice that there isn't a tool in this list that explicitly mentions humidity levels.
97
This means the LLM actually has to go through each of the tool descriptions to understand
98
which one is the best fit for our question.
99
In this case, it decides get current weather is the best call.
100
Now let's look at the contract happening under the covers.
101
You can see the tool is looking for a location parameter, like Chicago.
102
When we run this, it goes out to the external system and returns an answer, but it doesn't just return a clean 53%.
103
Look at this large blob of data right here.
104
This is the entire result set that gets passed back to the LLM.
105
If I scan through it, I can see the humidity level is 53%, buried right here.
106
In order for the LLM to give that simple answer, the LLM has to process this entire raw result set alongside the user's original question and context.
107
This is where more token burn happens.
108
You are consuming a large amount of tokens based on the
109
sizable tool result just to extract one specific data point and generate a final natural language answer.
110
For an agent interaction, this is necessary to give the exact answer.
111
Is the same level of processing and token burn needed for a system-to-system integration?
112
Based on this analysis, we need to understand each use case and determine if MCP or API should be used.
113
Let's take a look at a side-by-side comparison of why both exist.
114
Looking at the left side, APIs are built for integration.
115
They rely on programmatic code and deterministic contracts.
116
Because there is no LLM interpreting the request or response, there is zero token cost and the data structure is strict and static.
117
Now looking at the right side, MCP is built for interaction.
118
It relies on the probabilistic reasoning of an LLM, which as we saw in the demo, consumes tokens to select a tool and generate the final answer.
119
However, MCP has dynamic discovery.
120
If you add a new tool to your server, the agent knows it exists after the next initialization
121
and how to use it without you having to build out custom agent-specific integrations.
122
For AgentForce, this is slightly different because the admin has to enable each of the tools for security reasons.
123
For system-to-system integrations, APIs remain as the go-to standard due to their deterministic nature and strict processing on the client side.
124
However, if natural language processing or additional reasoning is needed, like in an agentic interaction, then MCP would be desirable.
125
Ultimately, MCP is a powerful standard that complements your APIs.
126
It does not replace them.
127
By understanding the strengths and limitations of both, you can build smarter agentic interactions while maintaining the reliability of your system to system integrations.
128
Thanks for watching and see you next time.

لمن هذا الفيديو؟

هذا الفيديو موجه للمتعلمين الذين يسعون لتحسين مهاراتهم في المحادثة الإنجليزية، سواء كانوا مبتدئين أو متقدمين. إذا كنت ترغب في فهم كيفية تفاعل الوكلاء الذكيين مع البيانات والأدوات الخارجية، فهذا المحتوى مثالي لك. بالإضافة إلى ذلك، سيساعدك هذا الفيديو في اكتساب معرفة عميقة عن "بروتوكول سياق النموذج" وكيفية تطبيقه في ممارستك للغة. كلما فهمت المزيد عن التفاعلات المعقدة بين الذكاء الاصطناعي والبيانات، كانت لديك القدرة على استخدام هذه المعرفة لتعزيز مهاراتك في المحادثة الإنجليزية.

عبارات وكلمات تستحق الاقتباس

  • "مستوى متقدم من التفاعل": تعبر هذه العبارة عن أهمية التفاعل العميق والمستمر في المحادثة. يمكن استخدام هذا التعبير للإشارة إلى تقديم أسئلة معقدة أثناء المحادثات.
  • "تكوين موحد": تشير إلى أهمية وجود بروتوكول موحد للتواصل مع الأدوات الخارجية، مما يسهل التعامل مع المعلومات. يمكنك استخدام هذا المصطلح للمناقشة حول كيفية تحسين نطقك في محادثات معقدة.
  • "تفاعل ديناميكي": هذه العبارة توضح كيف يمكن للذكاء الاصطناعي التكيف مع مختلف المواقف. يمكن أن تكون هذه الفكرة مفيدة عند ممارسة "طريقة التظليل في الإنجليزية" لتعزيز مرونتك اللغوية.

كيفية تحسين النطق بشكل صحيح

للتركيز على تحسين نطقك عند الاستماع إلى المتحدثين في الفيديو، من المهم أن تتبع تقنيات محددة. ابدأ بجلسات "ممارسة المحادثة الإنجليزية" حيث يمكنك تكرار ما تسمعه. استخدم تقنية "shadow speech" لتقليد النطق والإيقاع، مما يساعدك على تطوير "shadowspeak" الخاص بك. حاول العمل على نبرة صوتك وتعبيرات وجهك أثناء المحادثة، فهذا سيساعدك في نقل المعاني بدقة أكبر. تأكد من أن تركز على كيفية تشكيل الحروف والمقاطع الصوتية، وخصوصًا الكلمات الجديدة مثل "تفاعل" و"بروتوكول"، لتكون قادراً على استخدامها بسلاسة في محادثاتك اليومية.

باستخدام هذه الاستراتيجيات، يمكنك أن تتقدم بشكل ملحوظ في مهاراتك اللغوية. تذكر أن تحسين النطق باللغة الإنجليزية يتطلب الوقت والممارسة، لذا استمر في العمل على ذلك بانتظام.

ما هي تقنية التظليل الصوتي؟

التظليل الصوتي (Shadowing) تقنية تعلم لغة مدعومة علمياً، طُورت أصلاً لتدريب المترجمين الفوريين المحترفين. الطريقة بسيطة لكنها قوية: تستمع لصوت إنجليزي أصلي وتكرره فوراً بصوت عالٍ — كظل يتبع المتحدث بتأخير 1-2 ثانية. تُظهر الأبحاث تحسناً كبيراً في دقة النطق والتنغيم والإيقاع وربط الأصوات والاستماع والطلاقة.

تقنية الشادوينغ: اقرأ الدليل الكامل خطوة بخطوة →