# ALCops Mcp Server

> MCP server that brings ALCops AL code analyzers to AI assistants like Claude and Cursor

- **Type:** MCP server
- **Install:** `agentstack add mcp-alcops-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ALCops](https://agentstack.voostack.com/s/alcops)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ALCops](https://github.com/ALCops)
- **Source:** https://github.com/ALCops/mcp-server

## Install

```sh
agentstack add mcp-alcops-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ALCops MCP Server

[](https://www.nuget.org/packages/ALCops.Mcp)
[](https://www.nuget.org/packages/ALCops.Mcp)
[](https://github.com/ALCops/mcp-server/actions)
[](LICENSE)

An [MCP](https://modelcontextprotocol.io/) server that brings [ALCops](https://alcops.dev) AL code analysis to AI assistants. Lets Claude, Cursor, and other MCP clients analyze Business Central AL projects, browse rules, and apply code fixes — all without leaving the conversation.

## Quick Start

Install as a .NET global tool:

```sh
dotnet tool install -g ALCops.Mcp
```

Add to your `.mcp.json` (Claude Code) or `claude_desktop_config.json` (Claude Desktop):

```json
{
  "mcpServers": {
    "alcops": {
      "command": "alcops-mcp"
    }
  }
}
```

That's it. If you have the [AL Language](https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al) VS Code extension installed, the server picks up the BC Development Tools automatically.

## Requirements

- [.NET 10.0](https://dotnet.microsoft.com/download/dotnet/10.0) SDK or Runtime
- [AL Language](https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al) VS Code extension **v17.0 or higher**

> **Note:** AL Language v16 and earlier are not supported. The BC Development Tools DLLs introduced breaking API changes in v17 that are not backwards compatible. AL Language v18+ requires .NET 10.

## Tools

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' 6 built-in cops:

| Cop | Prefix | Description |
|-----|--------|-------------|
| [ApplicationCop](https://alcops.dev/docs/analyzers/applicationcop/) | AC | Correct modeling and behavior of BC objects |
| [DocumentationCop](https://alcops.dev/docs/analyzers/documentationcop/) | DC | Documentation quality and completeness |
| [FormattingCop](https://alcops.dev/docs/analyzers/formattingcop/) | FC | Stylistic and syntactic consistency |
| [LinterCop](https://alcops.dev/docs/analyzers/lintercop/) | LC | Code smells, maintainability, best practices |
| [PlatformCop](https://alcops.dev/docs/analyzers/platformcop/) | PC | AL language and runtime semantic correctness |
| [TestCop](https://alcops.dev/docs/analyzers/testcop/) | TC | Test codeunit structure and correctness |

Additionally, the server 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.

Browse the complete rules reference at [alcops.dev/docs/analyzers](https://alcops.dev/docs/analyzers/).

## BC DevTools Resolution

The server needs Microsoft BC Development Tools at runtime (not bundled due to licensing). On startup it searches, in order:

1. `BCDEVELOPMENTTOOLSPATH` environment variable
2. AL Language VS Code extension
3. Local cache (`~/.alcops/cache/devtools/`)
4. .NET global tools cache
5. Auto-download from NuGet (first run only)

Most users have the AL extension installed, so **no extra setup is needed**.

## Contributing

Contributions are welcome! Whether it's a new tool, a bug report, or a pull request — all input helps.

- 🐛 **Report a bug** — File an [Issue](https://github.com/ALCops/mcp-server/issues/new)
- 🔧 **Submit a PR** — Fork the repo, create a branch, and open a pull request

## License

This project is licensed under the [MIT License](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ALCops](https://github.com/ALCops)
- **Source:** [ALCops/mcp-server](https://github.com/ALCops/mcp-server)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-alcops-mcp-server
- Seller: https://agentstack.voostack.com/s/alcops
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
