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:
{
"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:
| Field | Value |
|---|---|
| Transport | stdio |
| Command | the Python of PBrokkR's virtual environment |
| Arguments | -m pbrgen mcp (optionally --library <folder>) |
| Environment | PYTHONPATH = 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
| Protocol | JSON-RPC 2.0, one message per line, UTF-8 |
| MCP versions | 2025-06-18, 2025-03-26, 2024-11-05 |
| Capabilities | tools |
| Output | protocol 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:
$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 mcpecho '{"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 mcpA 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
- Start the process and keep its stdin and stdout open.
- Send
initialize, read the result, then send the notificationnotifications/initialized. tools/listreturns the twelve tools with their argument schemas.tools/callwith{"name": "...", "arguments": {...}}runs one. A failed call returns a result with"isError": trueand a message that says what to change.