@hummingbot/skills 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,17 +4,36 @@ AI agent skills for [Hummingbot](https://hummingbot.org) algorithmic trading inf
|
|
|
4
4
|
|
|
5
5
|
Built on the [Agent Skills](https://agentskills.io) open standard.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Quick Start
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx skills add
|
|
10
|
+
npx hummingbot-skills add
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
This installs Hummingbot skills to your AI agents (Claude Code, Cursor, etc.).
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
14
17
|
```bash
|
|
15
|
-
npx skills add
|
|
18
|
+
npx hummingbot-skills add # Install skills (interactive)
|
|
19
|
+
npx hummingbot-skills list # List installed skills
|
|
20
|
+
npx hummingbot-skills find # Search for skills
|
|
21
|
+
npx hummingbot-skills check # Check for updates
|
|
22
|
+
npx hummingbot-skills update # Update all skills
|
|
23
|
+
npx hummingbot-skills remove # Remove installed skills
|
|
24
|
+
npx hummingbot-skills create # Create a new skill
|
|
16
25
|
```
|
|
17
26
|
|
|
27
|
+
## Available Skills
|
|
28
|
+
|
|
29
|
+
| Skill | Description |
|
|
30
|
+
|-------|-------------|
|
|
31
|
+
| [hummingbot-api-setup](./skills/hummingbot-api-setup/) | Deploy Hummingbot API infrastructure |
|
|
32
|
+
| [keys-manager](./skills/keys-manager/) | Manage spot and perpetual exchange API keys |
|
|
33
|
+
| [executor-creator](./skills/executor-creator/) | Create trading executors (position, grid, DCA, TWAP) |
|
|
34
|
+
| [candles-feed](./skills/candles-feed/) | Fetch market data and technical indicators |
|
|
35
|
+
| [portfolio](./skills/portfolio/) | View balances and positions across exchanges |
|
|
36
|
+
|
|
18
37
|
## Usage
|
|
19
38
|
|
|
20
39
|
After installing, ask your AI agent:
|
|
@@ -24,41 +43,68 @@ After installing, ask your AI agent:
|
|
|
24
43
|
- "Add my Binance API keys"
|
|
25
44
|
- "Set up Hummingbot with Docker"
|
|
26
45
|
|
|
27
|
-
## Available Skills
|
|
28
|
-
|
|
29
|
-
| Skill | Description |
|
|
30
|
-
|-------|-------------|
|
|
31
|
-
| [hummingbot-api-setup](./skills/hummingbot-api-setup/) | Deploy Hummingbot infrastructure (Docker, API, Gateway) |
|
|
32
|
-
| [keys-manager](./skills/keys-manager/) | Manage exchange API credentials |
|
|
33
|
-
| [executor-creator](./skills/executor-creator/) | Create trading executors (position, grid, DCA, TWAP) |
|
|
34
|
-
| [candles-feed](./skills/candles-feed/) | Fetch market data and technical indicators |
|
|
35
|
-
| [portfolio](./skills/portfolio/) | View balances and positions across exchanges |
|
|
36
|
-
|
|
37
46
|
## Prerequisites
|
|
38
47
|
|
|
39
48
|
Skills interact with the Hummingbot API server. Use the `hummingbot-api-setup` skill to deploy it.
|
|
40
49
|
|
|
41
|
-
Configure credentials via `.env` file
|
|
50
|
+
Configure credentials via `.env` file:
|
|
42
51
|
```bash
|
|
43
52
|
API_URL=http://localhost:8000
|
|
44
53
|
API_USER=admin
|
|
45
54
|
API_PASS=admin
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
API docs available at `http://localhost:8000/docs`.
|
|
49
|
-
|
|
50
57
|
## Repository Structure
|
|
51
58
|
|
|
59
|
+
This is a monorepo containing skills, CLI, and webapp:
|
|
60
|
+
|
|
52
61
|
```
|
|
53
62
|
hummingbot/skills/
|
|
54
|
-
├── skills/
|
|
55
|
-
├──
|
|
56
|
-
├──
|
|
57
|
-
└── .
|
|
63
|
+
├── skills/ # Skill definitions (SKILL.md + scripts/)
|
|
64
|
+
├── cli/ # hummingbot-skills CLI (npm package)
|
|
65
|
+
├── app/ # Next.js webapp (skills.hummingbot.org)
|
|
66
|
+
└── .github/ # CI/CD workflows
|
|
58
67
|
```
|
|
59
68
|
|
|
69
|
+
| Component | Description | Docs |
|
|
70
|
+
|-----------|-------------|------|
|
|
71
|
+
| **skills/** | Trading skill definitions | Each skill has its own README |
|
|
72
|
+
| **cli/** | `hummingbot-skills` npm package | [cli/README.md](./cli/README.md) |
|
|
73
|
+
| **app/** | Skills browser webapp | [app/README.md](./app/README.md) |
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
### Skills
|
|
78
|
+
|
|
79
|
+
Each skill is a folder with:
|
|
80
|
+
- `SKILL.md` - Skill definition with frontmatter metadata
|
|
81
|
+
- `scripts/` - Shell scripts the agent can execute
|
|
82
|
+
|
|
83
|
+
### CLI
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
cd cli
|
|
87
|
+
npm install
|
|
88
|
+
npm run build
|
|
89
|
+
npm link # For local testing
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
See [cli/README.md](./cli/README.md) for publishing instructions.
|
|
93
|
+
|
|
94
|
+
### Webapp
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cd app
|
|
98
|
+
npm install
|
|
99
|
+
npm run dev
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
See [app/README.md](./app/README.md) for deployment instructions.
|
|
103
|
+
|
|
60
104
|
## Links
|
|
61
105
|
|
|
62
106
|
- [Skills Webapp](https://skills.hummingbot.org)
|
|
107
|
+
- [CLI on npm](https://www.npmjs.com/package/hummingbot-skills)
|
|
63
108
|
- [Hummingbot](https://hummingbot.org)
|
|
109
|
+
- [Hummingbot API](https://hummingbot.org/hummingbot-api/)
|
|
64
110
|
- [Agent Skills Spec](https://agentskills.io)
|
package/package.json
CHANGED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hummingbot-deploy
|
|
3
|
+
description: Deploy Hummingbot trading infrastructure including API server, MCP server, and Condor Telegram bot. Use this skill when the user wants to install, deploy, set up, or configure Hummingbot.
|
|
4
|
+
metadata:
|
|
5
|
+
author: hummingbot
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# hummingbot-deploy
|
|
9
|
+
|
|
10
|
+
Deploy the Hummingbot trading infrastructure. Before starting, explain to the user what will be installed:
|
|
11
|
+
|
|
12
|
+
## What You're Installing
|
|
13
|
+
|
|
14
|
+
1. **Hummingbot API** (Required): Your personal trading server that exposes a standardized REST API for trading, fetching market data, and deploying bot strategies across many CEXs and DEXs.
|
|
15
|
+
|
|
16
|
+
2. **Hummingbot MCP** (Required): MCP server that helps AI agents (Claude, Gemini, Codex, etc.) interact with Hummingbot API. This is necessary to use Hummingbot Skills.
|
|
17
|
+
|
|
18
|
+
3. **Condor** (Optional): Terminal and Telegram-based UI for Hummingbot API.
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
| Component | Repository |
|
|
23
|
+
|-----------|------------|
|
|
24
|
+
| Hummingbot API | [hummingbot/hummingbot-api](https://github.com/hummingbot/hummingbot-api) |
|
|
25
|
+
| MCP Server | [hummingbot/mcp](https://github.com/hummingbot/mcp) |
|
|
26
|
+
| Condor | [hummingbot/condor](https://github.com/hummingbot/condor) |
|
|
27
|
+
|
|
28
|
+
## Pre-Installation Check
|
|
29
|
+
|
|
30
|
+
First, run the environment check to verify prerequisites:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/check_env.sh)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This checks: container detection, TTY, Docker, Docker Compose, Git, Make.
|
|
37
|
+
|
|
38
|
+
## Install Hummingbot API
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git clone https://github.com/hummingbot/hummingbot-api.git ~/hummingbot-api
|
|
42
|
+
cd ~/hummingbot-api
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**On regular machines** (interactive TTY - check_env.sh shows "Interactive TTY: Yes"):
|
|
46
|
+
```bash
|
|
47
|
+
make setup # Prompts for: API username, password, config password (defaults: admin/admin/admin)
|
|
48
|
+
make deploy
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**In containers** (no TTY - check with `[ -t 0 ] && echo "TTY" || echo "No TTY"`):
|
|
52
|
+
```bash
|
|
53
|
+
# Set USER env var and create sudo shim if needed
|
|
54
|
+
export USER=${USER:-root}
|
|
55
|
+
[ "$(id -u)" = "0" ] && ! command -v sudo &>/dev/null && echo -e '#!/bin/bash\nwhile [[ "$1" == *=* ]]; do export "$1"; shift; done\nexec "$@"' > /usr/local/bin/sudo && chmod +x /usr/local/bin/sudo
|
|
56
|
+
|
|
57
|
+
# Create .env manually (skip interactive setup)
|
|
58
|
+
# Note: In containers, services communicate via Docker network (use container names, not localhost)
|
|
59
|
+
cat > .env << EOF
|
|
60
|
+
USERNAME=admin
|
|
61
|
+
PASSWORD=admin
|
|
62
|
+
CONFIG_PASSWORD=admin
|
|
63
|
+
DEBUG_MODE=false
|
|
64
|
+
BROKER_HOST=hummingbot-broker
|
|
65
|
+
BROKER_PORT=1883
|
|
66
|
+
BROKER_USERNAME=admin
|
|
67
|
+
BROKER_PASSWORD=password
|
|
68
|
+
DATABASE_URL=postgresql+asyncpg://hbot:hummingbot-api@hummingbot-postgres:5432/hummingbot_api
|
|
69
|
+
BOTS_PATH=/hummingbot-api/bots
|
|
70
|
+
EOF
|
|
71
|
+
|
|
72
|
+
# Patch docker-compose.yml (bind mounts don't work in Docker-in-Docker)
|
|
73
|
+
sed -i 's|./bots:/hummingbot-api/bots|hummingbot-bots:/hummingbot-api/bots|g' docker-compose.yml
|
|
74
|
+
sed -i '/init-db.sql.*docker-entrypoint/d' docker-compose.yml
|
|
75
|
+
# Add volume definition (check last 5 lines to avoid false positive from service definition)
|
|
76
|
+
tail -5 docker-compose.yml | grep -q "hummingbot-bots:" || echo " hummingbot-bots: { }" >> docker-compose.yml
|
|
77
|
+
|
|
78
|
+
touch .setup-complete
|
|
79
|
+
make deploy
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Verify:** Wait 2 seconds then check logs for "Uvicorn running on http://0.0.0.0:8000":
|
|
83
|
+
```bash
|
|
84
|
+
sleep 2 && docker logs hummingbot-api 2>&1 | grep -i "uvicorn running"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Install MCP Server
|
|
88
|
+
|
|
89
|
+
Install the MCP server using your CLI's native command. Use the same credentials from API setup.
|
|
90
|
+
|
|
91
|
+
**IMPORTANT:** Do NOT ask the user which CLI to use. You already know which CLI you are:
|
|
92
|
+
- If you are Claude Code, use `claude`
|
|
93
|
+
- If you are Gemini CLI, use `gemini`
|
|
94
|
+
- If you are Codex CLI, use `codex`
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
|
|
98
|
+
--agent <YOUR_CLI> --user <USERNAME> --pass <PASSWORD>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Example for Claude (substitute your actual CLI name and credentials):
|
|
102
|
+
```bash
|
|
103
|
+
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
|
|
104
|
+
--agent claude --user admin --pass admin
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Installation Complete
|
|
108
|
+
|
|
109
|
+
After all components are installed, tell the user:
|
|
110
|
+
|
|
111
|
+
1. **Restart your AI agent** (Claude Code, Gemini CLI, Codex CLI, etc.) to load the MCP server
|
|
112
|
+
2. **Install Hummingbot Skills** to enable trading capabilities:
|
|
113
|
+
```bash
|
|
114
|
+
npx hummingbot-skills add
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Install Condor (Optional)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
git clone https://github.com/hummingbot/condor.git ~/condor
|
|
121
|
+
cd ~/condor
|
|
122
|
+
bash setup-environment.sh # Prompts for Telegram bot token
|
|
123
|
+
make deploy
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Upgrade
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
cd ~/hummingbot-api && git pull && make deploy
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Verify Installation
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/verify.sh)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Troubleshooting
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# View logs
|
|
142
|
+
cd ~/hummingbot-api && docker compose logs -f
|
|
143
|
+
|
|
144
|
+
# Reset
|
|
145
|
+
cd ~/hummingbot-api && docker compose down -v && rm -rf ~/hummingbot-api
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## See Also
|
|
149
|
+
|
|
150
|
+
- [Hummingbot API Docs](https://hummingbot.org/hummingbot-api/)
|
|
151
|
+
- [MCP Server Docs](https://hummingbot.org/mcp/)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Check environment before Hummingbot installation
|
|
4
|
+
# Returns: TTY status, Docker, Git, container detection
|
|
5
|
+
#
|
|
6
|
+
set -eu
|
|
7
|
+
|
|
8
|
+
echo "Environment Check"
|
|
9
|
+
echo "================="
|
|
10
|
+
echo ""
|
|
11
|
+
|
|
12
|
+
# Check if running in container
|
|
13
|
+
if [ -f /.dockerenv ]; then
|
|
14
|
+
echo "Container: Yes (Docker)"
|
|
15
|
+
CONTAINER=true
|
|
16
|
+
elif grep -q docker /proc/1/cgroup 2>/dev/null || grep -q containerd /proc/1/cgroup 2>/dev/null; then
|
|
17
|
+
echo "Container: Yes"
|
|
18
|
+
CONTAINER=true
|
|
19
|
+
else
|
|
20
|
+
echo "Container: No"
|
|
21
|
+
CONTAINER=false
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Check TTY
|
|
25
|
+
if [ -t 0 ]; then
|
|
26
|
+
echo "Interactive TTY: Yes"
|
|
27
|
+
TTY=true
|
|
28
|
+
else
|
|
29
|
+
echo "Interactive TTY: No (will use defaults)"
|
|
30
|
+
TTY=false
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Check Docker
|
|
34
|
+
if command -v docker &>/dev/null; then
|
|
35
|
+
echo "Docker: $(docker --version 2>/dev/null | head -1)"
|
|
36
|
+
if docker info &>/dev/null; then
|
|
37
|
+
echo "Docker daemon: Running"
|
|
38
|
+
else
|
|
39
|
+
echo "Docker daemon: Not running"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
else
|
|
43
|
+
echo "Docker: Not installed"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Check docker compose
|
|
48
|
+
if docker compose version &>/dev/null; then
|
|
49
|
+
echo "Docker Compose: $(docker compose version --short 2>/dev/null)"
|
|
50
|
+
elif command -v docker-compose &>/dev/null; then
|
|
51
|
+
echo "Docker Compose: $(docker-compose --version 2>/dev/null)"
|
|
52
|
+
else
|
|
53
|
+
echo "Docker Compose: Not installed"
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# Check Git
|
|
58
|
+
if command -v git &>/dev/null; then
|
|
59
|
+
echo "Git: $(git --version 2>/dev/null)"
|
|
60
|
+
else
|
|
61
|
+
echo "Git: Not installed"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Check Make
|
|
66
|
+
if command -v make &>/dev/null; then
|
|
67
|
+
echo "Make: Available"
|
|
68
|
+
else
|
|
69
|
+
echo "Make: Not installed (required for setup)"
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo ""
|
|
74
|
+
echo "Ready to install Hummingbot!"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Install Hummingbot MCP Server for AI agents
|
|
4
|
+
# Usage: ./install_mcp.sh --agent <cli> --url <url> --user <user> --pass <pass>
|
|
5
|
+
#
|
|
6
|
+
# Examples:
|
|
7
|
+
# ./install_mcp.sh --agent claude
|
|
8
|
+
# ./install_mcp.sh --agent gemini --user admin --pass admin
|
|
9
|
+
# ./install_mcp.sh --agent codex --url http://localhost:8000
|
|
10
|
+
#
|
|
11
|
+
set -eu
|
|
12
|
+
|
|
13
|
+
# Detect OS for Docker host URL
|
|
14
|
+
# MCP runs in Docker, so it needs host.docker.internal (Mac/Windows) or host-gateway (Linux)
|
|
15
|
+
get_docker_host_url() {
|
|
16
|
+
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
17
|
+
if [[ "$os" == "darwin" ]] || [[ "$os" == *"mingw"* ]] || [[ "$os" == *"msys"* ]]; then
|
|
18
|
+
# macOS or Windows - use host.docker.internal
|
|
19
|
+
echo "http://host.docker.internal:8000"
|
|
20
|
+
else
|
|
21
|
+
# Linux - host.docker.internal works with Docker 20.10+
|
|
22
|
+
echo "http://host.docker.internal:8000"
|
|
23
|
+
fi
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# Defaults
|
|
27
|
+
API_URL=$(get_docker_host_url)
|
|
28
|
+
API_USER="admin"
|
|
29
|
+
API_PASS="admin"
|
|
30
|
+
AGENT_CLI=""
|
|
31
|
+
MCP_IMAGE="hummingbot/hummingbot-mcp:latest"
|
|
32
|
+
|
|
33
|
+
# Parse arguments
|
|
34
|
+
while [[ $# -gt 0 ]]; do
|
|
35
|
+
case $1 in
|
|
36
|
+
--agent) AGENT_CLI="$2"; shift 2 ;;
|
|
37
|
+
--url) API_URL="$2"; shift 2 ;;
|
|
38
|
+
--user) API_USER="$2"; shift 2 ;;
|
|
39
|
+
--pass) API_PASS="$2"; shift 2 ;;
|
|
40
|
+
-h|--help)
|
|
41
|
+
echo "Usage: $0 --agent <cli> [--url <url>] [--user <user>] [--pass <pass>]"
|
|
42
|
+
echo ""
|
|
43
|
+
echo "Options:"
|
|
44
|
+
echo " --agent CLI Agent CLI command (claude, gemini, codex, etc.)"
|
|
45
|
+
echo " --url URL Hummingbot API URL (default: http://host.docker.internal:8000)"
|
|
46
|
+
echo " --user USER API username (default: admin)"
|
|
47
|
+
echo " --pass PASS API password (default: admin)"
|
|
48
|
+
echo ""
|
|
49
|
+
echo "Examples:"
|
|
50
|
+
echo " $0 --agent claude"
|
|
51
|
+
echo " $0 --agent gemini --user myuser --pass mypass"
|
|
52
|
+
exit 0
|
|
53
|
+
;;
|
|
54
|
+
*) shift ;;
|
|
55
|
+
esac
|
|
56
|
+
done
|
|
57
|
+
|
|
58
|
+
# Validate agent
|
|
59
|
+
if [[ -z "$AGENT_CLI" ]]; then
|
|
60
|
+
echo "Error: --agent is required"
|
|
61
|
+
echo "Usage: $0 --agent <cli> [--url <url>] [--user <user>] [--pass <pass>]"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Check if agent CLI exists
|
|
66
|
+
if ! command -v "$AGENT_CLI" &>/dev/null; then
|
|
67
|
+
echo "Error: '$AGENT_CLI' command not found"
|
|
68
|
+
exit 1
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
echo "Installing Hummingbot MCP Server"
|
|
72
|
+
echo "================================"
|
|
73
|
+
echo "Agent CLI: $AGENT_CLI"
|
|
74
|
+
echo "API URL: $API_URL"
|
|
75
|
+
echo "API User: $API_USER"
|
|
76
|
+
echo ""
|
|
77
|
+
|
|
78
|
+
# Pull MCP image
|
|
79
|
+
echo "Pulling MCP image..."
|
|
80
|
+
docker pull "$MCP_IMAGE"
|
|
81
|
+
|
|
82
|
+
# Configure MCP for the agent
|
|
83
|
+
echo "Configuring MCP for $AGENT_CLI..."
|
|
84
|
+
|
|
85
|
+
# Build the docker command
|
|
86
|
+
DOCKER_CMD="docker run --rm -i -e HUMMINGBOT_API_URL=$API_URL -e HUMMINGBOT_API_USERNAME=$API_USER -e HUMMINGBOT_API_PASSWORD=$API_PASS -v hummingbot_mcp:/root/.hummingbot_mcp $MCP_IMAGE"
|
|
87
|
+
|
|
88
|
+
# Different CLIs have slightly different syntax
|
|
89
|
+
case "$AGENT_CLI" in
|
|
90
|
+
gemini)
|
|
91
|
+
# Gemini: gemini mcp add <name> <command> [args...]
|
|
92
|
+
$AGENT_CLI mcp add hummingbot $DOCKER_CMD
|
|
93
|
+
;;
|
|
94
|
+
*)
|
|
95
|
+
# Claude/Codex: <cli> mcp add <name> -- <command> [args...]
|
|
96
|
+
$AGENT_CLI mcp add hummingbot -- $DOCKER_CMD
|
|
97
|
+
;;
|
|
98
|
+
esac
|
|
99
|
+
|
|
100
|
+
echo ""
|
|
101
|
+
echo "Done! Restart $AGENT_CLI to load the MCP server."
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Verify Hummingbot API installation
|
|
4
|
+
# Checks if the Swagger UI is accessible at http://localhost:8000/docs/
|
|
5
|
+
#
|
|
6
|
+
set -eu
|
|
7
|
+
|
|
8
|
+
API_URL="${API_URL:-http://localhost:8000}"
|
|
9
|
+
|
|
10
|
+
echo "Verifying Hummingbot API installation..."
|
|
11
|
+
echo ""
|
|
12
|
+
|
|
13
|
+
# Check if docs page is accessible (contains Swagger UI)
|
|
14
|
+
if curl -s "$API_URL/docs" 2>/dev/null | grep -qi "swagger"; then
|
|
15
|
+
echo "✓ Hummingbot API is running"
|
|
16
|
+
echo " Swagger UI: $API_URL/docs"
|
|
17
|
+
echo " Credentials: admin/admin (or as configured)"
|
|
18
|
+
exit 0
|
|
19
|
+
else
|
|
20
|
+
echo "✗ Hummingbot API is not accessible at $API_URL/docs"
|
|
21
|
+
echo ""
|
|
22
|
+
echo "Troubleshooting:"
|
|
23
|
+
echo " 1. Check if containers are running: docker ps | grep hummingbot"
|
|
24
|
+
echo " 2. View logs: cd ~/hummingbot-api && docker compose logs -f"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|