@azure/mcp 2.0.0-beta.2 ā 2.0.0-beta.21
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 +105 -26
- package/index.js +27 -23
- package/package.json +11 -10
- package/scripts/post-install-script.js +8 -12
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# <img height="36" width="36" src="https://cdn-dynmedia-1.microsoft.com/is/content/microsoftcorp/acom_social_icon_azure" alt="Microsoft Azure Logo" /> Azure MCP Server NPM Package
|
|
2
2
|
|
|
3
|
-
All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP specification](https://modelcontextprotocol.io) to create a seamless connection between AI agents and Azure services. Azure MCP Server can be used alone or with the [GitHub Copilot for Azure extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot) in VS Code.
|
|
4
3
|
|
|
4
|
+
All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP specification](https://modelcontextprotocol.io) to create a seamless connection between AI agents and Azure services. Azure MCP Server can be used alone or with the [GitHub Copilot for Azure extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot) in VS Code.
|
|
5
5
|
## Table of Contents
|
|
6
6
|
- [Overview](#overview)
|
|
7
7
|
- [Installation](#installation)
|
|
@@ -33,7 +33,7 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
33
33
|
```json
|
|
34
34
|
{
|
|
35
35
|
"mcpServers": {
|
|
36
|
-
"
|
|
36
|
+
"Azure MCP Server": {
|
|
37
37
|
"command": "npx",
|
|
38
38
|
"args": [
|
|
39
39
|
"-y",
|
|
@@ -50,15 +50,23 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
50
50
|
**Client-Specific Configuration**
|
|
51
51
|
| IDE | File Location | Documentation Link |
|
|
52
52
|
|-----|---------------|-------------------|
|
|
53
|
-
| **
|
|
53
|
+
| **VS Code** | `.vscode/mcp.json` (workspace)<br>`settings.json` (user) | [VS Code MCP Documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) |
|
|
54
|
+
| **Visual Studio** | `.mcp.json` (solution/workspace) | [Visual Studio MCP Setup](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022) |
|
|
55
|
+
| **GitHub Copilot CLI** | `~/.copilot/mcp-config.json` | [Copilot CLI MCP Configuration](#github-copilot-cli-configuration) |
|
|
54
56
|
| **Claude Code** | `~/.claude.json` or `.mcp.json` (project) | [Claude Code MCP Configuration](https://scottspence.com/posts/configuring-mcp-tools-in-claude-code) |
|
|
55
|
-
| **Claude Desktop** | `~/.claude/claude_desktop_config.json` (macOS)<br>`%APPDATA%\Claude\claude_desktop_config.json` (Windows) | [Claude Desktop MCP Setup](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop) |
|
|
56
|
-
| **Cursor** | `~/.cursor/mcp.json` or `.cursor/mcp.json` | [Cursor MCP Documentation](https://docs.cursor.com/context/model-context-protocol) |
|
|
57
57
|
| **Eclipse IDE** | GitHub Copilot Chat -> Configure Tools -> MCP Servers | [Eclipse MCP Documentation](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp#configuring-mcp-servers-in-eclipse) |
|
|
58
58
|
| **IntelliJ IDEA** | Built-in MCP server (2025.2+)<br>Settings > Tools > MCP Server | [IntelliJ MCP Documentation](https://www.jetbrains.com/help/ai-assistant/mcp.html) |
|
|
59
|
-
| **
|
|
60
|
-
| **VS Code** | `.vscode/mcp.json` (workspace)<br>`settings.json` (user) | [VS Code MCP Documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) |
|
|
59
|
+
| **Cursor** | `~/.cursor/mcp.json` or `.cursor/mcp.json` | [Cursor MCP Documentation](https://docs.cursor.com/context/model-context-protocol) |
|
|
61
60
|
| **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | [Windsurf Cascade MCP Integration](https://docs.windsurf.com/windsurf/cascade/mcp) |
|
|
61
|
+
| **Amazon Q Developer** | `~/.aws/amazonq/mcp.json` (global)<br>`.amazonq/mcp.json` (workspace) | [AWS Q Developer MCP Guide](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html) |
|
|
62
|
+
| **Claude Desktop** | `~/.claude/claude_desktop_config.json` (macOS)<br>`%APPDATA%\Claude\claude_desktop_config.json` (Windows) | [Claude Desktop MCP Setup](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop) |
|
|
63
|
+
|
|
64
|
+
## Remote MCP Server (preview)
|
|
65
|
+
|
|
66
|
+
Microsoft Foundry and Microsoft Copilot Studio require remote MCP server endpoints. To self-host the Azure MCP Server for use with these platforms, deploy it as a remote MCP server on [Azure Container Apps](https://learn.microsoft.com/azure/container-apps/overview).
|
|
67
|
+
|
|
68
|
+
Check out the remote hosting [azd templates](https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/azd-templates/README.md) for deployment options.
|
|
69
|
+
|
|
62
70
|
|
|
63
71
|
# Usage
|
|
64
72
|
|
|
@@ -77,21 +85,25 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
77
85
|
|
|
78
86
|
⨠The Azure MCP Server supercharges your agents with Azure context. Here are some cool prompts you can try:
|
|
79
87
|
|
|
80
|
-
### š§®
|
|
88
|
+
### š§® Microsoft Foundry
|
|
81
89
|
|
|
82
|
-
* List
|
|
83
|
-
* Deploy
|
|
84
|
-
* List
|
|
90
|
+
* List Microsoft Foundry models
|
|
91
|
+
* Deploy Microsoft Foundry models
|
|
92
|
+
* List Microsoft Foundry model deployments
|
|
85
93
|
* List knowledge indexes
|
|
86
94
|
* Get knowledge index schema configuration
|
|
87
|
-
* Create
|
|
88
|
-
* List
|
|
89
|
-
* Connect and query
|
|
90
|
-
* Evaluate
|
|
91
|
-
* Get SDK samples for interacting with
|
|
92
|
-
* Create
|
|
93
|
-
* List
|
|
94
|
-
* Get messages of
|
|
95
|
+
* Create Microsoft Foundry agents
|
|
96
|
+
* List Microsoft Foundry agents
|
|
97
|
+
* Connect and query Microsoft Foundry agents
|
|
98
|
+
* Evaluate Microsoft Foundry agents
|
|
99
|
+
* Get SDK samples for interacting with Microsoft Foundry agent
|
|
100
|
+
* Create Microsoft Foundry agent threads
|
|
101
|
+
* List Microsoft Foundry agent threads
|
|
102
|
+
* Get messages of a Microsoft Foundry thread
|
|
103
|
+
|
|
104
|
+
### š Azure Advisor
|
|
105
|
+
|
|
106
|
+
* "List my Advisor recommendations"
|
|
95
107
|
|
|
96
108
|
### š Azure AI Search
|
|
97
109
|
|
|
@@ -104,6 +116,9 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
104
116
|
* "Recognize speech from my audio file with language detection"
|
|
105
117
|
* "Transcribe speech from audio with profanity filtering"
|
|
106
118
|
* "Transcribe audio with phrase hints for better accuracy"
|
|
119
|
+
* "Convert text to speech and save to output.wav"
|
|
120
|
+
* "Synthesize speech from 'Hello, welcome to Azure' with Spanish voice"
|
|
121
|
+
* "Generate MP3 audio from text with high quality format"
|
|
107
122
|
|
|
108
123
|
### āļø Azure App Configuration
|
|
109
124
|
|
|
@@ -141,7 +156,19 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
141
156
|
* "Send an email from my communication service endpoint with custom sender name and multiple recipients"
|
|
142
157
|
* "Send an email to 'user1@example.com' and 'user2@example.com' with subject 'Team Update' and message 'Please review the attached document.'"
|
|
143
158
|
|
|
144
|
-
###
|
|
159
|
+
### š„ļø Azure Compute
|
|
160
|
+
|
|
161
|
+
* "List all my managed disks in subscription 'my-subscription'"
|
|
162
|
+
* "Show me all disks in resource group 'my-resource-group'"
|
|
163
|
+
* "Get details of disk 'my-disk' in resource group 'my-resource-group'"
|
|
164
|
+
* "List all virtual machines in my subscription"
|
|
165
|
+
* "Show me all VMs in resource group 'my-resource-group'"
|
|
166
|
+
* "Get details for virtual machine 'my-vm' in resource group 'my-resource-group'"
|
|
167
|
+
* "Get virtual machine 'my-vm' with instance view including power state and runtime status"
|
|
168
|
+
* "Show me the power state and provisioning status of VM 'my-vm'"
|
|
169
|
+
* "What is the current status of my virtual machine 'my-vm'?"
|
|
170
|
+
|
|
171
|
+
### ļæ½š¦ Azure Container Apps
|
|
145
172
|
|
|
146
173
|
* "List the container apps in my subscription"
|
|
147
174
|
* "Show me the container apps in my 'my-resource-group' resource group"
|
|
@@ -179,6 +206,26 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
179
206
|
* "Publish an event with data '{\"name\": \"test\"}' to topic 'my-topic' using CloudEvents schema"
|
|
180
207
|
* "Send custom event data to Event Grid topic 'analytics-events' with EventGrid schema"
|
|
181
208
|
|
|
209
|
+
### š Azure File Shares
|
|
210
|
+
|
|
211
|
+
* "Get details about a specific file share in my resource group"
|
|
212
|
+
* "Create a new Azure managed file share with NFS protocol"
|
|
213
|
+
* "Create a file share with 64 GiB storage, 3000 IOPS, and 125 MiB/s throughput"
|
|
214
|
+
* "Update the provisioned storage size of my file share"
|
|
215
|
+
* "Update network access settings for my file share"
|
|
216
|
+
* "Delete a file share from my resource group"
|
|
217
|
+
* "Check if a file share name is available"
|
|
218
|
+
* "Get details about a file share snapshot"
|
|
219
|
+
* "Create a snapshot of my file share"
|
|
220
|
+
* "Update tags on a file share snapshot"
|
|
221
|
+
* "Delete a file share snapshot"
|
|
222
|
+
* "Get a private endpoint connection for my file share"
|
|
223
|
+
* "Update private endpoint connection status to Approved"
|
|
224
|
+
* "Delete a private endpoint connection"
|
|
225
|
+
* "Get file share limits and quotas for a region"
|
|
226
|
+
* "Get provisioning recommendations for my file share workload"
|
|
227
|
+
* "Get usage data and metrics for my file share"
|
|
228
|
+
|
|
182
229
|
### š Azure Key Vault
|
|
183
230
|
|
|
184
231
|
* "List all secrets in my key vault 'my-vault'"
|
|
@@ -238,20 +285,27 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
238
285
|
* "Get details about my Storage container"
|
|
239
286
|
* "Upload my file to the blob container"
|
|
240
287
|
|
|
288
|
+
### š Azure Migrate
|
|
289
|
+
|
|
290
|
+
* "Generate a Platform Landing Zone"
|
|
291
|
+
* "Turn off DDoS protection in my Platform Landing Zone"
|
|
292
|
+
* "Turn off Bastion host in my Platform Landing Zone"
|
|
241
293
|
|
|
242
294
|
## Complete List of Supported Azure Services
|
|
243
295
|
|
|
244
|
-
The Azure MCP Server provides tools for interacting with **
|
|
296
|
+
The Azure MCP Server provides tools for interacting with **42+ Azure service areas**:
|
|
245
297
|
|
|
246
|
-
- š§® **
|
|
298
|
+
- š§® **Microsoft Foundry** - AI model management, AI model deployment, and knowledge index management
|
|
299
|
+
- š **Azure Advisor** - Advisor recommendations
|
|
247
300
|
- š **Azure AI Search** - Search engine/vector database operations
|
|
248
|
-
- š¤ **Azure AI Services Speech** - Speech-to-text recognition
|
|
301
|
+
- š¤ **Azure AI Services Speech** - Speech-to-text recognition and text-to-speech synthesis
|
|
249
302
|
- āļø **Azure App Configuration** - Configuration management
|
|
250
303
|
- šøļø **Azure App Service** - Web app hosting
|
|
251
304
|
- š”ļø **Azure Best Practices** - Secure, production-grade guidance
|
|
252
305
|
- š„ļø **Azure CLI Generate** - Generate Azure CLI commands from natural language
|
|
253
306
|
- š **Azure Communication Services** - SMS messaging and communication
|
|
254
|
-
-
|
|
307
|
+
- ļæ½ **Azure Compute** - Virtual Machine, Virtual Machine Scale Set, and Disk management
|
|
308
|
+
- ļæ½š **Azure Confidential Ledger** - Tamper-proof ledger operations
|
|
255
309
|
- š¦ **Azure Container Apps** - Container hosting
|
|
256
310
|
- š¦ **Azure Container Registry (ACR)** - Container registry management
|
|
257
311
|
- š **Azure Cosmos DB** - NoSQL database operations
|
|
@@ -259,6 +313,7 @@ The Azure MCP Server provides tools for interacting with **40+ Azure service are
|
|
|
259
313
|
- š¬ **Azure Database for MySQL** - MySQL database management
|
|
260
314
|
- š **Azure Database for PostgreSQL** - PostgreSQL database management
|
|
261
315
|
- š **Azure Event Grid** - Event routing and management
|
|
316
|
+
- ļæ½ **Azure File Shares** - Azure managed file share operations
|
|
262
317
|
- ā” **Azure Functions** - Function App management
|
|
263
318
|
- š **Azure Key Vault** - Secrets, keys, and certificates
|
|
264
319
|
- āøļø **Azure Kubernetes Service (AKS)** - Container orchestration
|
|
@@ -266,7 +321,9 @@ The Azure MCP Server provides tools for interacting with **40+ Azure service are
|
|
|
266
321
|
- š **Azure Managed Grafana** - Monitoring dashboards
|
|
267
322
|
- šļø **Azure Managed Lustre** - High-performance Lustre filesystem operations
|
|
268
323
|
- šŖ **Azure Marketplace** - Product discovery
|
|
324
|
+
- š **Azure Migrate** - Platform Landing Zone generation and modification guidance
|
|
269
325
|
- š **Azure Monitor** - Logging, metrics, and health monitoring
|
|
326
|
+
- āļø **Azure Policy** - Policies set to enforce organizational standards
|
|
270
327
|
- āļø **Azure Native ISV Services** - Third-party integrations
|
|
271
328
|
- š”ļø **Azure Quick Review CLI** - Compliance scanning
|
|
272
329
|
- š **Azure Quota** - Resource quota and usage management
|
|
@@ -274,11 +331,13 @@ The Azure MCP Server provides tools for interacting with **40+ Azure service are
|
|
|
274
331
|
- š“ **Azure Redis Cache** - In-memory data store
|
|
275
332
|
- šļø **Azure Resource Groups** - Resource organization
|
|
276
333
|
- š **Azure Service Bus** - Message queuing
|
|
334
|
+
- š§µ **Azure Service Fabric** - Managed cluster node operations
|
|
277
335
|
- š„ **Azure Service Health** - Resource health status and availability
|
|
278
336
|
- šļø **Azure SQL Database** - Relational database management
|
|
279
337
|
- šļø **Azure SQL Elastic Pool** - Database resource sharing
|
|
280
338
|
- šļø **Azure SQL Server** - Server administration
|
|
281
339
|
- š¾ **Azure Storage** - Blob storage
|
|
340
|
+
- **Azure Storage Sync** - Azure File Sync management operations
|
|
282
341
|
- š **Azure Subscription** - Subscription management
|
|
283
342
|
- šļø **Azure Terraform Best Practices** - Infrastructure as code guidance
|
|
284
343
|
- š„ļø **Azure Virtual Desktop** - Virtual desktop infrastructure
|
|
@@ -292,10 +351,12 @@ The Azure MCP Server provides tools for interacting with **40+ Azure service are
|
|
|
292
351
|
|
|
293
352
|
- See our [official documentation on learn.microsoft.com](https://learn.microsoft.com/azure/developer/azure-mcp-server/) to learn how to use the Azure MCP Server to interact with Azure resources through natural language commands from AI agents and other types of clients.
|
|
294
353
|
- For additional command documentation and examples, see [Azure MCP Commands](https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/docs/azmcp-commands.md).
|
|
354
|
+
- Use [Prompt Templates](https://github.com/microsoft/mcp/blob/main/docs/prompt-templates.md) to set tenant and subscription context once at the beginning of your Copilot session, avoiding repetitive information in subsequent prompts.
|
|
295
355
|
|
|
296
356
|
## Feedback and Support
|
|
297
357
|
|
|
298
358
|
- Check the [Troubleshooting guide](https://aka.ms/azmcp/troubleshooting) to diagnose and resolve common issues with the Azure MCP Server.
|
|
359
|
+
- For advanced troubleshooting, you can enable [support logging](https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/TROUBLESHOOTING.md#support-logging) using the `--dangerously-write-support-logs-to-dir` option.
|
|
299
360
|
- We're building this in the open. Your feedback is much appreciated, and will help us shape the future of the Azure MCP server.
|
|
300
361
|
- š [Open an issue](https://github.com/microsoft/mcp/issues) in the public GitHub repository ā weād love to hear from you!
|
|
301
362
|
|
|
@@ -317,9 +378,27 @@ The software may collect information about you and your use of the software and
|
|
|
317
378
|
|
|
318
379
|
### Telemetry Configuration
|
|
319
380
|
|
|
320
|
-
Telemetry collection is on by default.
|
|
381
|
+
Telemetry collection is on by default. The server supports two telemetry streams:
|
|
382
|
+
|
|
383
|
+
1. **User-provided telemetry**: If you configure your own Application Insights connection string via the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable, telemetry will be sent to your Application Insights resource.
|
|
384
|
+
|
|
385
|
+
2. **Microsoft telemetry**: By default, telemetry is also sent to Microsoft to help improve the product. This can be disabled separately from user-provided telemetry. See [Disabling All Telemetry](#disabling-all-telemetry) section below for more details.
|
|
386
|
+
|
|
387
|
+
#### Disabling All Telemetry
|
|
388
|
+
|
|
389
|
+
To disable all telemetry collection (both user-provided and Microsoft), set the environment variable `AZURE_MCP_COLLECT_TELEMETRY` to `false`:
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
export AZURE_MCP_COLLECT_TELEMETRY=false
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
#### Disabling Microsoft Telemetry Only
|
|
396
|
+
|
|
397
|
+
To disable only Microsoft telemetry collection while keeping your own Application Insights telemetry active, set the environment variable `AZURE_MCP_COLLECT_TELEMETRY_MICROSOFT` to `false`:
|
|
321
398
|
|
|
322
|
-
|
|
399
|
+
```bash
|
|
400
|
+
export AZURE_MCP_COLLECT_TELEMETRY_MICROSOFT=false
|
|
401
|
+
```
|
|
323
402
|
|
|
324
403
|
## Compliance Responsibility
|
|
325
404
|
|
package/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const os = require('os')
|
|
4
|
+
const packageJson = require('./package.json')
|
|
4
5
|
|
|
5
6
|
// Check if DEBUG environment variable is set
|
|
6
7
|
const isDebugMode = process.env.DEBUG && (
|
|
7
8
|
process.env.DEBUG.toLowerCase() === 'true' ||
|
|
8
|
-
process.env.DEBUG.includes('
|
|
9
|
+
process.env.DEBUG.includes('mcp') ||
|
|
9
10
|
process.env.DEBUG === '*'
|
|
10
11
|
)
|
|
11
12
|
|
|
@@ -25,7 +26,9 @@ process.argv.forEach((val, index) => {
|
|
|
25
26
|
const platform = os.platform()
|
|
26
27
|
const arch = os.arch()
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
+
const packageName = packageJson.name
|
|
30
|
+
const packageVersion = packageJson.version
|
|
31
|
+
const platformPackageName = `${packageName}-${platform}-${arch}`
|
|
29
32
|
|
|
30
33
|
// Try to load the platform package
|
|
31
34
|
let platformPackage
|
|
@@ -34,58 +37,59 @@ try {
|
|
|
34
37
|
platformPackage = require(platformPackageName)
|
|
35
38
|
} catch (err) {
|
|
36
39
|
debugLog(`Failed to require ${platformPackageName}, attempting auto-install: ${err.message}`)
|
|
37
|
-
|
|
40
|
+
|
|
38
41
|
// Try to automatically install the missing platform package
|
|
39
42
|
try {
|
|
40
43
|
const { execSync } = require('child_process')
|
|
41
|
-
|
|
44
|
+
|
|
42
45
|
console.error(`Installing missing platform package: ${platformPackageName}`)
|
|
43
|
-
|
|
46
|
+
|
|
44
47
|
// Try to install the platform package
|
|
45
48
|
try {
|
|
46
|
-
execSync(`npm install ${platformPackageName}
|
|
49
|
+
execSync(`npm install ${platformPackageName}@${packageVersion}`, {
|
|
47
50
|
stdio: ['inherit', 'inherit', 'pipe'], // Only pipe stderr to capture errors
|
|
48
51
|
timeout: 60000 // 60 second timeout
|
|
49
52
|
})
|
|
50
53
|
} catch (npmErr) {
|
|
51
54
|
// If npm install fails, try with --no-save and different install strategies
|
|
52
55
|
debugLog(`npm install failed, trying alternative installation methods: ${npmErr.message}`)
|
|
53
|
-
|
|
56
|
+
|
|
54
57
|
// Try with --no-save and --prefer-online
|
|
55
|
-
execSync(`npm install ${platformPackageName}
|
|
58
|
+
execSync(`npm install ${platformPackageName}@${packageVersion} --no-save --prefer-online`, {
|
|
56
59
|
stdio: ['inherit', 'inherit', 'pipe'],
|
|
57
60
|
timeout: 60000
|
|
58
61
|
})
|
|
59
62
|
}
|
|
60
|
-
|
|
63
|
+
|
|
61
64
|
// Clear module cache and try to require again after installation
|
|
62
65
|
Object.keys(require.cache).forEach(key => {
|
|
63
66
|
if (key.includes(platformPackageName)) {
|
|
64
67
|
delete require.cache[key]
|
|
65
68
|
}
|
|
66
69
|
})
|
|
67
|
-
|
|
70
|
+
|
|
68
71
|
platformPackage = require(platformPackageName)
|
|
69
|
-
|
|
72
|
+
|
|
70
73
|
console.error(`ā
Successfully installed and loaded ${platformPackageName}`)
|
|
71
|
-
|
|
74
|
+
|
|
72
75
|
} catch (installErr) {
|
|
73
76
|
debugLog(`Auto-install failed: ${installErr.message}`)
|
|
74
|
-
|
|
77
|
+
|
|
75
78
|
console.error(`\nā Failed to load platform specific package '${platformPackageName}'`)
|
|
76
79
|
console.error(`\nš Troubleshooting steps:`)
|
|
77
|
-
console.error(`\n1. Clear npm cache
|
|
80
|
+
console.error(`\n1. Clear npm cache:`)
|
|
78
81
|
console.error(` npm cache clean --force`)
|
|
79
|
-
console.error(
|
|
80
|
-
console.error(` npm
|
|
81
|
-
console.error(
|
|
82
|
-
console.error(
|
|
83
|
-
console.error(` npx -y
|
|
84
|
-
console.error(
|
|
82
|
+
console.error(`\n2. If installing as a global tool, uninstall and reinstall:`)
|
|
83
|
+
console.error(` npm uninstall -g ${packageName}`)
|
|
84
|
+
console.error(` npm install -g ${packageName}`)
|
|
85
|
+
console.error(`\n3. If using npx, clear the npx cache and try again:`)
|
|
86
|
+
console.error(` npx -y clear-npx-cache`)
|
|
87
|
+
console.error(` npx -y ${packageName}@latest --version`)
|
|
88
|
+
console.error(`\n4. Manually install the platform package to check compatibility:`)
|
|
85
89
|
console.error(` npm install ${platformPackageName}@latest`)
|
|
86
|
-
console.error(`\
|
|
87
|
-
console.error(`\
|
|
88
|
-
console.error(` https://github.com/
|
|
90
|
+
console.error(`\n5. Check your internet connection and try again`)
|
|
91
|
+
console.error(`\n6. If the issue persists, please report it at:`)
|
|
92
|
+
console.error(` https://github.com/microsoft/mcp/issues`)
|
|
89
93
|
console.error(`\nOriginal error: ${err.message}`)
|
|
90
94
|
console.error(`Install error: ${installErr.message}`)
|
|
91
95
|
process.exit(1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/mcp",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.21",
|
|
4
4
|
"description": "Azure MCP Server - Model Context Protocol implementation for Azure",
|
|
5
5
|
"author": "Microsoft",
|
|
6
6
|
"homepage": "https://github.com/Microsoft/mcp/blob/main/servers/Azure.Mcp.Server#readme",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"url": "https://github.com/microsoft/mcp/issues"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"url": "https://github.com/microsoft/mcp.git",
|
|
18
|
+
"type": "git"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=20.0.0"
|
|
@@ -33,14 +33,15 @@
|
|
|
33
33
|
"arm64"
|
|
34
34
|
],
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@azure/mcp-darwin-
|
|
37
|
-
"@azure/mcp-
|
|
38
|
-
"@azure/mcp-linux-arm64": "2.0.0-beta.
|
|
39
|
-
"@azure/mcp-
|
|
40
|
-
"@azure/mcp-
|
|
41
|
-
"@azure/mcp-
|
|
36
|
+
"@azure/mcp-darwin-arm64": "2.0.0-beta.21",
|
|
37
|
+
"@azure/mcp-win32-x64": "2.0.0-beta.21",
|
|
38
|
+
"@azure/mcp-linux-arm64": "2.0.0-beta.21",
|
|
39
|
+
"@azure/mcp-darwin-x64": "2.0.0-beta.21",
|
|
40
|
+
"@azure/mcp-win32-arm64": "2.0.0-beta.21",
|
|
41
|
+
"@azure/mcp-linux-x64": "2.0.0-beta.21"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"postinstall": "node ./scripts/post-install-script.js"
|
|
45
|
-
}
|
|
45
|
+
},
|
|
46
|
+
"mcpName": "com.microsoft/azure"
|
|
46
47
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
const fs = require('fs')
|
|
2
|
-
const path = require('path')
|
|
3
1
|
const os = require('os');
|
|
4
2
|
|
|
5
3
|
const platform = os.platform();
|
|
6
4
|
const arch = os.arch();
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// fallback to default
|
|
6
|
+
let baseName = '';
|
|
7
|
+
try{
|
|
8
|
+
const packageJson = require('../package.json');
|
|
9
|
+
baseName = packageJson.name;
|
|
10
|
+
}
|
|
11
|
+
catch (err) {
|
|
12
|
+
console.error('Unable to verify platform package installation. Error reading package.json.');
|
|
13
|
+
process.exit(1);
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
const requiredPackage = `${baseName}-${platform}-${arch}`;
|
|
20
|
-
|
|
21
17
|
try {
|
|
22
18
|
require.resolve(requiredPackage);
|
|
23
19
|
} catch (err) {
|