Skip to content
Merged
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
16 changes: 15 additions & 1 deletion obol-adk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,18 @@ This agent is designed to be run using the ADK Web UI. It connects to Filesystem

## Improvements

- Awaiting MCP public package for Foundry MCP server https://github.com/PraneshASP/foundry-mcp-server?tab=readme-ov-file#setup-using-npm-package
- Awaiting MCP public package for Foundry MCP server https://github.com/PraneshASP/foundry-mcp-server?tab=readme-ov-file#setup-using-npm-package
## Docker Images for MCP Servers

Dockerfiles that package the MCP servers used by `obol-agent-web` are located in the `dockerfiles/` directory:

- **Dockerfile.filesystem** – packages the Filesystem MCP server.
- **Dockerfile.obol** – packages the Obol MCP server.
- **Dockerfile.kubernetes** – packages the Kubernetes MCP server.
- **Dockerfile.foundry** – packages the Foundry MCP server.

These images can be built and pushed to your own registry, for example:

```bash
docker build -f dockerfiles/Dockerfile.obol -t <registry>/obol-mcp:latest .
```
15 changes: 15 additions & 0 deletions obol-adk/dockerfiles/Dockerfile.filesystem
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dockerfile to run the Filesystem MCP server
FROM node:lts-slim

WORKDIR /app

# Preinstall the server so the image has no runtime dependencies
RUN npm install -g @modelcontextprotocol/server-filesystem

# Optional: copy documentation directory into the image
COPY ../docs /data/docs

EXPOSE 8080

# Launch the server with the docs directory
CMD ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/data/docs"]
12 changes: 12 additions & 0 deletions obol-adk/dockerfiles/Dockerfile.foundry
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dockerfile to run the Foundry MCP server
FROM node:lts-slim

WORKDIR /app

# Install the Foundry MCP server when it becomes publicly available
# This package may still be under development
RUN npm install -g foundry-mcp-server

EXPOSE 8080

CMD ["node", "/usr/local/lib/node_modules/foundry-mcp-server/dist/index.js"]
11 changes: 11 additions & 0 deletions obol-adk/dockerfiles/Dockerfile.kubernetes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dockerfile to run the Kubernetes MCP server
FROM node:lts-slim

WORKDIR /app

# Install the Kubernetes MCP server package
RUN npm install -g mcp-server-kubernetes@latest

EXPOSE 8080

CMD ["mcp-server-kubernetes"]
14 changes: 14 additions & 0 deletions obol-adk/dockerfiles/Dockerfile.obol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dockerfile to run the Obol MCP server
FROM python:3.11-slim

WORKDIR /server

# Install uv runner
RUN pip install --no-cache-dir uvicorn uv

# Copy server implementation (expected to be present at build time)
COPY ../obol-mcp /server

EXPOSE 8080

CMD ["uv", "run", "/server/server.py"]
52 changes: 51 additions & 1 deletion obolup/obolup
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,47 @@ check_obolup_update() {
fi
}

# Ensure GOOGLE_API_KEY is available and stored in the cluster
setup_google_api_key_secret() {
if [ -z "$GOOGLE_API_KEY" ]; then
log_info "No GOOGLE_API_KEY detected."
echo "Please open https://aistudio.google.com/apikey and copy your key."
read -rp "Paste Google API key: " GOOGLE_API_KEY
fi

if kubectl get secret google-api-key >/dev/null 2>&1; then
kubectl delete secret google-api-key >/dev/null 2>&1 || true
fi

kubectl create secret generic google-api-key --from-literal=GOOGLE_API_KEY="$GOOGLE_API_KEY" >/dev/null 2>&1
log_info "Google API key secret configured."
}

# Build the obol-adk Docker image and deploy it to the Kind cluster
build_and_deploy_obol_agent() {
log_info "Building obol-agent Docker image..."
ensure docker build -t obol-agent:latest ./obol-adk

log_info "Loading image into Kind cluster..."
ensure kind load docker-image obol-agent:latest --name "$STACK_NAME"

log_info "Deploying obol-agent to cluster..."
if kubectl get deployment obol-agent >/dev/null 2>&1; then
kubectl set image deployment/obol-agent obol-agent=obol-agent:latest >/dev/null
else
kubectl create deployment obol-agent --image=obol-agent:latest --port=8000 >/dev/null
fi

kubectl expose deployment obol-agent --name=obol-agent --port=8000 --type=ClusterIP --overwrite >/dev/null 2>&1 || true
}

# Port-forward and open the obol-agent interface
open_obol_agent_interface() {
log_info "Opening obol-agent interface at http://localhost:8000..."
kubectl port-forward svc/obol-agent 8000:8000 >/dev/null 2>&1 &
xdg-open "http://localhost:8000" 2>/dev/null || open "http://localhost:8000" 2>/dev/null || log_warn "Could not open browser automatically."
}

# Launch or update the Obol Stack
launch_stack() {
log_info "Launching core Obol Stack services..."
Expand All @@ -232,6 +273,9 @@ EOF
unset KIND_EXPERIMENTAL_DOCKER_CONTAINER_EXTRA_ARGS
fi

# Ensure the Google API key is available inside the cluster
setup_google_api_key_secret

# Apply base Obol Stack resources (e.g., namespaces, monitoring)
#log_info "Applying Obol Stack base resources..."
#kubectl apply -f https://stack.obol.org/base.yaml || log_error "Failed to apply base resources."
Expand Down Expand Up @@ -260,6 +304,9 @@ EOF
# Todo(Oisin): Blockscout segfaulting, unclear why
# ensure obol install ethereum/blockscout --values ../values/blockscout.yaml

# Build and deploy obol-agent
build_and_deploy_obol_agent

# Check stack health
log_info "Checking stack health..."
# if ! kubectl get pods -n obol-system -o jsonpath='{.items[*].status.phase}' | grep -q "Running"; then
Expand Down Expand Up @@ -293,6 +340,9 @@ main() {
launch_stack

log_info "Obol Stack is up and running!"

# Open the obol-agent interface
open_obol_agent_interface
}


Expand All @@ -318,4 +368,4 @@ Docs : https://docs.obol.org/
}

# Run main
main "$@"
main "$@"