BC MCP Config Generator
A VS Code extension for Microsoft Dynamics 365 Business Central AL developers who want to set up and validate the AL MCP server quickly, and scaffold custom API pages that can later be exposed to agent/MCP scenarios.
What's new in 0.2.0
Guided AL MCP workspace setup
Run:
BC MCP: Setup AL MCP Workspace
The wizard:
- Detects the AL project from
app.json
- Lets you choose
.vscode/mcp.json or portable .mcp.json
- Creates/updates the AL MCP server entry
- Preserves other MCP server entries
- Creates a backup before modifying an existing config (when enabled)
- Runs a health check immediately after setup
Typical generated configuration:
{
"servers": {
"al": {
"type": "stdio",
"command": "altool",
"args": [
"launchmcpserver",
"${workspaceFolder}",
"--transport",
"stdio"
]
}
}
}
MCP Health Check
Run:
BC MCP: Run MCP Health Check
The report checks:
- Workspace and AL
app.json
- AL Language extension and its major version
altool availability on PATH
- .NET 8 runtime detection
.vscode/launch.json
.alpackages
.vscode/mcp.json / .mcp.json
- AL MCP
launchmcpserver entry and stdio transport
The full result is shown in Output → BC MCP Health Check.
AL API Page Generator
Run:
BC MCP: Generate AL API Page
The generator can:
- Detect local AL table objects
- Suggest the next free page ID from
app.json idRanges
- Let you select fields from a local table
- Accept standard/dependency tables by name or ID
- Generate
APIPublisher, APIGroup, APIVersion, EntityName, and EntitySetName
- Generate a SystemId-based OData key
- Create either a read-only or read/write API page
- Create the output under
src/api by default
Example generated page:
page 50100 "Customer MCP API"
{
PageType = API;
Caption = 'Customer MCP API';
APIPublisher = 'myCompany';
APIGroup = 'mcp';
APIVersion = 'v1.0';
EntityName = 'customer';
EntitySetName = 'customers';
SourceTable = Customer;
ODataKeyFields = SystemId;
InsertAllowed = false;
ModifyAllowed = false;
DeleteAllowed = false;
layout
{
area(Content)
{
repeater(General)
{
field(id; Rec.SystemId)
{
Caption = 'Id';
Editable = false;
}
// Add fields to expose here.
}
}
}
}
API pages generated by this extension are AL source code. Review the exposed fields and permissions before publishing them to a Business Central environment.
Commands
Open the Command Palette (Ctrl+Shift+P) and run:
BC MCP: Setup AL MCP Workspace
BC MCP: Run MCP Health Check
BC MCP: Generate AL API Page
BC MCP: Generate / Update AL MCP Config
BC MCP: Validate MCP Config
BC MCP: Check AL MCP Prerequisites
BC MCP: Open MCP Config
BC MCP: Remove AL MCP Server Entry
Requirements
For the Microsoft AL MCP server itself, the current Microsoft guidance requires an up-to-date AL development setup including:
- AL Language extension 17.0 or later for the AL agent tooling
- .NET 8 runtime
altool available to the extension host process
- Network/authentication access to Business Central for operations such as publish or symbol download
Microsoft documentation:
Scope
This extension configures the AL development MCP server supplied with ALTool. It does not create the Business Central runtime MCP configuration used by Copilot Studio (mcp.businesscentral.dynamics.com).
The API Page Generator helps scaffold AL APIs that you can review, publish, and then expose through the appropriate Business Central integration/MCP configuration.
Settings
bcMcpConfig.defaultServerName
bcMcpConfig.altoolCommand
bcMcpConfig.backupBeforeWrite
bcMcpConfig.defaultConfigTarget
bcMcpConfig.apiPublisher
bcMcpConfig.apiGroup
bcMcpConfig.apiVersion
Development
npm install
npm run check
Press F5 in VS Code to launch an Extension Development Host. No transpilation step is required because the extension uses plain JavaScript.
Package locally:
npm run vsix
Then install the generated .vsix with Extensions → ... → Install from VSIX....
Marketplace publishing
See PUBLISHING.md.
License
MIT