PBToolboxAI v4 ← Site

13. AI assistant: the documentation MCP server #

← Release notes · Contents


An AI assistant (Claude Code, Claude Desktop, Cursor, VS Code…) that writes PowerScript for PBToolboxAI does not know the library: it guesses method names, arguments, events — and gets them wrong with confidence. The documentation MCP server gives it the exact API of your version: it looks it up instead of making it up, and checks the code it proposes to you.

13.1 What it is #

13.2 Installing it #

It ships in the demo package, in the mcp\ folder: the server (server\server.js), the documentation it serves (index\) and a README.md. Nothing to download, nothing else to install but Node.js 18 or later (nodejs.org) — node --version tells you yours.

Unzip the package, then keep the mcp\ folder where it will stay — for example C:\PBToolboxAI\mcp\, the path used in the examples below: the assistant's configuration names the full path of server\server.js.

13.3 Declaring it to your assistant #

Everywhere, the command is node and its argument the full path of server\server.js. In a JSON file, every backslash of the path is doubled.

Claude Code — one command line. The options come before the server name; --scope user makes it available in all your projects (without it, only in the current one):

claude mcp add --scope user pbtoolboxai-docs -- node C:\PBToolboxAI\mcp\server\server.js

A path with spaces goes between double quotes:

claude mcp add --scope user pbtoolboxai-docs -- node "C:\Program Files\PBToolboxAI\mcp\server\server.js"

Or, for the whole team of a project, the .mcp.json file at its root (what claude mcp add --scope project writes) — Claude Desktop and Cursor take the same content:

{
  "mcpServers": {
    "pbtoolboxai-docs": {
      "command": "node",
      "args": ["C:\\PBToolboxAI\\mcp\\server\\server.js"]
    }
  }
}

VS Code — .vscode/mcp.json in the project, or the MCP: Open User Configuration command for all your workspaces; the key is servers and the type stdio:

{
  "servers": {
    "pbtoolboxai-docs": {
      "type": "stdio",
      "command": "node",
      "args": ["C:\\PBToolboxAI\\mcp\\server\\server.js"]
    }
  }
}

13.4 The tools #

The assistant picks the tool that answers its question by itself:

ToolWhat it answers
list_componentsThe components: class, visual or not, version introduced, free or paid, rubric
get_componentA component's whole API: properties, methods, events, constants, item handles, inherited members; dll gives the external functions of the DLL to declare
get_memberOne member: exact signature and overloads, return codes, description, an example, what changed from one version to the next; also the exact declaration of a PBT_* function
get_topicA general page or one of its sections in full: installation, themes, rich text markup, language, licence…
searchA free-text search over the whole documentation, ranked results
get_examplesA component's complete PowerScript examples
check_codeChecks PowerScript: unknown method or property, an of_set_*/of_get_* invented in place of a property, unknown event or one written with its former arguments, wrong number of arguments, removed member, a handle asked to build, wrong /*name*/ annotation, old vocabulary, event argument that does not exist, the code an add returns taken for a handle or called like an object
get_migrationThe migration guides, from each version to the next (the latest by default), for one component or for all

13.5 Getting the most from it #