mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-11-09 17:06:13 -06:00
fix(mcp): use bin wrapper to fix npx permission denied (#9536)
Fix npx @xen-orchestra/mcp failing with "Permission denied". tsc does not preserve the executable bit on compiled files, so bin pointing to ./dist/index.mjs (mode 644) caused the error. This adds a bin/xo-mcp.mjs wrapper tracked by git with mode 755, following the same pattern as other packages (@xen-orchestra/xapi, @xen-orchestra/proxy, etc.).
This commit is contained in:
8
@xen-orchestra/mcp/bin/xo-mcp.mjs
Executable file
8
@xen-orchestra/mcp/bin/xo-mcp.mjs
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { main } from '../dist/index.mjs'
|
||||
|
||||
main().catch(error => {
|
||||
console.error('Fatal error:', error instanceof Error ? error.message : error)
|
||||
process.exitCode = 1
|
||||
})
|
||||
@@ -6,7 +6,7 @@
|
||||
"type": "module",
|
||||
"main": "./dist/index.mjs",
|
||||
"bin": {
|
||||
"xo-mcp": "./dist/index.mjs"
|
||||
"xo-mcp": "./bin/xo-mcp.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
||||
@@ -427,7 +427,7 @@ Present this information in a friendly, conversational way.`,
|
||||
// =============================================================================
|
||||
// Start server
|
||||
// =============================================================================
|
||||
async function main() {
|
||||
export async function main() {
|
||||
const env = validateEnv()
|
||||
|
||||
let xoClient: XoClient | null = null
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [MCP] Fix `npx @xen-orchestra/mcp` failing with “Permission denied” (PR [#9536](https://github.com/vatesfr/xen-orchestra/pull/9536))
|
||||
|
||||
### Packages to release
|
||||
|
||||
> When modifying a package, add it here with its release type.
|
||||
@@ -33,6 +35,7 @@
|
||||
|
||||
<!--packages-start-->
|
||||
|
||||
- @xen-orchestra/mcp patch
|
||||
- @xen-orchestra/web minor
|
||||
- @xen-orchestra/web-core minor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user