Skip to content

Commit 0e44d93

Browse files
Arthurvdvclaude
andcommitted
docs: rewrite the MCP Server page for v0.1.0
The page still described the alphas: an `analyze` tool that no longer exists, apply_fix "not writing to disk", six bundled analyzers, and a five-step DevTools resolution with an auto-download that was removed. v0.1.0 makes ALCops MCP a thin code-fix server that also proxies Microsoft's almcp and requires BC Development Tools 18.0+. Rewrite as a concise install → connect → use guide: prerequisites led by the dotnet tool, ready-to-paste configs for Claude Code, VS Code/Copilot, Cursor and Codex, the four native tools plus the proxied al_* set, project-driven analyzer configuration, and a recommended agent loop with the onlyErrors gotcha. Point to the README for the full reference. Fix the one-line descriptions on the home page, getting-started index and quick-start that repeated the old "analyze a file" story. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 3bbcc5a commit 0e44d93

4 files changed

Lines changed: 84 additions & 32 deletions

File tree

content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ GitHub with AL-Go and Azure DevOps with the ALCops pipeline task both run the sa
6262
{{% /blocks/feature %}}
6363

6464
{{% blocks/feature icon="fa-solid fa-robot" title="AI assistants" url="docs/getting-started/ai-tooling/" url_text="Connect the MCP server" %}}
65-
The MCP server exposes the analyzers to Claude, Cursor and other assistants. An assistant can analyze a file, look up a rule and apply its code fix without leaving the conversation.
65+
The MCP server gives Claude Code, GitHub Copilot, Cursor and Codex the ALCops code fixes plus Microsoft's AL tooling. An assistant can compile, look up a rule and apply its code fix without leaving the conversation.
6666
{{% /blocks/feature %}}
6767

6868
{{% /blocks/section %}}

content/docs/getting-started/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Run ALCops as part of your build to catch issues before they reach production:
2525

2626
### AI Tooling
2727

28-
- [MCP Server](ai-tooling/)let AI assistants like Claude analyze your AL code through the Model Context Protocol
28+
- [MCP Server](ai-tooling/)give Claude Code, Copilot, Cursor and other assistants ALCops code fixes and Microsoft's AL tooling through the Model Context Protocol
2929

3030
### Configuration
3131

content/docs/getting-started/ai-tooling.md

Lines changed: 81 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,111 @@ weight: 50
55
type: docs
66
---
77

8-
The [ALCops MCP server](https://github.com/ALCops/mcp-server) brings AL code analysis to AI assistants through the [Model Context Protocol](https://modelcontextprotocol.io/). 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.
8+
The [ALCops MCP server](https://github.com/ALCops/mcp-server) gives AI assistants — Claude Code, GitHub Copilot, Cursor, Codex and any other [MCP](https://modelcontextprotocol.io/) client — the ALCops code fixes and rule lookup, and proxies Microsoft's own AL MCP server (`almcp`) so compiling, diagnostics, symbols, publishing and tests come through the same connection. One server entry in your client, everything an assistant needs to fix AL code.
99

10-
## Install
10+
## Prerequisites
11+
12+
- [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0) SDK or runtime.
13+
- Microsoft BC Development Tools **v18.0 or later**. The recommended way to get them is the dotnet tool:
14+
15+
```shell
16+
dotnet tool install -g Microsoft.Dynamics.BusinessCentral.Development.Tools
17+
```
1118

12-
Install the MCP server as a .NET global tool:
19+
If you already have the [AL Language](https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al) VS Code extension, that install is optional — the server detects the extension's tools automatically.
20+
21+
v17 and earlier are not supported. The server checks the dotnet tool store before the AL extension, takes the newest version it finds there, and logs which directory it used; `--devtools-path` overrides the search. See [how the server finds the tools](https://github.com/ALCops/mcp-server#bc-devtools-resolution) for the full probe order.
22+
23+
## Install
1324

1425
```shell
1526
dotnet tool install -g ALCops.Mcp
1627
```
1728

18-
## Configuration
29+
Upgrade later with `dotnet tool update -g ALCops.Mcp`.
1930

20-
Add the server to your MCP client configuration.
31+
## Connect your assistant
2132

22-
```json
33+
The server speaks MCP over stdio, so every client is a one-line entry.
34+
35+
{{< tabpane persist=false >}}
36+
{{< tab header="Claude Code" lang="shell" >}}
37+
claude mcp add --scope project alcops -- alcops-mcp
38+
39+
# writes .mcp.json:
40+
# { "mcpServers": { "alcops": { "type": "stdio", "command": "alcops-mcp" } } }
41+
{{< /tab >}}
42+
{{< tab header="VS Code / Copilot" lang="json" >}}
2343
{
24-
"mcpServers": {
25-
"alcops": {
26-
"command": "alcops-mcp"
27-
}
44+
"servers": {
45+
"alcops": {
46+
"type": "stdio",
47+
"command": "alcops-mcp"
2848
}
49+
}
2950
}
30-
```
51+
{{< /tab >}}
52+
{{< tab header="Cursor" lang="json" >}}
53+
{
54+
"mcpServers": {
55+
"alcops": {
56+
"command": "alcops-mcp"
57+
}
58+
}
59+
}
60+
{{< /tab >}}
61+
{{< tab header="Codex" lang="toml" >}}
62+
[mcp_servers.alcops]
63+
command = "alcops-mcp"
64+
{{< /tab >}}
65+
{{< /tabpane >}}
66+
67+
Claude Code writes the entry to `.mcp.json` in the project. VS Code reads `.vscode/mcp.json` — note that its top-level key is `servers`, not `mcpServers`. Cursor reads `.cursor/mcp.json` for a single project or `~/.cursor/mcp.json` globally, and Codex reads `~/.codex/config.toml`, which `codex mcp add alcops -- alcops-mcp` writes for you.
3168

32-
## Available Tools
69+
Start the client from the folder that holds your AL project, or point the server at it with `--projects`. The server discovers `app.json` downward from the working directory, reads that project's `.vscode/settings.json`, and starts `almcp` with the same configuration.
3370

34-
The MCP server exposes 4 tools (~1,020 tokens of schema overhead):
71+
## What the assistant gets
72+
73+
Four tools are served by ALCops itself:
3574

3675
| Tool | Description |
3776
|------|-------------|
38-
| `analyze` | Run analyzers on an AL project or file. Returns diagnostics with severity, location, and code fix availability. |
39-
| `list_rules` | List all available analyzer rules with metadata (ID, title, severity, category, cop). |
40-
| `get_fixes` | Get available code fixes for a specific diagnostic at a location. |
41-
| `apply_fix` | Apply a code fix and return the modified source — does **not** write to disk. |
77+
| `list_rules` | List analyzer rules with metadata (ID, title, severity, category, cop). |
78+
| `get_fixes` | Get available code fixes for a diagnostic at a location. |
79+
| `apply_fix` | Apply a code fix. Writes the fixed content to the file on disk. |
80+
| `apply_fix_all` | Apply a fix to every occurrence of a rule across a project or file (like VS Code's "Fix all in workspace"). Writes to disk unless `dryRun` is set. |
81+
82+
Alongside them come Microsoft's `al_*` tools, proxied from `almcp`: `al_compile`, `al_build`, `al_getdiagnostics`, `al_symbolsearch`, `al_publish`, `al_run_tests`, translations, object IDs and more. The exact set depends on your installed BC Development Tools version; the [README](https://github.com/ALCops/mcp-server#proxied-from-microsofts-almcp) lists them all. If your client already registers `almcp` itself, start the server with `--no-proxy` so the `al_*` tools do not show up twice.
4283

4384
## Analyzers
4485

45-
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.
86+
Nothing is bundled. The server loads exactly the analyzers your project configures in `.vscode/settings.json` — ALCops cops and BC's standard cops through `al.codeAnalyzers`, severities through `al.ruleSetPath`, symbols through `al.packageCachePath`and passes the same configuration to `almcp`, so `al_compile` and `get_fixes` agree about which rules run and which are suppressed.
4687

47-
## BC Development Tools Resolution
88+
```json
89+
{
90+
"al.codeAnalyzers": [
91+
"${CodeCop}",
92+
"${analyzerFolder}ALCops.LinterCop.dll"
93+
]
94+
}
95+
```
4896

49-
The server needs Microsoft BC Development Tools at runtime (not bundled due to licensing). On startup it searches, in order:
97+
The [VS Code](../vscode/#manual-setup-without-the-extension) page shows the full `al.codeAnalyzers` list, and [Configuration](../configuration/#ruleset-files-rulesetjson) covers rulesets and `alcops.json`.
5098

51-
1. `BCDEVELOPMENTTOOLSPATH` environment variable
52-
2. AL Language VS Code extension
53-
3. Local cache (`~/.alcops/cache/devtools/`)
54-
4. .NET global tools cache
55-
5. Auto-download from NuGet (first run only)
99+
## Recommended agent workflow
56100

57-
Most developers have the AL Language extension installed, so **no extra setup is needed**.
101+
Drop this into your `AGENTS.md` or `CLAUDE.md` so the assistant uses the tools in the right order:
58102

59-
## Other AI Integrations
103+
```markdown
104+
After changing AL code:
105+
106+
1. Run `al_compile` with `onlyErrors: false` and fix any errors.
107+
2. For every ALCops warning (rule IDs like LC0020, AC0012, ...), call `get_fixes` at its
108+
location and apply the fix with `apply_fix`; use `apply_fix_all` when the same rule
109+
repeats across the project.
110+
3. Re-run `al_compile` until it is clean.
111+
```
60112

61-
{{% alert title="Under Investigation" color="warning" %}}
62-
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.
113+
{{% alert title="al_compile hides warnings by default" color="warning" %}}
114+
`al_compile` defaults to `onlyErrors: true`, and nearly every ALCops rule is a *warning*. Pass `onlyErrors: false` or the assistant sees no cop diagnostics at all.
63115
{{% /alert %}}

content/docs/getting-started/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ Choose the approach that fits your workflow:
7878
- **[VS Code](../vscode/)** — Install the extension and start getting diagnostics immediately (recommended for development)
7979
- **[Command Line](../command-line/)** — Use `alc.exe` with analyzer DLLs directly
8080
- **[CI/CD Pipelines](../cicd/)** — Run ALCops in GitHub Actions or Azure DevOps builds
81-
- **[MCP Server](../ai-tooling/)**Let AI assistants analyze your AL code through the Model Context Protocol
81+
- **[MCP Server](../ai-tooling/)**Give Claude Code, Copilot, Cursor and other assistants ALCops code fixes and Microsoft's AL tooling through the Model Context Protocol
8282

8383
Already using BusinessCentral.LinterCop? See [LinterCop Migration](../../lintercop-migration/) for a complete diagnostic mapping.

0 commit comments

Comments
 (0)