dotnet-ai-mcp-server 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/bin/cli.js +8 -11
  2. package/package.json +3 -3
package/bin/cli.js CHANGED
@@ -43,25 +43,22 @@ async function installTool() {
43
43
  }
44
44
 
45
45
  async function runTool() {
46
- // On Windows, the tool might be in a different location
47
46
  const isWindows = os.platform() === 'win32';
48
47
  const toolPath = isWindows
49
48
  ? join(os.homedir(), '.dotnet', 'tools', `${TOOL_NAME}.exe`)
50
49
  : join(os.homedir(), '.dotnet', 'tools', TOOL_NAME);
51
50
 
52
- // Try running the tool directly first
53
- const proc = spawn(TOOL_NAME, [], {
51
+ // Always use full path for reliability
52
+ const proc = spawn(toolPath, [], {
54
53
  stdio: 'inherit',
55
- shell: isWindows
54
+ shell: false
56
55
  });
57
56
 
58
- proc.on('error', () => {
59
- // If direct execution fails, try the full path
60
- const proc2 = spawn(toolPath, [], { stdio: 'inherit' });
61
- proc2.on('error', (err) => {
62
- console.error(`Error running ${TOOL_NAME}: ${err.message}`);
63
- process.exit(1);
64
- });
57
+ proc.on('error', (err) => {
58
+ console.error(`Error running ${TOOL_NAME}: ${err.message}`);
59
+ console.error(`Tried path: ${toolPath}`);
60
+ console.error('Make sure the dotnet tool is installed: dotnet tool install -g DotNetAIMcpServer');
61
+ process.exit(1);
65
62
  });
66
63
 
67
64
  proc.on('close', (code) => {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "dotnet-ai-mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "MCP Server for .NET AI development - provides real code samples from Semantic Kernel, OpenAI .NET, MCP C# SDK, and more",
5
5
  "bin": {
6
- "dotnet-ai-mcp-server": "./bin/cli.js"
6
+ "dotnet-ai-mcp-server": "bin/cli.js"
7
7
  },
8
8
  "scripts": {
9
9
  "postinstall": "node ./scripts/postinstall.js"
@@ -23,7 +23,7 @@
23
23
  "license": "MIT",
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "https://github.com/ArbelH/dotnet-ai-mcp-server"
26
+ "url": "git+https://github.com/ArbelH/dotnet-ai-mcp-server.git"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=16.0.0"