Repository navigation
Using the MCP server
The MCP server lets an AI agent ask LoreMaster how to name and place a Markdown file before it creates one. How it is built is in the architecture note.
Nothing to set up. The LoreMaster extension registers the server itself, so the editor's agent (for example Copilot Chat in agent mode) can see it:
- Install the extension and open the folder you document.
- Open the chat's tools list (or run MCP: List Servers). A server named LoreMaster is listed. Start it if the editor asks.
- Ask the agent to write documentation. It can now call the six tools below.
The server reads the first workspace folder. It uses the engine bundled with the
extension, or the one named by the loreMaster.engine.path setting.
Claude Desktop, Claude Code and other clients take an mcpServers entry. With the
extension installed:
- Open the folder you document in VS Code.
- Run LoreMaster: Copy MCP Server Config from the Command Palette.
- Paste the result into the client's MCP configuration.
The copied config looks like this (the paths are yours):
{
"mcpServers": {
"loremaster": {
"command": "<path to lore-master-engine>",
"args": ["--mcp", "--workspace", "<path to your workspace>"]
}
}
}Without VS Code, run the engine yourself: lore-master-engine --mcp --workspace <folder>.
--workspace defaults to the working directory the process starts in.
No input. Returns the rules the sync applies, in order, so the agent can follow them while
it writes: a parent: line in the file's <!-- lore-master --> annotation wins; then a dotted file name
(readme.architecture.md under readme.md); then the directory's README.md or
index.md; otherwise the page goes under the parent you picked for the sync. Titles are the
first # H1 (or a title: line in the annotation), published as <titlePrefix>: <title>, and must be
unique within the Confluence space.
No input. Returns the page tree the sync would build for this workspace right now, with the rule that placed each page. Use it to see the current structure before adding to it.
Input: path, the workspace-relative path of a Markdown file, for example
docs/architecture/engine.md. Returns where the file will nest and why, and warns when its
title clashes with another page, when it has no H1, or when the sync does not include it at
all (outside the configured roots, or ignored).
Input: h1 (required), parent (optional: an existing page's title or file path) and
directory (optional: workspace-relative). Returns the file path and any annotation that
nests a new page under that parent. It writes nothing: the agent creates the file with
what it returns.
No input. Reads the repository's .github/workflows and .lore-master.yaml and says how the
repository deploys to GitHub Pages and which setting puts the docs site beside that deploy:
build into the app's artifact folder (an Actions-source deploy), publish into a path folder of
the branch (a branch push), or own the branch (nothing else deploys). Returns the
.lore-master.yaml output and the workflow step to use, and warns about what would go wrong: an
app deploy that deletes the docs folder, a branch publish without path, a workflow paths:
filter that will not redeploy on a docs change. It writes nothing.
Input: output (optional: the position of the github-pages output; needed only when there are
several). Renders the site in memory and returns how many pages and files it would contain, the
file list, and the Markdown problems that would stop a build. It writes nothing; the build
itself is lore-master-engine pages build --out DIR or the
GitHub Action.
-
The workspace tools say there is no workspace. The server was started without
--workspaceand outside a folder. Pass--workspace, or start it from the folder. -
A file you expect is missing from
preview_tree. It is outside theroots, matched byexcludesorignore, or ignored by a.gitignorewhileskipGitignoredis on. See Configuration. - The server is not listed in VS Code. Update the extension and VS Code: MCP server registration needs a recent VS Code release.
-
LoreMaster documentation
- A documentation agent that follows the LoreMaster structure
- ADR: One Go engine, thin editor shells
- ADR: Vertical feature slices, in Go and TypeScript
- Choosing what goes where
- Command line
- Confluence editions: the facts the design rests on
- Confluence tenant for recorded fixtures
- Generators: pages written from your project's artifacts
- Getting started: syncing a workspace to Confluence
- GitHub Action: the docs site in one step
- Publishing to a GitHub wiki
- The MCP server
- Two-way sync: pull remote edits back, conflict when both sides change
- Using the MCP server
- Watch mode