@azure/mcp 2.0.0-beta.2 → 2.0.0-beta.3
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 +5 -1
- package/index.js +27 -23
- package/package.json +7 -7
- package/scripts/post-install-script.js +8 -12
package/README.md
CHANGED
|
@@ -104,6 +104,9 @@ All Azure MCP tools in a single server. The Azure MCP Server implements the [MCP
|
|
|
104
104
|
* "Recognize speech from my audio file with language detection"
|
|
105
105
|
* "Transcribe speech from audio with profanity filtering"
|
|
106
106
|
* "Transcribe audio with phrase hints for better accuracy"
|
|
107
|
+
* "Convert text to speech and save to output.wav"
|
|
108
|
+
* "Synthesize speech from 'Hello, welcome to Azure' with Spanish voice"
|
|
109
|
+
* "Generate MP3 audio from text with high quality format"
|
|
107
110
|
|
|
108
111
|
### ⚙️ Azure App Configuration
|
|
109
112
|
|
|
@@ -245,7 +248,8 @@ The Azure MCP Server provides tools for interacting with **40+ Azure service are
|
|
|
245
248
|
|
|
246
249
|
- 🧮 **Azure AI Foundry** - AI model management, AI model deployment, and knowledge index management
|
|
247
250
|
- 🔎 **Azure AI Search** - Search engine/vector database operations
|
|
248
|
-
- 🎤 **Azure AI Services Speech** - Speech-to-text recognition
|
|
251
|
+
- 🎤 **Azure AI Services Speech** - Speech-to-text recognition and text-to-speech synthesis
|
|
252
|
+
- 🤖 **Azure AI Best Practices** - AI app development guidance for Azure AI Foundry and Microsoft Agent Framework
|
|
249
253
|
- ⚙️ **Azure App Configuration** - Configuration management
|
|
250
254
|
- 🕸️ **Azure App Service** - Web app hosting
|
|
251
255
|
- 🛡️ **Azure Best Practices** - Secure, production-grade guidance
|
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.3",
|
|
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",
|
|
@@ -33,12 +33,12 @@
|
|
|
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-
|
|
36
|
+
"@azure/mcp-linux-x64": "2.0.0-beta.3",
|
|
37
|
+
"@azure/mcp-win32-x64": "2.0.0-beta.3",
|
|
38
|
+
"@azure/mcp-darwin-x64": "2.0.0-beta.3",
|
|
39
|
+
"@azure/mcp-linux-arm64": "2.0.0-beta.3",
|
|
40
|
+
"@azure/mcp-darwin-arm64": "2.0.0-beta.3",
|
|
41
|
+
"@azure/mcp-win32-arm64": "2.0.0-beta.3"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"postinstall": "node ./scripts/post-install-script.js"
|
|
@@ -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) {
|