@azure/mcp 0.3.2 ā 0.4.1
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 +46 -39
- package/index.js +57 -2
- package/package.json +11 -8
- package/scripts/post-install-script.js +13 -0
package/README.md
CHANGED
|
@@ -11,33 +11,35 @@ Here's a short (16 seconds) video to help you get the Azure MCP Server installed
|
|
|
11
11
|
* [š® Insiders release](https://code.visualstudio.com/insiders)
|
|
12
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
13
|
1. Install [Node.js](https://nodejs.org/en/download) 20 or later
|
|
14
|
-
* Ensure `npx` is your path
|
|
14
|
+
* Ensure `npx` is included in your environment path.
|
|
15
15
|
1. Install any of the available Azure MCP Servers from the table below.
|
|
16
16
|
1. Open GitHub Copilot in VS Code and [switch to Agent mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)
|
|
17
17
|
1. Click `refresh` on the tools list.
|
|
18
18
|
|
|
19
19
|
#### š¤ Available Azure MCP Servers
|
|
20
20
|
|
|
21
|
-
| Name | Description
|
|
22
|
-
|
|
23
|
-
| All | All Azure MCP tools in a single server.
|
|
21
|
+
| Name | Description | Read/Write Tools | Read Only Tools |
|
|
22
|
+
|--------------|--------------------------------------------------|-----------|-----------|
|
|
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) |
|
|
24
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) |
|
|
25
|
-
| Azure Data Explorer | Query and manage clusters and databases.
|
|
26
|
-
| Best Practices | Secure, production-grade Azure SDK guidance.
|
|
27
|
-
| Cosmos DB | Manage NoSQL databases and containers.
|
|
28
|
-
| Foundry | Manage AI model deployments and foundations.
|
|
29
|
-
| Grafana | Monitor dashboards and analytics visualization.
|
|
30
|
-
| Key Vault | Manage secrets, keys, and certificates.
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
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
|
+
| Marketplace | Query Azure Marketplace products. | [](https://insiders.vscode.dev/redirect/mcp/install?name=Azure%20Marketplace&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--service%22%2C%22marketplace%22%5D%7D) | [](https://vscode.dev/redirect/mcp/install?name=Azure%20Marketplace%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--service%22%2C%22marketplace%22%2C%22--read-only%22%5D%7D) |
|
|
33
|
+
| 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) |
|
|
34
|
+
| 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) |
|
|
35
|
+
| 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) |
|
|
36
|
+
| 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) |
|
|
37
|
+
| 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) |
|
|
38
|
+
| 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) |
|
|
39
|
+
| 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) |
|
|
40
|
+
| 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) |
|
|
41
|
+
| 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) |
|
|
42
|
+
| 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
43
|
|
|
42
44
|
### ā¶ļø Getting Started
|
|
43
45
|
1. Open GitHub Copilot in VS Code and [switch to Agent mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)
|
|
@@ -57,6 +59,10 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
57
59
|
### āļø Azure App Configuration
|
|
58
60
|
- "List my App Configuration stores"
|
|
59
61
|
|
|
62
|
+
### āøļø Azure Kubernetes Service (AKS)
|
|
63
|
+
- "List my AKS clusters in my subscription"
|
|
64
|
+
- "Show me all my Azure Kubernetes Service clusters"
|
|
65
|
+
|
|
60
66
|
### š Azure Cosmos DB
|
|
61
67
|
- "Show me all my Cosmos DB databases"
|
|
62
68
|
- "List containers in my Cosmos DB database"
|
|
@@ -71,11 +77,14 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
71
77
|
### ļæ½ļø Azure SQL Database
|
|
72
78
|
- "Show me details about my Azure SQL database 'mydb'"
|
|
73
79
|
- "List Active Directory administrators for my SQL server 'myserver'"
|
|
80
|
+
- "List all firewall rules for my SQL server 'myserver'"
|
|
81
|
+
- "List all elastic pools in my SQL server 'myserver'"
|
|
74
82
|
|
|
75
|
-
### š¾ Azure Storage
|
|
83
|
+
### š¾ Azure Storage
|
|
76
84
|
- "List my Azure storage accounts"
|
|
77
85
|
- "Show me the tables in my Storage account"
|
|
78
86
|
- "Get details about my Storage container"
|
|
87
|
+
- "List paths in my Data Lake file system"
|
|
79
88
|
- "Show my key-value pairs in App Config"
|
|
80
89
|
|
|
81
90
|
### š§ Azure Resource Management
|
|
@@ -99,7 +108,7 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
99
108
|
- Handle labeled configurations
|
|
100
109
|
- Lock/unlock configuration settings
|
|
101
110
|
|
|
102
|
-
###
|
|
111
|
+
### š„ļø Azure CLI Extension
|
|
103
112
|
- Execute Azure CLI commands directly
|
|
104
113
|
- Support for all Azure CLI functionality
|
|
105
114
|
- JSON output formatting
|
|
@@ -156,9 +165,15 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
156
165
|
### āļø Azure Native ISV Services
|
|
157
166
|
- List Monitored Resources in a Datadog Monitor
|
|
158
167
|
|
|
168
|
+
### Azure Quick Review CLI Extension
|
|
169
|
+
- Scan Azure resources for compliance related recommendations
|
|
170
|
+
|
|
159
171
|
### ļæ½ Azure Resource Groups
|
|
160
172
|
- List resource groups
|
|
161
173
|
|
|
174
|
+
### šŖ Azure Marketplace
|
|
175
|
+
- Get details about Marketplace products
|
|
176
|
+
|
|
162
177
|
### š Azure Role-Based Access Control (RBAC)
|
|
163
178
|
- List role assignments
|
|
164
179
|
|
|
@@ -167,13 +182,21 @@ The Azure MCP Server supercharges your agents with Azure context. Here are some
|
|
|
167
182
|
|
|
168
183
|
### šļø Azure SQL Database
|
|
169
184
|
- Show database details and properties
|
|
185
|
+
- List SQL server firewall rules
|
|
186
|
+
- List elastic pools and their configurations
|
|
170
187
|
|
|
171
188
|
### ļæ½ Azure Storage
|
|
172
189
|
- List Storage accounts
|
|
173
190
|
- Manage blob containers and blobs
|
|
174
191
|
- List and query Storage tables
|
|
192
|
+
- List paths in Data Lake file systems
|
|
175
193
|
- Get container properties and metadata
|
|
176
194
|
|
|
195
|
+
### š¦ Azure Load Testing
|
|
196
|
+
- List, create load test resources
|
|
197
|
+
- List, create load tests
|
|
198
|
+
- Get, list, (create) run and rerun, update load test runs
|
|
199
|
+
|
|
177
200
|
Agents and models can discover and learn best practices and usage guidelines for the `azd` MCP tool. For more information, see [AZD Best Practices](https://github.com/Azure/azure-mcp/tree/main/src/Areas/Extension/Resources/azd-best-practices.txt).
|
|
178
201
|
|
|
179
202
|
### š”ļø Azure Best Practices
|
|
@@ -241,7 +264,7 @@ AZURE_CLIENT_SECRET={YOUR_AZURE_CLIENT_SECRET}
|
|
|
241
264
|
Optionally, customers can use `--env` or `--volume` to pass authentication values.
|
|
242
265
|
|
|
243
266
|
#### š¤ Custom MCP Client Install Steps (Optional)
|
|
244
|
-
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
|
|
267
|
+
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.
|
|
245
268
|
|
|
246
269
|
#### š§ Manual Install Steps (Optional)
|
|
247
270
|
For a step-by-step installation, follow these instructions:
|
|
@@ -288,22 +311,6 @@ You can optionally set the `--namespace <namespace>` flag to install tools for t
|
|
|
288
311
|
|
|
289
312
|
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).
|
|
290
313
|
|
|
291
|
-
### Using SSE
|
|
292
|
-
|
|
293
|
-
1. Open a terminal window and execute: `npx -y @azure/mcp@latest server start --transport sse`
|
|
294
|
-
2. The server starts up and is hosted at: http://localhost:5008. To use another port, append `--port {YOUR-PORT-NUMBER}`.
|
|
295
|
-
3. Open your MCP client and add the SSE configuration value. This may differ between MCP clients. In VS Code, it will look like:
|
|
296
|
-
```json
|
|
297
|
-
{
|
|
298
|
-
"servers": {
|
|
299
|
-
"Azure MCP Server": {
|
|
300
|
-
"type": "sse",
|
|
301
|
-
"url": "http://localhost:5008/sse"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
```
|
|
306
|
-
|
|
307
314
|
More end-to-end MCP client/agent guides are coming soon!
|
|
308
315
|
</details>
|
|
309
316
|
|
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.1",
|
|
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": ">=20.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.1",
|
|
37
|
+
"@azure/mcp-darwin-x64": "0.4.1",
|
|
38
|
+
"@azure/mcp-linux-arm64": "0.4.1",
|
|
39
|
+
"@azure/mcp-darwin-arm64": "0.4.1",
|
|
40
|
+
"@azure/mcp-win32-x64": "0.4.1",
|
|
41
|
+
"@azure/mcp-win32-arm64": "0.4.1"
|
|
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
|
+
}
|