bc-word-layout-mcp

An MCP (Model Context Protocol) server that lets AI agents create, edit, validate, and preview
Microsoft Word report layouts for Microsoft Dynamics 365 Business Central through deterministic,
typed tools, instead of editing the OOXML by hand, where one misplaced element silently corrupts the
document.
- 30 typed MCP tools over stdio: inspect a layout and its dataset, author fields, labels, pictures,
repeater tables and table structure, format text and cells, and refresh a layout after its dataset
changes.
- Every edit is validated before it is saved, and refused with the file untouched if it would
corrupt the layout.
- An offline mock PDF preview the agent can look at, and a dry-run merge that finds unresolved
bindings.
- One response shape for every tool, with an actionable hint on every error.
Install
The server reads and writes layout files with your permissions, at the paths the agent gives it.
Point it only at repositories and layouts you trust, as you would any local build tool.
Plugin: the server and its skills (recommended)
The plugin installs the server together with four skills that teach an agent how to use it (see
Skills). This repository is a plugin marketplace:
- Claude Code:
/plugin marketplace add TKapitan/bc-word-layout-mcp, then install the
bc-word-layout plugin.
- VS Code / GitHub Copilot (agent plugins, preview; Copilot CLI too): add
"chat.plugins.marketplaces": ["TKapitan/bc-word-layout-mcp"] to your user settings.json, then
install the bc-word-layout plugin.
NuGet package via dnx (needs the .NET 10 SDK)
dnx, part of the .NET 10 SDK, fetches and runs
the server on demand.
VS Code (.vscode/mcp.json, or user-level mcp.json):
{
"servers": {
"bc-word-layout": {
"type": "stdio",
"command": "dnx",
"args": ["BcWordLayout.Mcp", "--yes"]
}
}
}
Claude Code (.mcp.json in a project):
{
"mcpServers": {
"bc-word-layout": {
"command": "dnx",
"args": ["BcWordLayout.Mcp", "--yes"]
}
}
}
or for your user: claude mcp add bc-word-layout -- dnx BcWordLayout.Mcp --yes.
Without a version, dnx runs the latest stable release. Pin one with [email protected]; a
pre-release runs only when pinned. dotnet tool install -g BcWordLayout.Mcp installs the same server
as the bc-word-layout-mcp command instead.
Self-contained Windows binaries (no .NET needed)
Each GitHub Release has win-x64 and
win-arm64 zips and an installer script that unpacks the latest one to
%LOCALAPPDATA%\bc-word-layout-mcp\current\, verifies its checksum, and prints the config block to
paste:
irm https://github.com/TKapitan/bc-word-layout-mcp/releases/latest/download/install.ps1 | iex
For a specific version, run that release's own script with -Version:
& ([scriptblock]::Create((irm https://github.com/TKapitan/bc-word-layout-mcp/releases/download/v1.2.3/install.ps1))) -Version 1.2.3
To run the server from a clone of this repository, see CONTRIBUTING.md.
Skills
The server works on its own, but agents use it noticeably better with its skills. The plugin installs
them; without it, copy the folders under skills/ into your project's .claude/skills/ or
.github/skills/ (or your user-level ~/.claude/skills/).
al-word-layout: the intended workflow (inspect → edit → validate
→ preview → sandbox verify), the full tool reference, and the error codes.
al-word-layout-design: what a new layout should look like,
from Business Central's own document conventions.
al-word-layout-from-design: from a finished Word design
and the report's empty layout to a bound layout.
al-word-layout-composite: composable layouts, meaning the
report body, a reusable header/footer layout, and a report theme.
Requirements