Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/alcops/mcp-server/copilot-instructionsgit clone --depth 1 https://github.com/ALCops/mcp-serverWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00994 | $0.00994 |
| Opus 5 | $0.00497 | $0.00497 |
| Sonnet 5 | $0.00199 | $0.00199 |
| Haiku 4.5 | $0.00099 | $0.00099 |
Grade A, and why
mcp-server copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copilot Instructions
Build
# Build (requires BC DevTools DLLs, see below)
dotnet build --configuration Release
# Run tests
dotnet test --configuration Release
# Pack as .NET global tool
dotnet pack src/ALCops.Mcp/ALCops.Mcp.csproj --configuration Release --output ./artifacts
There are no linters in this repository.
BC DevTools dependency
The project references proprietary Microsoft BC Development Tools DLLs (Microsoft.Dynamics.Nav.CodeAnalysis, .Workspaces, .Analyzers.Common). These are not bundled and must exist locally for compilation. The BcDevToolsDir MSBuild property (default: ../../Microsoft.Dynamics.BusinessCentral.Development.Tools) points to the directory containing a net8.0/ subfolder with these DLLs.
At runtime, BcDevToolsBootstrap resolves them automatically through a fallback chain: BCDEVELOPMENTTOOLSPATH env var → AL VS Code extension → NuGet cache → auto-download from NuGet.
Architecture
This is an MCP (Model Context Protocol) server packaged as a .NET 8 global tool (alcops-mcp). It exposes AL code analysis capabilities over stdio JSON-RPC.
Startup sequence (order matters)
Program.cscallsBcDevToolsBootstrap.ResolveAndRegister()to find BC DevTools and register anAssemblyLoadContextresolver. This must happen before any BC types are JIT-compiled.McpHost.RunAsync()is marked[NoInlining]to enforce this ordering, then builds the host, registers DI services, and starts the MCP stdio transport.
Key layers
- Tools/ — MCP tool endpoints. Each class is annotated with
[McpServerToolType]and methods with[McpServerTool]. Tools are auto-discovered viaWithToolsFromAssembly(). The five tools:analyze,list_rules,get_fixes,apply_fix,apply_fix_all. - Services/ — Core logic. Services are registered as singletons in
McpHost.ProjectSessionManager— Caches loaded AL project workspaces keyed by path.GetOrLoadProjectAsyncis the main entry point tools use.AnalyzerRegistry— Loads ALCops' 6 built-in cops at startup via reflection. Indexes analyzers, code fix providers, and diagnostic descriptors.ProjectAnalyzerResolver— Merges built-in analyzers with external ones (BC standard cops like${CodeCop}, third-party DLLs). Reads analyzer config from.vscode/settings.json(al.codeAnalyzers). Also loads rulesets from multiple sources (.vscode/settings.json,.AL-Go/settings.json, convention-named files).ExternalAnalyzerLoader— Loads third-party analyzer DLLs into isolatedAssemblyLoadContextinstances.ProjectLoader— Creates anAlProjectWorkspacefrom disk (readsapp.json, enumerates.alfiles, resolves.alpackages).
- Models/ — Simple record types for tool return values. Serialized with
JsonDefaults.Options(camelCase, not indented).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 58 lines · 994 tokens per session scan A a102a2a88a2e
mcp-server copilot-instructions.md is an instructions file published in the GitHub repository ALCops/mcp-server (9 stars, last pushed 5d ago), licensed MIT. It adds 994 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
Ix CLAUDE.md
Instructions for ix-infrastructure/Ix, covering project: ix (this repo), layout, commands, cli dev (from ix-cli/) and skill + tooling (from repo root).
Fuse AGENTS.md
Instructions for Litenova-Solutions/Fuse, covering fuse - agent and contributor guide, what fuse is, repository layout, code organization and build, test, format.
rust-doctor AGENTS.md
Instructions for arthjean/rust-doctor, covering agents.md, trust boundary, commands, running the tool on this repository and the subsystems.
roslyn-codelens-mcp CLAUDE.md
Instructions for MarcelRoozekrans/roslyn-codelens-mcp, covering roslyn codelens mcp, mcp server, skill, project structure and development.
graphify-dotnet copilot-instructions.md
Instructions for elbruno/graphify-dotnet, covering graphify-dotnet repository conventions, repository structure, ⚠️ critical rule: all code lives under src/, solution format and project conventions.
navegador CLAUDE.md
Instructions for ConflictHQ/navegador, covering navegador — claude context, what it is, stack, package layout and falkordb connection.