Skip to content

Any stdio client ​

Any program that can start an MCP server over stdio can use PBrokkR. See MCP overview for what the server does. The examples run PBrokkR from the source code in C:\Tools\PBRGenerator (replace it with your folder). With the downloaded program, the command is pbrokkr-cli (pbrokkr-cli.exe on Windows) with the argument mcp, and no PYTHONPATH: see the command an agent must start.

The common JSON form ​

Most clients use this shape, usually in a file named mcp.json or in a mcpServers section of their settings:

json
{
  "mcpServers": {
    "pbrokkr": {
      "command": "C:\\Tools\\PBRGenerator\\.venv\\Scripts\\python.exe",
      "args": ["-m", "pbrgen", "mcp"],
      "env": { "PYTHONPATH": "C:\\Tools\\PBRGenerator" }
    }
  }
}

If your client asks for the three parts separately:

FieldValue
Transportstdio
Commandthe Python of PBrokkR's virtual environment
Arguments-m pbrgen mcp (optionally --library <folder>)
EnvironmentPYTHONPATH = the PBrokkR folder

No client supports environment variables? Use the launcher instead, which sets the path itself: C:\Tools\PBRGenerator\pbrgen.cmd mcp on Windows, /opt/PBRGenerator/pbrgen.sh mcp elsewhere. On Windows some clients cannot start a .cmd file directly; then the command is cmd and the arguments are /c C:\Tools\PBRGenerator\pbrgen.cmd mcp.

What the server speaks ​

ProtocolJSON-RPC 2.0, one message per line, UTF-8
MCP versions2025-06-18, 2025-03-26, 2024-11-05
Capabilitiestools
Outputprotocol messages on stdout only; its one status line and any error go to stderr

Test by hand ​

Send one initialize message and read the answer:

powershell
$env:PYTHONPATH = "C:\Tools\PBRGenerator"
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}' | C:\Tools\PBRGenerator\.venv\Scripts\python.exe -m pbrgen mcp
sh
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}' | PYTHONPATH=/opt/PBRGenerator /opt/PBRGenerator/.venv/bin/python -m pbrgen mcp

A working server answers with one line of JSON that contains "serverInfo": {"name": "pbrgen", ...}.

The official MCP Inspector is a ready-made client with a window, good for trying each tool by hand. Give it the same command, arguments and environment.

Writing your own client ​

  1. Start the process and keep its stdin and stdout open.
  2. Send initialize, read the result, then send the notification notifications/initialized.
  3. tools/list returns the twelve tools with their argument schemas.
  4. tools/call with {"name": "...", "arguments": {...}} runs one. A failed call returns a result with "isError": true and a message that says what to change.