MCP Server
The ALCops MCP server brings AL code analysis to AI assistants through the Model Context Protocol . It lets Claude, Cursor, and other MCP-compatible clients analyze Business Central AL projects, browse rules, and apply code fixes — all without leaving the conversation.
Install
Install the MCP server as a .NET global tool:
dotnet tool install -g ALCops.Mcp
Configuration
Add the server to your MCP client configuration.
{
"mcpServers": {
"alcops": {
"command": "alcops-mcp"
}
}
}
Available Tools
The MCP server exposes 4 tools (~1,020 tokens of schema overhead):
| Tool | Description |
|---|---|
analyze | Run analyzers on an AL project or file. Returns diagnostics with severity, location, and code fix availability. |
list_rules | List all available analyzer rules with metadata (ID, title, severity, category, cop). |
get_fixes | Get available code fixes for a specific diagnostic at a location. |
apply_fix | Apply a code fix and return the modified source — does not write to disk. |
Analyzers
The server always includes ALCops’ six built-in analyzers. Additionally, it can load BC standard analyzers (${CodeCop}, ${UICop}, ${PerTenantExtensionCop}, ${AppSourceCop}) and third-party analyzers — auto-discovered from al.codeAnalyzers in .vscode/settings.json, or passed explicitly via the analyzers tool parameter.
BC Development Tools Resolution
The server needs Microsoft BC Development Tools at runtime (not bundled due to licensing). On startup it searches, in order:
BCDEVELOPMENTTOOLSPATHenvironment variable- AL Language VS Code extension
- Local cache (
~/.alcops/cache/devtools/) - .NET global tools cache
- Auto-download from NuGet (first run only)
Most developers have the AL Language extension installed, so no extra setup is needed.
Other AI Integrations
We are exploring additional integration paths for GitHub Copilot and other AI-assisted development tools. This page will be updated as new integrations become available.