mcp
MCP server that brings ALCops AL code analyzers to AI assistants like Claude and Cursor
claude mcp add --transport stdio alcops-mcp-server alcops-mcp
How to use
This MCP server provides AL code analysis capabilities for AL projects via the ALCops.Mcp tool. After installing the .NET global tool, you can connect to the server through MCP clients (such as Claude or Claude Desktop) by adding an entry for alcops in your MCP configuration. The server exposes a set of tools for analyzing AL code, listing available rules, retrieving possible fixes for diagnostics, and applying fixes in-memory without writing changes to disk. The core functionality centers on running analyzers and fixes against a BC/AL codebase, enabling AI-assisted code quality improvements within chat or prompts.
Tool access includes four commands: analyze, list_rules, get_fixes, and apply_fix. analyze runs the configured analyzers on a given AL project or file and returns diagnostics with severity, location, and whether code fixes are available. list_rules provides metadata for all analyzers and their rules. get_fixes asks for fixes applicable to a specific diagnostic at a location, and apply_fix applies a selected fix to the in-memory representation of the code and returns the updated source. These tools empower you to understand, review, and automatically improve BC AL code within conversations with AI copilots.
By default, the server loads ALCops’ built-in cops and can also load BC standard analyzers and third-party analyzers discovered via al.codeAnalyzers or provided explicitly. This enables a broad set of checks and fixes tailored to AL development practices, including documentation quality, formatting, linting, platform correctness, and test structure.
How to install
Prerequisites:
- .NET SDK installed (for building or using the dotnet tool, typically .NET 6+ is supported).
- Internet access to fetch the ALCops.Mcp NuGet package or the dotnet tool from NuGet.
Install the MCP server as a .NET global tool:
-
Ensure you have the dotnet CLI installed and authenticated with NuGet if necessary.
-
Run:
dotnet tool install -g ALCops.Mcp
Verify installation:
alcops-mcp --version
Usage in MCP config:
- In your MCP configuration file (e.g., .mcp.json), reference the server by the command name you installed:
{ "mcpServers": { "alcops": { "command": "alcops-mcp" } } }
If you prefer to run the server manually (for debugging), you can invoke the installed tool directly:
alcops-mcp
This will start the MCP server and listen for MCP client connections according to your environment and client configuration.
Additional notes
Notes and tips:
- The server relies on BC Development Tools at runtime. It will attempt to resolve BC Dev Tools via the BCDEVELOPMENTTOOLSPATH environment variable, the AL Language VS Code extension, local cache, global tools cache, or auto-download from NuGet on first run. Ensure the environment has access to these resources for a smooth startup.
- If you use BC analyzers from al.codeAnalyzers, ensure your project or settings.json references them so they can be auto-discovered.
- When running with Claude or other clients, you typically need to configure the client to point to the alcops server (as shown in the Quick Start example). If the server cannot find DevTools or analyzers, check environment variables and the presence of the AL Language extension or the devtools cache.
- The tools operate in-memory for edits (apply_fix returns the modified source without writing to disk). If you need to persist changes, apply the fix and then write the result back to disk in your workflow.
- For large projects, consider running analyses in smaller scopes (specific files or folders) to control response size and latency in chat-based workflows.
Related MCP Servers
mcpbi
PowerBI MCP server to give LLM clients (Claude, GH Copilot,etc) context from locally running PowerBI Desktop instances.
archmcp
archmcp - MCP Architectural Snapshot Server and Knowledge Graph
NugetMcpServer
.NET MCP server that gives LLMs real NuGet API metadata to reduce hallucinations
unity -template
Simple template project for controlling Unity via MCP
mcp -graph-api
Model-context-protocol (MCP) server for the Microsoft Graph API in C#
mcp-camunda
Tools to interact with the Camunda 7 Community Edition Engine using the Model Context Protocol (MCP). Whether you're automating workflows, querying process instances, or integrating with external systems, Camunda MCP Server is your agentic solution for seamless interaction with Camunda.