Skip to content

Commit e5f9a98

Browse files
authored
fix: argc build reserve mcp functions (#183)
1 parent 358a539 commit e5f9a98

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Argcfile.sh

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ build() {
7171
else
7272
echo 'Skipped building agents since agents.txt is missing'
7373
fi
74+
if [[ -f mcp.json ]]; then
75+
argc mcp merge-functions -S
76+
fi
7477
}
7578

7679
# @cmd Build tools

scripts/mcp.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ recovery-functions() {
131131

132132
# @cmd Generate function declarations for the mcp tools
133133
generate-declarations() {
134-
curl -sS http://localhost:$MCP_BRIDGE_PORT/tools
134+
pid="$(get-server-pid)"
135+
if [[ -n "$pid" ]]; then
136+
curl -sS http://localhost:$MCP_BRIDGE_PORT/tools
137+
else
138+
echo "[]"
139+
fi
135140
}
136141

137142
# @cmd Wait for the mcp bridge server to ready

0 commit comments

Comments
 (0)