aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mcp.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-02-12 07:33:41 +0800
committerGitHub <noreply@github.com>2025-02-12 07:33:41 +0800
commit4ac72b584526765f980baca4454b613e0f56c1fb (patch)
treee816ca0baf9e27be41c05626d978a1cc9ed39f68 /scripts/mcp.sh
parent50ee642b3e109839b52c787a8a999a2e56d36483 (diff)
downloadllm-functions-docker-4ac72b584526765f980baca4454b613e0f56c1fb.tar.gz
feat: support check-related features (#162)
We can run `argc check` to ensure that everything is ready (environment variables, Node/Python dependencies, mcp-bridge server)
Diffstat (limited to 'scripts/mcp.sh')
-rwxr-xr-xscripts/mcp.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/mcp.sh b/scripts/mcp.sh
index 87b5183..6e55ca8 100755
--- a/scripts/mcp.sh
+++ b/scripts/mcp.sh
@@ -46,6 +46,18 @@ stop() {
"$0" recovery-functions -S
}
+# @cmd Check the mcp bridge server is running
+check() {
+ if [[ -f "$MCP_JSON_PATH" ]]; then
+ echo "Check mcp/bridge"
+ pid="$(get-server-pid)"
+ if [[ -z "$pid" ]]; then
+ stop
+ echo "✗ server is not running"
+ fi
+ fi
+}
+
# @cmd Run the mcp tool
# @arg tool![`_choice_tool`] The tool name
# @arg json The json data