Compare commits

...
1 Commits
Author SHA1 Message Date
praisonai-triage-agent[bot]andMervin Praison 7e1ca6b1fa fix: resolve gbr-mcp path to absolute + document GBR_MCP_JS override
Fixes Greptile P1: relative gbr-mcp.js arg resolved from the caller CWD,
causing Node to fail to locate the entrypoint. Now uses os.path.abspath with
a GBR_MCP_JS env override, documented in README.

Co-authored-by: Mervin Praison <[email protected]>
2026-08-23 20:09:40 +00:00
2 changed files with 17 additions and 6 deletions

No files matched your search

+3
View File
@@ -136,6 +136,9 @@ These examples comply with MCP Protocol Version 2025-11-25:
Pair a phone running [Build Remote Agent](https://grokbuildremote.com/) to a PraisonAI agent via MCP stdio `gbr-mcp` (protocol `gbr/1`). Requires `gbr-agent pair && gbr-agent run`. Phone is spectator. Never put mailbox keys in the example.
Clone [`GrokBuildRemote-Agents`](https://github.com/LinespottingOrg/GrokBuildRemote-Agents), run `npm install` in `mcp/gbr-mcp`, then point `GBR_MCP_JS` at the entrypoint (defaults to `GrokBuildRemote-Agents/mcp/gbr-mcp/bin/gbr-mcp.js` relative to the clone; resolved to an absolute path so the example runs from any directory):
```bash
export GBR_MCP_JS=/abs/path/to/GrokBuildRemote-Agents/mcp/gbr-mcp/bin/gbr-mcp.js
python gbr_pair.py
```
+14 -6
View File
@@ -19,10 +19,21 @@ Independent product by Linespotting AB. Not affiliated with xAI or SpaceX.
https://grokbuildremote.com/
"""
import os
from praisonaiagents import Agent, MCP
# Clone https://github.com/LinespottingOrg/GrokBuildRemote-Agents.git
# then point args at mcp/gbr-mcp/bin/gbr-mcp.js (loopback stdio).
# Clone https://github.com/LinespottingOrg/GrokBuildRemote-Agents.git then point
# GBR_MCP_JS at mcp/gbr-mcp/bin/gbr-mcp.js (loopback stdio). Resolved to an
# absolute path so the example runs from any working directory. Override with:
# export GBR_MCP_JS=/abs/path/to/GrokBuildRemote-Agents/mcp/gbr-mcp/bin/gbr-mcp.js
GBR_MCP_JS = os.path.abspath(
os.environ.get(
"GBR_MCP_JS",
"GrokBuildRemote-Agents/mcp/gbr-mcp/bin/gbr-mcp.js",
)
)
gbr = Agent(
instructions=(
"You can attach a phone spectator via Build Remote Agent. "
@@ -30,10 +41,7 @@ gbr = Agent(
"at 127.0.0.1:8788. Do not request mailbox keys."
),
llm="gpt-4o-mini",
tools=MCP(
"node",
args=["GrokBuildRemote-Agents/mcp/gbr-mcp/bin/gbr-mcp.js"],
),
tools=MCP("node", args=[GBR_MCP_JS]),
)
if __name__ == "__main__":