Reference manual

MCP server

Prism for AL runs a Model Context Protocol server. An AI coding agent connects to it and gets tools over the same symbol index and code graph you use in Prism: symbol search, source, references, control flow, reachability, RIMD and commit analysis, user actions, dependencies and the module graph.

The MCP server is part of the Prism for AL subscription and the trial; there is nothing extra to buy.

There are two ways for an agent to reach it:

  • Connect to a running server over HTTP. The server is already up, either in a Prism workspace window, started from its MCP Server page, or from the command line with StaticalPrismCmd.exe mcp-server-http. Every client shares that server's workspace and code graph, so answers come from what is already loaded and nothing waits for an index build.
  • Start the server over stdio. With a stdio entry in the agent's MCP configuration, the agent launches StaticalPrismCmd.exe mcp-server-stdio itself whenever you open the folder or .code-workspace, and owns the process. No Prism window and nothing to start by hand; each launch indexes the workspace and builds the code graph again, and the tools become available as that work finishes, which takes minutes on a real Business Central workspace.

Start the server

There are three ways. The first two run an HTTP server that agents connect to; with the third, the agent starts its own server over stdio.

In Prism, over HTTP

  1. Open your workspace in Prism for AL as usual, and let the code graph build.
  2. In the workspace window, select the MCP Server page in the navigation pane.
  3. Check the port. Prism remembers the last port you used, 47821 by default, and tells you if something else is already listening on it.
  4. Press Start. The page shows the endpoint, http://localhost:47821, and the number of tools and resources.
  5. Press Heartbeat if you want proof: Prism connects to its own server with a real MCP client, completes the handshake and lists the tools.

The server stays up as long as the workspace window is open. If you edit AL files, the agent can call reload_workspace, or you reload in Prism; either way the index and graph are rebuilt.

From the command line, over HTTP

The same server runs without a window, for build agents, CI pipelines and always-on setups. It takes a folder, either one AL project or a parent folder of several, or a .code-workspace file:

StaticalPrismCmd.exe mcp-server-http "C:\workspace\MySolution" -p 47821

Add --log-file to keep a log, and --port-search 47821..47920 to take the first free port in a range instead of failing on a busy one. A license key can be installed and checked from the command line as well; see the Command-line interface.

From your agent, over stdio

Nothing to start by hand. In Visual Studio Code, the Prism for AL Connector registers the server for you. Other agents need a stdio entry, shown under Configure your client. Either way the agent runs StaticalPrismCmd.exe mcp-server-stdio itself when you open the folder or .code-workspace. Each launch indexes the workspace and builds the code graph again, and the tools become available as that work finishes.

Configure your client

The MCP client config card on the MCP Server page writes the configuration for you: pick your client, pick HTTP or stdio, and copy either the single server entry or the whole file. The entry is named after the workspace, so two Prism windows never collide in one client.

Prism for AL: the MCP client config card with Visual Studio Code (Copilot) and HTTP selected

An entry is one of two kinds:

  • HTTP connects. The entry holds the URL of a server that is already running, in Prism or from the command line. The agent connects to it and starts nothing.
  • stdio starts. The entry holds a command. The agent runs it, owns the process, and talks to the server over its standard input and output, so starting and connecting are one step.

The tables below give the configurations for the most common clients, for a folder and for a .code-workspace file. If the file exists already, add the "Prism" entry to the block it has.

GitHub Copilot in Visual Studio Code

Install the Prism for AL Connector. It registers the server over stdio, so there is no mcp.json to write. The server is offered when the open folder has an app.json at its root or, for a .code-workspace, when one of its folders does, and it appears as Prism for AL under MCP: List Servers.

Without the Prism for AL Connector, or to connect to a running server over HTTP, write the entry yourself. Visual Studio Code shows it under MCP: List Servers. For an HTTP entry, its Start action connects to the running Prism server; it does not start one.

Kind File Configuration
HTTP, folder .vscode/mcp.json in the folder you open, so it travels with the project.
{
  "servers": {
    "Prism": {
      "type": "http",
      "url": "http://localhost:47821"
    }
  }
}
HTTP, .code-workspace The .code-workspace file itself, under "settings". Visual Studio Code reads .vscode/mcp.json only at the root of the first folder the workspace file lists, so a file next to the .code-workspace is never read.
{
  "folders": [ ... ],
  "settings": {
    "mcp": {
      "servers": {
        "Prism": {
          "type": "http",
          "url": "http://localhost:47821"
        }
      }
    }
  }
}
stdio, folder .vscode/mcp.json in the folder you open.
{
  "servers": {
    "Prism": {
      "type": "stdio",
      "command": "StaticalPrismCmd.exe",
      "args": [
        "mcp-server-stdio",
        "${workspaceFolder}"
      ]
    }
  }
}
stdio, .code-workspace The .code-workspace file itself, under "settings". This is where MCP: Add Server puts it when a workspace is open. Both ${workspaceFolder} and a relative path resolve from the first folder listed in the workspace file, not from the folder the file is in, so give the full path.
{
  "folders": [ ... ],
  "settings": {
    "mcp": {
      "servers": {
        "Prism": {
          "type": "stdio",
          "command": "StaticalPrismCmd.exe",
          "args": [
            "mcp-server-stdio",
            "C:\\workspace\\MySolution\\MySolution.code-workspace"
          ]
        }
      }
    }
  }
}

Claude Code

Start Claude Code in the folder that holds .mcp.json. The stdio paths resolve from there.

Kind File Configuration
HTTP .mcp.json in the repository root.
{
  "mcpServers": {
    "Prism": {
      "type": "http",
      "url": "http://localhost:47821"
    }
  }
}
stdio, folder .mcp.json in the folder Prism should index.
{
  "mcpServers": {
    "Prism": {
      "type": "stdio",
      "command": "StaticalPrismCmd.exe",
      "args": [
        "mcp-server-stdio",
        "${CLAUDE_PROJECT_DIR:-.}"
      ]
    }
  }
}
stdio, .code-workspace .mcp.json next to the .code-workspace file.
{
  "mcpServers": {
    "Prism": {
      "type": "stdio",
      "command": "StaticalPrismCmd.exe",
      "args": [
        "mcp-server-stdio",
        "${CLAUDE_PROJECT_DIR:-.}/MySolution.code-workspace"
      ]
    }
  }
}

Tell your agent when to use Prism

Agents reach for text search out of habit, and for AL a text match gives wrong answers: it misses usages through Rec, record variables, with blocks and extensions, and it matches members with the same name in other objects. An agent skill guards against that. It is a short SKILL.md whose description sits in the agent's context in every session and sends AL questions to Prism. The body is only a few lines, because the server brings its own instructions and tool descriptions.

In Visual Studio Code, the Prism for AL Connector adds the skill for you, together with the server. That is where it matters most: Copilot agent mode lists MCP tools by name only, and in our tests every where-used and caller question started with a text search without the skill and went to Prism with it. Claude Code keeps the server's own instructions in view, and GitHub Copilot CLI shows every Prism tool with its description, so in our tests both went to Prism first with or without the skill. For those and other agents, the skill is a cheap safeguard: save it as prism-for-al/SKILL.md in the agent's skills folder:

---
name: prism-for-al
description: Use for any question about this workspace's Business Central AL code — where a field, procedure, table, enum value or event is used or called from, which code reads or writes a table, what depends on an object, how control flows through it. Load this before searching text or reading .al files; text search gives wrong answers for AL.
---

# Prism for AL

This workspace is indexed by the **Prism for AL** MCP server, which resolves
each AL reference to the declaration it binds to — through record variables,
`Rec`, `with` blocks and extensions, where a text match misses usages and
matches same-named members of other objects.

If your client defers the server's tools, load them with one tool search, then
start from `find_symbols`. Which tool answers which question, and how to call
it, is in the server's instructions and tool descriptions. After you edit AL
files, call `reload_workspace` before you trust the graph again.
Agent Where the file goes
GitHub Copilot in Visual Studio Code, with the Prism for AL Connector Nothing to do; the Prism for AL Connector adds the skill.
Claude Code .claude/skills/prism-for-al/SKILL.md in the repository, so it travels with the project, or ~/.claude/skills/prism-for-al/SKILL.md for every repository.
GitHub Copilot without the Prism for AL Connector, Codex, Cursor and Zed .agents/skills/prism-for-al/SKILL.md in the repository, or ~/.agents/skills/prism-for-al/SKILL.md for every repository.

If your agent does not read skills, put this in the file it reads at the start of every session, such as AGENTS.md:

This workspace is indexed by the Prism for AL MCP server. For any question about where
AL code is used or called from, which code reads or writes a table, or how control flows
through it, use its tools before text search; text search gives wrong answers for AL.

First questions to ask

Three prompts that show the difference between a text search and a graph, each with the tools the agent calls to answer it. Use names from your own solution.

  • Which page actions can end up calling PostDocument in codeunit Sales-Post Helper?

    1. find_user_actions

    Comes back with the actions, not the files.

  • Can ProcessElectronicPayment reach a Commit? Show me the shortest path.

    1. find_commits
    2. find_shortest_path
  • Which procedures can modify Cust. Ledger Entry and also reach a Commit?

    1. find_reachability_set

    One call. On our LearnPrism workspace, 19 apps with the Base Application among them, it returns 22 procedures in under a second, out of a closure of more than ten thousand nodes that never leave the server.

Whatever the agent answers, the names it gives you are Prism Paths. Open the procedure in Prism and use Immediate insights and Find Shortest Path to check the claim with your own eyes.

Tools and resources

26 tools, one shared vocabulary. Every tool wraps its parameters in a request object, uses RE2 regular expressions for pattern parameters, pages large results and answers failures with a structured code instead of prose.

Category Tools
Module explorationlist_modules, get_module, get_module_graph
Namespace analysislist_namespaces, find_namespace_dependencies
Symbol discoveryfind_symbols, location_to_prism_path
Source retrievalobject_to_source, get_source_code, search_object_outline
Graph identitynode_ids_to_prism_paths, contextualize_nodes
Flow analysisfind_flows, find_shortest_path, find_reachability_set
Insight toolsfind_commits, find_rimd, find_event_publishers, find_user_actions
Structural analysisfind_extensions, find_object_dependencies, find_references
Server managementlist_resources, read_resource, reload_workspace, submit_mcp_feedback

The documentation the agent needs ships with the server as resources: mcp://tools/guide (recipes and per-tool sections), mcp://tools/input-enumerations (allowed values) and mcp://vocabulary (the RDF vocabulary the graph tools emit). The agent reads them on demand, so you do not have to write a prompt for it.

Troubleshooting

  • The client cannot connect. An HTTP entry needs a running server. Check that the MCP Server page or the command line says it is running, and that the URL in your config matches the endpoint shown there, including the port.
  • Tools fail with workspace_reloading or graph_service_loading. The index or code graph is still building. The failure carries retryAfterSeconds; a well-behaved agent waits and retries on its own.
  • Tools fail with a license error. The MCP tools follow the Prism for AL license. Install a key or request a trial from the Home page; see Invalid license.
  • The agent keeps using grep. Add the prism-for-al skill above to your repository, and name the Prism tools in your prompt the first few times.
  • A stdio client hangs. Make sure it launches mcp-server-stdio, not mcp-server-http. The HTTP entry point refuses redirected stdio on purpose.

Something off? Use Send feedback in Prism, or let the agent call submit_mcp_feedback on your behalf.