Initial commit: Ollama MCP server
Some checks failed
Build and Deploy / build-push (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled

MCP server exposing local Ollama models via LiteLLM proxy to Claude Code.
Tools: query_local_model, review_code, summarize, generate_boilerplate, list_models.
Deployed to k8s ai-inference namespace via ArgoCD.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 17:33:56 +00:00
commit 139a038505
6 changed files with 548 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
name: Build and Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build and push Docker image
run: |
docker login registry.storedbox.net \
-u ${{ secrets.DOCKER_USER }} \
-p ${{ secrets.DOCKER_PASSWORD }}
docker build -t registry.storedbox.net/ollama-mcp:${{ github.sha }} .
docker tag registry.storedbox.net/ollama-mcp:${{ github.sha }} \
registry.storedbox.net/ollama-mcp:latest
docker push registry.storedbox.net/ollama-mcp:${{ github.sha }}
docker push registry.storedbox.net/ollama-mcp:latest
deploy:
runs-on: ubuntu-latest
needs: build-push
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up kubectl
uses: azure/setup-kubectl@v3
- name: Configure kubectl
run: |
echo "${{ secrets.KUBE_CONFIG }}" > kubeconfig
export KUBECONFIG=kubeconfig
- name: Apply k8s manifests
run: |
kubectl apply -f k8s/deployment.yaml --kubeconfig=kubeconfig
- name: Rollout restart to pull latest image
run: |
kubectl rollout restart deployment/ollama-mcp \
-n ai-inference --kubeconfig=kubeconfig
kubectl rollout status deployment/ollama-mcp \
-n ai-inference --kubeconfig=kubeconfig --timeout=120s
- name: Health check
run: |
sleep 10
MCP_IP=$(kubectl get svc ollama-mcp -n ai-inference \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}' \
--kubeconfig=kubeconfig)
curl -f http://${MCP_IP}:8090/health || exit 1
echo "MCP server healthy at http://${MCP_IP}:8090"