@azure/mcp 0.3.1 ā 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -44
- package/index.js +57 -2
- package/package.json +11 -8
- package/scripts/post-install-script.js +13 -0
package/README.md
CHANGED
|
@@ -9,35 +9,36 @@ Here's a short (16 seconds) video to help you get the Azure MCP Server installed
|
|
|
9
9
|
1. Install either the stable or Insiders release of VS Code:
|
|
10
10
|
* [š« Stable release](https://code.visualstudio.com/download)
|
|
11
11
|
* [š® Insiders release](https://code.visualstudio.com/insiders)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* Ensure `
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
7. Click `refresh` on the tools list.
|
|
12
|
+
1. Install the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) and [GitHub Copilot Chat](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat) extensions
|
|
13
|
+
1. Install [Node.js](https://nodejs.org/en/download) 20 or later
|
|
14
|
+
* Ensure `npx` is your path
|
|
15
|
+
1. Install any of the available Azure MCP Servers from the table below.
|
|
16
|
+
1. Open GitHub Copilot in VS Code and [switch to Agent mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)
|
|
17
|
+
1. Click `refresh` on the tools list.
|
|
19
18
|
|
|
20
19
|
#### š¤ Available Azure MCP Servers
|
|
21
20
|
|
|
22
|
-
| Name | Description |
|
|
21
|
+
| Name | Description | Read/Write Tools | Read Only Tools |
|
|
23
22
|
|--------------|-----------------------------------------------------------------------------------------------|-----------|-----------|
|
|
24
|
-
| All | All Azure tools in a single
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
23
|
+
| All | All Azure MCP tools in a single server. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Server%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--read-only%22%5D%7D) |
|
|
24
|
+
| Azure Kubernetes Service (AKS) | List and manage clusters. | [](https://insiders.vscode.dev/redirect/mcp/install?name=Azure%20AKS&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22aks%22%5D%7D) | [](https://insiders.vscode.dev/redirect/mcp/install?name=Azure%20AKS%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22aks%22%2C%22--read-only%22%5D%7D) |
|
|
25
|
+
| App Configuration | Manage configuration stores and key-value pairs. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20App%20Config&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22appconfig%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20App%20Config%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22appconfig%22%2C%22--read-only%22%5D%7D) |
|
|
26
|
+
| Azure Data Explorer | Query and manage clusters and databases. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Kusto&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22kusto%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Kusto%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22kusto%22%2C%22--read-only%22%5D%7D) |
|
|
27
|
+
| Best Practices | Secure, production-grade Azure SDK guidance. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Best%20Practices&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22bestpractices%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Best%20Practices%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22bestpractices%22%2C%22--read-only%22%5D%7D) |
|
|
28
|
+
| Cosmos DB | Manage NoSQL databases and containers. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Cosmos&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22cosmos%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Cosmos%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22cosmos%22%2C%22--read-only%22%5D%7D) |
|
|
29
|
+
| Foundry | Manage AI model deployments and foundations. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Foundry&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22foundry%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Foundry%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22foundry%22%2C%22--read-only%22%5D%7D) |
|
|
30
|
+
| Grafana | Monitor dashboards and analytics visualization. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Grafana&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22grafana%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Grafana%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22grafana%22%2C%22--read-only%22%5D%7D) |
|
|
31
|
+
| Key Vault | Manage secrets, keys, and certificates. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Key%20Vault&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22keyvault%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Key%20Vault%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22keyvault%22%2C%22--read-only%22%5D%7D) |
|
|
32
|
+
| Monitor | Query/analyze logs and metrics. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Monitor&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22monitor%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Monitor%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22monitor%22%2C%22--read-only%22%5D%7D) |
|
|
33
|
+
| PostgreSQL | Manage flexible PostgreSQL database servers. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20PostgreSQL&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22postgres%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20PostgreSQL%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22postgres%22%2C%22--read-only%22%5D%7D) |
|
|
34
|
+
| Redis Cache | Manage Redis caches and data operations. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Redis%20Cache&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22redis%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Redis%20Cache%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22redis%22%2C%22--read-only%22%5D%7D) |
|
|
35
|
+
| Resource Group | Manage resource groups and deployments. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Resource%20Group&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22group%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Resource%20Group%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22group%22%2C%22--read-only%22%5D%7D) |
|
|
36
|
+
| Role Based Access Control | Manage role assignments and permissions. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20RBAC&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22role%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20RBAC%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22role%22%2C%22--read-only%22%5D%7D) |
|
|
37
|
+
| Search | Query AI Search services and indexes. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Search&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22search%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Search%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22search%22%2C%22--read-only%22%5D%7D) |
|
|
38
|
+
| Service Bus | Manage queues, topics, and messaging. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Service%20Bus&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22servicebus%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Service%20Bus%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22servicebus%22%2C%22--read-only%22%5D%7D) |
|
|
39
|
+
| SQL | Manage SQL databases and servers. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20SQL%20Database&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22sql%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20SQL%20Database%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22sql%22%2C%22--read-only%22%5D%7D) |
|
|
40
|
+
| Storage | Manage storage accounts and blob data. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Storage&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22storage%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Storage%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22storage%22%2C%22--read-only%22%5D%7D) |
|
|
41
|
+
| Subscription | Manage Azure subscription details. | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Subscription&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22subscription%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Subscription%20Read%20Only&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@azure%2Fmcp%40latest%22%2C%22server%22%2C%22start%22%2C%22--namespace%22%2C%22subscription%22%2C%22--read-only%22%5D%7D) |
|
|
41
42
|
|
|
42
43
|
### ā¶ļø Getting Started
|
|
43
44
|
1. Open GitHub Copilot in VS Code and [switch to Agent mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)
|
|
@@ -57,6 +58,10 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
57
58
|
### āļø Azure App Configuration
|
|
58
59
|
- "List my App Configuration stores"
|
|
59
60
|
|
|
61
|
+
### āøļø Azure Kubernetes Service (AKS)
|
|
62
|
+
- "List my AKS clusters in my subscription"
|
|
63
|
+
- "Show me all my Azure Kubernetes Service clusters"
|
|
64
|
+
|
|
60
65
|
### š Azure Cosmos DB
|
|
61
66
|
- "Show me all my Cosmos DB databases"
|
|
62
67
|
- "List containers in my Cosmos DB database"
|
|
@@ -99,7 +104,7 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
99
104
|
- Handle labeled configurations
|
|
100
105
|
- Lock/unlock configuration settings
|
|
101
106
|
|
|
102
|
-
###
|
|
107
|
+
### š„ļø Azure CLI Extension
|
|
103
108
|
- Execute Azure CLI commands directly
|
|
104
109
|
- Support for all Azure CLI functionality
|
|
105
110
|
- JSON output formatting
|
|
@@ -134,6 +139,9 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
134
139
|
- Deploy foundry models
|
|
135
140
|
- List foundry model deployments
|
|
136
141
|
|
|
142
|
+
### š Azure Managed Grafana
|
|
143
|
+
- List Azure Managed Grafana
|
|
144
|
+
|
|
137
145
|
### ļæ½ Azure Key Vault
|
|
138
146
|
- List, create, and get keys
|
|
139
147
|
|
|
@@ -238,7 +246,7 @@ AZURE_CLIENT_SECRET={YOUR_AZURE_CLIENT_SECRET}
|
|
|
238
246
|
Optionally, customers can use `--env` or `--volume` to pass authentication values.
|
|
239
247
|
|
|
240
248
|
#### š¤ Custom MCP Client Install Steps (Optional)
|
|
241
|
-
You can easily configure your MCP client to use the Azure MCP Server. Have your client run the following command and access it via standard IO
|
|
249
|
+
You can easily configure your MCP client to use the Azure MCP Server. Have your client run the following command and access it via standard IO.
|
|
242
250
|
|
|
243
251
|
#### š§ Manual Install Steps (Optional)
|
|
244
252
|
For a step-by-step installation, follow these instructions:
|
|
@@ -260,7 +268,7 @@ For a step-by-step installation, follow these instructions:
|
|
|
260
268
|
}
|
|
261
269
|
```
|
|
262
270
|
|
|
263
|
-
You can optionally set the `--namespace <
|
|
271
|
+
You can optionally set the `--namespace <namespace>` flag to install tools for the specified Azure product or service.
|
|
264
272
|
|
|
265
273
|
1. Add `.vscode/mcp.json`:
|
|
266
274
|
```json
|
|
@@ -285,22 +293,6 @@ You can optionally set the `--namespace <service>` flag to install tools for the
|
|
|
285
293
|
|
|
286
294
|
Configure the MCP client to execute: `npx -y @azure/mcp@latest server start`. For instructions on using , follow instructions in [Quick install with VS Code](#-quick-install-with-vs-code) or [Manual Install](#-manual-install).
|
|
287
295
|
|
|
288
|
-
### Using SSE
|
|
289
|
-
|
|
290
|
-
1. Open a terminal window and execute: `npx -y @azure/mcp@latest server start --transport sse`
|
|
291
|
-
2. The server starts up and is hosted at: http://localhost:5008. To use another port, append `--port {YOUR-PORT-NUMBER}`.
|
|
292
|
-
3. Open your MCP client and add the SSE configuration value. This may differ between MCP clients. In VS Code, it will look like:
|
|
293
|
-
```json
|
|
294
|
-
{
|
|
295
|
-
"servers": {
|
|
296
|
-
"Azure MCP Server": {
|
|
297
|
-
"type": "sse",
|
|
298
|
-
"url": "http://localhost:5008/sse"
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
296
|
More end-to-end MCP client/agent guides are coming soon!
|
|
305
297
|
</details>
|
|
306
298
|
|
package/index.js
CHANGED
|
@@ -33,8 +33,63 @@ try {
|
|
|
33
33
|
debugLog(`Attempting to require platform package: ${platformPackageName}`)
|
|
34
34
|
platformPackage = require(platformPackageName)
|
|
35
35
|
} catch (err) {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
debugLog(`Failed to require ${platformPackageName}, attempting auto-install: ${err.message}`)
|
|
37
|
+
|
|
38
|
+
// Try to automatically install the missing platform package
|
|
39
|
+
try {
|
|
40
|
+
const { execSync } = require('child_process')
|
|
41
|
+
|
|
42
|
+
console.error(`Installing missing platform package: ${platformPackageName}`)
|
|
43
|
+
|
|
44
|
+
// Try to install the platform package
|
|
45
|
+
try {
|
|
46
|
+
execSync(`npm install ${platformPackageName}@latest`, {
|
|
47
|
+
stdio: ['inherit', 'inherit', 'pipe'], // Only pipe stderr to capture errors
|
|
48
|
+
timeout: 60000 // 60 second timeout
|
|
49
|
+
})
|
|
50
|
+
} catch (npmErr) {
|
|
51
|
+
// If npm install fails, try with --no-save and different install strategies
|
|
52
|
+
debugLog(`npm install failed, trying alternative installation methods: ${npmErr.message}`)
|
|
53
|
+
|
|
54
|
+
// Try with --no-save and --prefer-online
|
|
55
|
+
execSync(`npm install ${platformPackageName}@latest --no-save --prefer-online`, {
|
|
56
|
+
stdio: ['inherit', 'inherit', 'pipe'],
|
|
57
|
+
timeout: 60000
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Clear module cache and try to require again after installation
|
|
62
|
+
Object.keys(require.cache).forEach(key => {
|
|
63
|
+
if (key.includes(platformPackageName)) {
|
|
64
|
+
delete require.cache[key]
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
platformPackage = require(platformPackageName)
|
|
69
|
+
|
|
70
|
+
console.error(`ā
Successfully installed and loaded ${platformPackageName}`)
|
|
71
|
+
|
|
72
|
+
} catch (installErr) {
|
|
73
|
+
debugLog(`Auto-install failed: ${installErr.message}`)
|
|
74
|
+
|
|
75
|
+
console.error(`\nā Failed to load platform specific package '${platformPackageName}'`)
|
|
76
|
+
console.error(`\nš Troubleshooting steps:`)
|
|
77
|
+
console.error(`\n1. Clear npm cache and reinstall:`)
|
|
78
|
+
console.error(` npm cache clean --force`)
|
|
79
|
+
console.error(` npm uninstall -g @azure/mcp`)
|
|
80
|
+
console.error(` npm install -g @azure/mcp@latest`)
|
|
81
|
+
console.error(`\n2. If using npx, clear the cache:`)
|
|
82
|
+
console.error(` npx clear-npx-cache`)
|
|
83
|
+
console.error(` npx -y @azure/mcp@latest server start`)
|
|
84
|
+
console.error(`\n3. Manually install the platform package:`)
|
|
85
|
+
console.error(` npm install ${platformPackageName}@latest`)
|
|
86
|
+
console.error(`\n4. Check your internet connection and try again`)
|
|
87
|
+
console.error(`\n5. If the issue persists, please report it at:`)
|
|
88
|
+
console.error(` https://github.com/Azure/azure-mcp/issues`)
|
|
89
|
+
console.error(`\nOriginal error: ${err.message}`)
|
|
90
|
+
console.error(`Install error: ${installErr.message}`)
|
|
91
|
+
process.exit(1)
|
|
92
|
+
}
|
|
38
93
|
}
|
|
39
94
|
|
|
40
95
|
platformPackage.runExecutable(process.argv.slice(2))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Azure MCP Server - Model Context Protocol implementation for Azure",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"homepage": "https://github.com/Azure/azure-mcp#readme",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "git+https://github.com/Azure/azure-mcp.git"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=22.0.0"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
24
24
|
"azmcp": "./index.js"
|
|
@@ -33,11 +33,14 @@
|
|
|
33
33
|
"arm64"
|
|
34
34
|
],
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@azure/mcp-
|
|
37
|
-
"@azure/mcp-
|
|
38
|
-
"@azure/mcp-
|
|
39
|
-
"@azure/mcp-
|
|
40
|
-
"@azure/mcp-
|
|
41
|
-
"@azure/mcp-win32-arm64": "0.
|
|
36
|
+
"@azure/mcp-linux-x64": "0.4.0",
|
|
37
|
+
"@azure/mcp-darwin-x64": "0.4.0",
|
|
38
|
+
"@azure/mcp-linux-arm64": "0.4.0",
|
|
39
|
+
"@azure/mcp-darwin-arm64": "0.4.0",
|
|
40
|
+
"@azure/mcp-win32-x64": "0.4.0",
|
|
41
|
+
"@azure/mcp-win32-arm64": "0.4.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"postinstall": "node ./scripts/post-install-script.js"
|
|
42
45
|
}
|
|
43
46
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
|
|
3
|
+
const platform = os.platform();
|
|
4
|
+
const arch = os.arch();
|
|
5
|
+
|
|
6
|
+
const requiredPackage = `@azure/mcp-${platform}-${arch}`;
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
require.resolve(requiredPackage);
|
|
10
|
+
} catch (err) {
|
|
11
|
+
console.error(`Missing required package: '${requiredPackage}'`);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|