Skip to content

MCP Servers cannot start altool #8363

Open

Description

@ChristianFeitl

1. Describe the bug

The Business Central Profiling MCP Server fails to start in VS Code with the following error:

Error: spawn altool ENOENT

The AL Language extension is installed and altool.exe is present in the extension's bin folder.

The issue appears to occur because the MCP server resolves altool through the system PATH instead of using the AL extension installation directory.

Adding the AL extension's bin directory to PATH resolves the issue immediately.


2. To Reproduce

Steps to reproduce the behavior:

  1. Install the latest AL Language extension.
  2. Ensure altool.exe is not available through the system PATH.
  3. Open Visual Studio Code.
  4. Start the Business Central Profiling MCP Server.

Example installation location:

C:\Users<user>.vscode\extensions\ms-dynamics-smb.al-\bin\altool.exe

Observed output:

Starting server Business Central Profiling MCP Server
Connection state: Starting
Starting server from LocalProcess extension host
Connection state: Starting
Connection state: Error spawn altool ENOENT

Workaround:

Add the AL extension's bin directory to PATH.

Restart Visual Studio Code.

The Profiling MCP Server then starts successfully.

No AL code is required to reproduce the issue.


3. Expected behavior

The Business Central Profiling MCP Server should start successfully whenever the AL Language extension is installed.

The server should locate and launch the bundled altool.exe from the installed AL extension rather than depending on the executable being available through the system PATH.


4. Actual behavior

The Profiling MCP Server fails to start with:

Error: spawn altool ENOENT

even though altool.exe is present in the installed AL extension.

The issue disappears immediately after adding the AL extension's bin folder to PATH.

Log excerpt:

2026-10-21 09:31:41.196 [info] Connection state: Error spawn altool ENOENT

Additional information:

The issue was reproduced on a clean AL-only VS Code setup. The presence of altool.exe was verified, and adding the extension's bin directory to PATH resolved the issue without any other changes.

This suggests the Profiling MCP Server is not resolving altool relative to the installed AL extension.


5. Versions:

  • AL Language: Latest version available in Visual Studio Code Marketplace
  • Visual Studio Code:
  • Business Central:
  • List of Visual Studio Code extensions that you have installed:
    • AL Language
  • Operating System:
    • Windows
    • Linux
    • MacOS

Final Checklist

  • Search the issue repository to ensure you are reporting a new issue
  • Reproduce the issue after disabling all extensions except the AL Language extension
  • Simplify your code around the issue to better isolate the problem

Activity

  1. ChristianFeitl commented on Oct 25, 2026

    @ChristianFeitl
    Author

    Additional evidence because triage failed:

    The AL extension installs altool.exe at:

    C:\Users<user>.vscode\extensions\ms-dynamics-smb.al-18.1.2842859\bin\altool.exe

    Before adding this directory to PATH:

    altool
    'altool' is not recognized as an internal or external command

    The Business Central Profiling MCP Server fails with:

    Error: spawn altool ENOENT

    After adding the extension's bin folder to PATH and restarting VS Code:

    C:\Users<user>.vscode\extensions\ms-dynamics-smb.al-18.1.2842859\bin

    the Profiling MCP Server starts successfully.

    No other changes were made.

    This indicates that the MCP server attempts to invoke altool via PATH lookup instead of resolving the executable from the installed AL extension location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions