-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·89 lines (80 loc) · 2.76 KB
/
setup.sh
File metadata and controls
executable file
·89 lines (80 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
# Supermodel MCP Server Setup Script
# This script configures the MCP_TOOL_TIMEOUT environment variable
set -e
TIMEOUT_VALUE="900000"
EXPORT_LINE="export MCP_TOOL_TIMEOUT=${TIMEOUT_VALUE}"
echo ""
echo "Supermodel MCP Server Setup"
echo "============================"
echo ""
# Set timeout for this script process (won't affect your terminal)
export MCP_TOOL_TIMEOUT=${TIMEOUT_VALUE}
echo "✓ Will set MCP_TOOL_TIMEOUT=${TIMEOUT_VALUE} (reload shell to apply)"
# Detect user's shell
SHELL_NAME=$(basename "$SHELL")
PROFILE_FILE=""
if [ "$SHELL_NAME" = "zsh" ]; then
PROFILE_FILE="$HOME/.zshrc"
elif [ "$SHELL_NAME" = "bash" ]; then
# For bash, prefer .bash_profile for login shells (macOS/Linux)
# If .bash_profile exists but doesn't source .bashrc, warn the user
if [ -f "$HOME/.bash_profile" ]; then
PROFILE_FILE="$HOME/.bash_profile"
if [ -f "$HOME/.bashrc" ] && ! grep -q "\.bashrc" "$HOME/.bash_profile"; then
echo "⚠ Note: Your .bash_profile doesn't source .bashrc"
echo " Consider adding: source ~/.bashrc"
fi
elif [ -f "$HOME/.bashrc" ]; then
PROFILE_FILE="$HOME/.bashrc"
else
PROFILE_FILE="$HOME/.bashrc"
fi
else
echo "⚠ Warning: Unsupported shell ($SHELL_NAME). Defaulting to ~/.bashrc"
PROFILE_FILE="$HOME/.bashrc"
fi
# Check if the export line already exists in the profile
if [ -f "$PROFILE_FILE" ] && grep -q "^export MCP_TOOL_TIMEOUT=" "$PROFILE_FILE"; then
echo "✓ MCP_TOOL_TIMEOUT already configured in $PROFILE_FILE"
else
# Add the export line to the profile
echo "" >> "$PROFILE_FILE"
echo "# Supermodel MCP Server timeout configuration" >> "$PROFILE_FILE"
echo "$EXPORT_LINE" >> "$PROFILE_FILE"
echo "✓ Added MCP_TOOL_TIMEOUT to $PROFILE_FILE"
fi
echo ""
echo "Next Steps:"
echo "==========="
echo ""
echo "1. Reload your shell profile:"
echo " source $PROFILE_FILE"
echo ""
echo "2. Get your API key from:"
echo " https://dashboard.supermodeltools.com"
echo ""
echo "3. Set your API key globally (recommended):"
echo " echo 'export SUPERMODEL_API_KEY=\"your-api-key\"' >> $PROFILE_FILE"
echo " source $PROFILE_FILE"
echo ""
echo "4. Install the MCP server:"
echo " npm install -g @supermodeltools/mcp-server"
echo ""
echo "5. Add the server to your MCP client:"
echo " - For Claude Code:"
echo " claude mcp add supermodel -- npx -y @supermodeltools/mcp-server"
echo ""
echo " - For Cursor/Claude Desktop:"
echo " Add to your MCP config file:"
echo " {"
echo " \"mcpServers\": {"
echo " \"supermodel\": {"
echo " \"command\": \"npx\","
echo " \"args\": [\"-y\", \"@supermodeltools/mcp-server\"]"
echo " }"
echo " }"
echo " }"
echo ""
echo "Setup complete! ✓"
echo ""