Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/server/auth-middleware/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import (
// This example demonstrates how to integrate auth.RequireBearerToken middleware
// with an MCP server to provide authenticated access to MCP tools and resources.

var httpAddr = flag.String("http", ":8080", "HTTP address to listen on")
// Default to loopback to avoid exposing powerful demo endpoints to the local network.
// Set -http 0.0.0.0:8080 to intentionally expose it.
var httpAddr = flag.String("http", "localhost:8080", "HTTP address to listen on")

// JWTClaims represents the claims in our JWT tokens.
// In a real application, you would include additional claims like issuer, audience, etc.
Expand Down
4 changes: 2 additions & 2 deletions scripts/server-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ fi
go build -o "$WORKDIR/conformance-server" ./conformance/everything-server

# Start the server in the background
echo "Starting conformance server on port $PORT..."
"$WORKDIR/conformance-server" -http=":$PORT" &
echo "Starting conformance server on localhost:$PORT..."
"$WORKDIR/conformance-server" -http="localhost:$PORT" &
SERVER_PID=$!

echo "Server pid is $SERVER_PID"
Expand Down