You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Practical implementation is where the power of the Model Context Protocol (MCP) becomes tangible. While understanding the theory and architecture behind MCP is important, the real value comes when you apply these concepts to build, test, and deploy solutions that solve real-world problems. This chapter bridges the gap between conceptual knowledge and hands-on development, guiding you through the process of bringing MCP-based applications to life.
13
13
14
-
Whether you’re developing intelligent assistants, integrating AI into business workflows, or building custom tools for data processing, MCP provides a flexible foundation. Its language-agnostic design and official SDKs for popular programming languages make it accessible to a wide range of developers. By leveraging these SDKs, you can quickly prototype, iterate, and scale your solutions across different platforms and environments.
14
+
Whether you are developing intelligent assistants, integrating AI into business workflows, or building custom tools for data processing, MCP provides a flexible foundation. Its language-agnostic design and official SDKs for popular programming languages make it accessible to a wide range of developers. By leveraging these SDKs, you can quickly prototype, iterate, and scale your solutions across different platforms and environments.
15
15
16
-
In the following sections, you’ll find practical examples, sample code, and deployment strategies that demonstrate how to implement MCP in C#, Java, TypeScript, JavaScript, and Python. You’ll also learn how to debug and test your MCP servers, manage APIs, and deploy solutions to the cloud using Azure. These hands-on resources are designed to accelerate your learning and help you confidently build robust, production-ready MCP applications.
16
+
In the following sections, you'll find practical examples, sample code, and deployment strategies that demonstrate how to implement MCP in C#, Java, TypeScript, JavaScript, and Python. You'll also learn how to debug and test your MCP servers, manage APIs, and deploy solutions to the cloud using Azure. These hands-on resources are designed to accelerate your learning and help you confidently build robust, production-ready MCP applications.
17
17
18
18
## Overview
19
19
20
-
This lesson focuses on the practical aspects of MCP implementation across multiple programming languages. We’ll explore how to use MCP SDKs in C#, Java, TypeScript, JavaScript, and Python to build robust applications, debug and test MCP servers, and create reusable resources, prompts, and tools.
20
+
This lesson focuses on practical aspects of MCP implementation across multiple programming languages. We'll explore how to use MCP SDKs in C#, Java, TypeScript, JavaScript, and Python to build robust applications, debug and test MCP servers, and create reusable resources, prompts, and tools.
21
21
22
22
## Learning Objectives
23
23
@@ -108,7 +108,7 @@ The Java SDK offers robust MCP implementation options with enterprise-grade feat
108
108
- Reactive programming support
109
109
- Comprehensive error handling
110
110
111
-
For a complete Java implementation sample, see [MCPSample.java](../../../04-PracticalImplementation/samples/java/MCPSample.java) in the samples directory.
111
+
For a complete Java implementation sample, see [Java sample](samples/java/containerapp/README.md) in the samples directory.
@@ -121,7 +121,7 @@ The JavaScript SDK provides a lightweight and flexible approach to MCP implement
121
121
- Easy integration with Express and other frameworks
122
122
- WebSocket support for streaming
123
123
124
-
For a complete JavaScript implementation sample, see [mcp_sample.js](../../../04-PracticalImplementation/samples/javascript/mcp_sample.js) in the samples directory.
124
+
For a complete JavaScript implementation sample, see [JavaScript sample](samples/javascript/README.md) in the samples directory.
125
125
126
126
## Sample implementation: Python Implementation
127
127
@@ -134,11 +134,11 @@ The Python SDK offers a Pythonic approach to MCP implementation with excellent M
134
134
- Simple tool registration
135
135
- Native integration with popular ML libraries
136
136
137
-
For a complete Python implementation sample, see [mcp_sample.py](../../../04-PracticalImplementation/samples/python/mcp_sample.py) in the samples directory.
137
+
For a complete Python implementation sample, see [Python sample](samples/python/README.md) in the samples directory.
138
138
139
139
## API management
140
140
141
-
Azure API Management is a great solution for securing MCP Servers. The idea is to place an Azure API Management instance in front of your MCP Server and let it handle features you’ll likely want such as:
141
+
Azure API Management is a great solution for securing MCP Servers. The idea is to place an Azure API Management instance in front of your MCP Server and let it handle features you’ll likely need such as:
142
142
143
143
- rate limiting
144
144
- token management
@@ -148,21 +148,21 @@ Azure API Management is a great solution for securing MCP Servers. The idea is t
148
148
149
149
### Azure Sample
150
150
151
-
Here’s an Azure Sample doing exactly that, i.e. [creating an MCP Server and securing it with Azure API Management](https://github.com/Azure-Samples/remote-mcp-apim-functions-python).
151
+
Here's an Azure Sample doing exactly that, i.e. [creating an MCP Server and securing it with Azure API Management](https://github.com/Azure-Samples/remote-mcp-apim-functions-python).
152
152
153
153
See how the authorization flow works in the image below:
@@ -172,7 +172,7 @@ Learn more about the [MCP Authorization specification](https://modelcontextproto
172
172
173
173
## Deploy Remote MCP Server to Azure
174
174
175
-
Let’s see how to deploy the sample we mentioned earlier:
175
+
Let's see how to deploy the sample we mentioned earlier:
176
176
177
177
1. Clone the repo
178
178
@@ -183,9 +183,9 @@ Let’s see how to deploy the sample we mentioned earlier:
183
183
184
184
2. Register `Microsoft.App`` resource provider.
185
185
* If you are using Azure CLI, run `az provider register --namespace Microsoft.App --wait`.
186
-
* If you are using Azure PowerShell, run `Register-AzResourceProvider -ProviderNamespace Microsoft.App`. Then run `(Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationState` after some time to check if the registration is complete.
186
+
* If you are using Azure PowerShell, run `Register-AzResourceProvider -ProviderNamespace Microsoft.App`. Then run `(Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationState`and after some time check if the registration is complete.
187
187
188
-
3. Run this [azd](https://aka.ms/azd) command to provision the API management service, functionapp (with code), and all other required Azure resources
188
+
3. Run this [azd](https://aka.ms/azd) command to provision the API management service, functionapp (with code), and all other required Azure resources:
189
189
190
190
```shell
191
191
azd up
@@ -201,11 +201,11 @@ Let’s see how to deploy the sample we mentioned earlier:
201
201
npx @modelcontextprotocol/inspector
202
202
```
203
203
204
-
You should see an interface similar to:
204
+
You should see an interface like this:
205
205
206
206

207
207
208
-
2. CTRL-click to load the MCP Inspector web app from the URL displayed by the app (e.g. http://127.0.0.1:6274/#resources)
208
+
2. CTRL-click to open the MCP Inspector web app from the URL displayed by the app (e.g. http://127.0.0.1:6274/#resources)
209
209
3. Set the transport type to `SSE`
210
210
1. Set the URL to your running API Management SSE endpoint displayed after `azd up` and **Connect**:
211
211
@@ -215,7 +215,7 @@ Let’s see how to deploy the sample we mentioned earlier:
215
215
216
216
5. **List Tools**. Click on a tool and **Run Tool**.
217
217
218
-
If all steps worked, you should now be connected to the MCP server and able to call a tool.
218
+
If everything worked, you should now be connected to the MCP server and able to call a tool.
219
219
220
220
## MCP servers for Azure
221
221
@@ -269,4 +269,4 @@ Design a practical MCP workflow that addresses a real-world problem in your doma
This document has been translated using AI translation service [Co-op Translator](https://github.com/Azure/co-op-translator). While we strive for accuracy, please be aware that automated translations may contain errors or inaccuracies. The original document in its native language should be considered the authoritative source. For critical information, professional human translation is recommended. We are not liable for any misunderstandings or misinterpretations arising from the use of this translation.
272
+
This document has been translated using the AI translation service [Co-op Translator](https://github.com/Azure/co-op-translator). While we strive for accuracy, please be aware that automated translations may contain errors or inaccuracies. The original document in its native language should be considered the authoritative source. For critical information, professional human translation is recommended. We are not liable for any misunderstandings or misinterpretations arising from the use of this translation.
0 commit comments