-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdemo_sqlite.sh
More file actions
executable file
·67 lines (51 loc) · 1.67 KB
/
demo_sqlite.sh
File metadata and controls
executable file
·67 lines (51 loc) · 1.67 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
#!/bin/bash
# Demo script for MCP OAuth Proxy with SQLite
set -e
echo "🚀 MCP OAuth Proxy SQLite Demo"
echo "================================"
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
print_info() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
# Check if Go is installed
if ! command -v go &> /dev/null; then
echo "❌ Go is not installed. Please install Go 1.21 or later."
exit 1
fi
print_info "Go version: $(go version)"
# Build the application
print_info "Building the application..."
go build -o bin/mcp-oauth-proxy .
print_success "Application built successfully"
# Set up environment variables for SQLite demo
export SCOPES_SUPPORTED="openid,profile,email"
export OAUTH_CLIENT_ID="demo_client_id"
export OAUTH_CLIENT_SECRET="demo_client_secret"
export OAUTH_AUTHORIZE_URL="https://demo.example.com/oauth/authorize"
export MCP_SERVER_URL="http://localhost:3000"
# Clear DATABASE_DSN to use SQLite
unset DATABASE_DSN
print_info "Environment variables set:"
print_info " SCOPES_SUPPORTED: $SCOPES_SUPPORTED"
print_info " OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID"
print_info " OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET"
print_info " OAUTH_AUTHORIZE_URL: $OAUTH_AUTHORIZE_URL"
print_info " MCP_SERVER_URL: $MCP_SERVER_URL"
print_info " DATABASE_DSN: (not set - will use SQLite)"
print_info "Starting OAuth proxy with SQLite database..."
print_info "The database will be created at: data/oauth_proxy.db"
echo ""
print_warning "Press Ctrl+C to stop the server"
echo ""
# Run the application
./bin/mcp-oauth-proxy