Skip to content

Commit 26fd009

Browse files
committed
Merge develop into main for v1.0.0 release
- Remote MCP server with OAuth - All 113 tools with title annotations - Branded landing page - Production deployment workflow - 100% OpenAPI coverage
2 parents 7692c24 + 1658aa6 commit 26fd009

44 files changed

Lines changed: 18243 additions & 1327 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Build output (rebuilt in container)
5+
dist
6+
7+
# Development files
8+
.git
9+
.gitignore
10+
.env
11+
.env.*
12+
13+
# IDE
14+
.vscode
15+
.idea
16+
17+
# Testing
18+
coverage
19+
*.test.ts
20+
tests
21+
22+
# Documentation
23+
*.md
24+
!README.md
25+
26+
# Local configs
27+
.claude
28+
.api-baseline
29+
30+
# OS files
31+
.DS_Store
32+
Thumbs.db

.github/workflows/beta-deploy.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Check for API Updates
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1' # Every Monday at 9am UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
12+
jobs:
13+
check-updates:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Check OpenAPI spec for changes
20+
id: api-check
21+
run: |
22+
curl -s https://developer.digitalsamba.com/rest-api/openapi.yaml -o openapi-new.yaml
23+
24+
if ! diff -q openapi-stored.yaml openapi-new.yaml > /dev/null 2>&1; then
25+
echo "api_changed=true" >> $GITHUB_OUTPUT
26+
echo "API spec has changed"
27+
28+
# Generate a summary of changes
29+
echo "## Changes detected:" > /tmp/diff-summary.md
30+
diff openapi-stored.yaml openapi-new.yaml | head -100 >> /tmp/diff-summary.md || true
31+
else
32+
echo "api_changed=false" >> $GITHUB_OUTPUT
33+
echo "API spec unchanged"
34+
fi
35+
36+
- name: Create issue for API changes
37+
if: steps.api-check.outputs.api_changed == 'true'
38+
env:
39+
GH_TOKEN: ${{ github.token }}
40+
run: |
41+
EXISTING=$(gh issue list --label "api-update" --state open --json number --jq 'length')
42+
if [ "$EXISTING" -gt 0 ]; then
43+
echo "API update issue already exists"
44+
exit 0
45+
fi
46+
47+
DATE=$(date +%Y-%m-%d)
48+
cat << 'ISSUE_BODY' > /tmp/issue-body.md
49+
The Digital Samba OpenAPI specification has changed. The MCP server tools may need updating.
50+
51+
## What to Check
52+
53+
1. **New endpoints** - May need new MCP tools
54+
2. **Changed parameters** - Update existing tool schemas
55+
3. **Removed endpoints** - Deprecate/remove affected tools
56+
4. **Response changes** - Update type definitions
57+
58+
## Next Steps
59+
60+
1. Start a Claude Code session in this repo
61+
2. Run `/project-start`
62+
3. Ask Claude to analyze the API changes:
63+
64+
```
65+
Compare openapi-stored.yaml with the current spec at https://developer.digitalsamba.com/rest-api/openapi.yaml
66+
67+
Identify:
68+
- New endpoints that need MCP tools
69+
- Changed parameters in existing endpoints
70+
- Removed endpoints (flag tools for removal)
71+
- Response type changes
72+
73+
Update the MCP server accordingly and replace openapi-stored.yaml with the new spec.
74+
```
75+
76+
## Files to Update
77+
78+
- `src/digital-samba-api.ts` - API client methods
79+
- `src/tools/*/index.ts` - Tool schemas and handlers
80+
- `src/types/*.ts` - Type definitions
81+
- `openapi-stored.yaml` - Replace with new spec after updates
82+
ISSUE_BODY
83+
echo "" >> /tmp/issue-body.md
84+
echo "---" >> /tmp/issue-body.md
85+
echo "*Detected by automated check on ${DATE}*" >> /tmp/issue-body.md
86+
87+
gh issue create \
88+
--title "API Update Detected - Review MCP Tools" \
89+
--label "api-update" \
90+
--label "needs-review" \
91+
--body-file /tmp/issue-body.md

.github/workflows/deploy-dev.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Development MCP Server Deployment
2+
#
3+
# Deploys the remote MCP server to mcp-dev.digitalsamba.com
4+
# Triggers automatically on push to develop branch
5+
#
6+
# GitHub Secrets Required:
7+
# Repository secrets:
8+
# - DOCKER_REGISTRY: Registry hostname
9+
# - REGISTRY_USERNAME: Docker registry username
10+
# - REGISTRY_PASSWORD: Docker registry password
11+
# - DEPLOYMENT_USER: SSH user for deployment
12+
# - DEPLOYMENT_SSH_KEY: SSH private key
13+
#
14+
# Environment secrets (development):
15+
# - DEPLOYMENT_SERVER: Target server hostname
16+
# - DEPLOYMENT_PATH: Server path for deployment files
17+
# - MCP_URL: Public URL for health checks
18+
19+
name: Deploy Dev MCP Server
20+
21+
on:
22+
push:
23+
branches:
24+
- develop
25+
workflow_dispatch:
26+
27+
env:
28+
IMAGE_NAME: digitalsamba-mcp-server
29+
30+
jobs:
31+
test:
32+
name: Run Tests
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: '20.x'
42+
cache: 'npm'
43+
44+
- name: Install dependencies
45+
run: npm ci
46+
47+
- name: Build
48+
run: npm run build
49+
50+
- name: Run tests
51+
run: npm run test:ci
52+
continue-on-error: true
53+
54+
build-and-deploy:
55+
name: Build and Deploy to Dev
56+
needs: test
57+
runs-on: ubuntu-latest
58+
environment: development
59+
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v4
63+
64+
- name: Set up Docker Buildx
65+
uses: docker/setup-buildx-action@v3
66+
67+
- name: Login to Docker Registry
68+
uses: docker/login-action@v3
69+
with:
70+
registry: ${{ secrets.DOCKER_REGISTRY }}
71+
username: ${{ secrets.REGISTRY_USERNAME }}
72+
password: ${{ secrets.REGISTRY_PASSWORD }}
73+
74+
- name: Build and push Docker image
75+
uses: docker/build-push-action@v6
76+
with:
77+
context: .
78+
file: ./Dockerfile
79+
push: true
80+
tags: |
81+
${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
82+
${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
83+
cache-from: type=gha
84+
cache-to: type=gha,mode=max
85+
86+
- name: Copy deployment files to server
87+
uses: appleboy/scp-action@v0.1.7
88+
with:
89+
host: ${{ secrets.DEPLOYMENT_SERVER }}
90+
username: ${{ secrets.DEPLOYMENT_USER }}
91+
key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
92+
source: "deployment/docker-compose.yml"
93+
target: ${{ secrets.DEPLOYMENT_PATH }}
94+
strip_components: 1
95+
96+
- name: Deploy to server
97+
uses: appleboy/ssh-action@v1.0.3
98+
env:
99+
REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
100+
IMAGE_NAME: ${{ env.IMAGE_NAME }}
101+
with:
102+
host: ${{ secrets.DEPLOYMENT_SERVER }}
103+
username: ${{ secrets.DEPLOYMENT_USER }}
104+
key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
105+
envs: REGISTRY,IMAGE_NAME
106+
script: |
107+
cd ${{ secrets.DEPLOYMENT_PATH }}
108+
109+
# Login to registry
110+
echo "${{ secrets.REGISTRY_PASSWORD }}" | sudo docker login ${{ secrets.DOCKER_REGISTRY }} -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
111+
112+
# Pull latest image
113+
sudo docker pull ${REGISTRY}/${IMAGE_NAME}:latest
114+
115+
# Stop and remove old container
116+
sudo docker compose down --remove-orphans || true
117+
118+
# Start new container
119+
sudo docker compose up -d
120+
121+
# Wait for service to be healthy
122+
echo "Waiting for service to be healthy..."
123+
sleep 10
124+
125+
# Cleanup old images
126+
sudo docker image prune -f
127+
128+
- name: Verify deployment
129+
run: |
130+
echo "Waiting for service startup..."
131+
sleep 15
132+
133+
# Health check
134+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" ${{ secrets.MCP_URL }}/health || echo "000")
135+
136+
if [ "$HTTP_STATUS" = "200" ]; then
137+
echo "✅ Health check passed (HTTP $HTTP_STATUS)"
138+
else
139+
echo "⚠️ Health check returned HTTP $HTTP_STATUS"
140+
curl -v ${{ secrets.MCP_URL }}/health || true
141+
fi
142+
143+
- name: Deployment summary
144+
run: |
145+
echo "## 🚀 Dev MCP Server Deployed!" >> $GITHUB_STEP_SUMMARY
146+
echo "" >> $GITHUB_STEP_SUMMARY
147+
echo "| Item | Value |" >> $GITHUB_STEP_SUMMARY
148+
echo "|------|-------|" >> $GITHUB_STEP_SUMMARY
149+
echo "| **Environment** | development |" >> $GITHUB_STEP_SUMMARY
150+
echo "| **URL** | ${{ secrets.MCP_URL }} |" >> $GITHUB_STEP_SUMMARY
151+
echo "| **Commit** | ${{ github.sha }} |" >> $GITHUB_STEP_SUMMARY
152+
echo "| **Branch** | ${{ github.ref_name }} |" >> $GITHUB_STEP_SUMMARY
153+
echo "| **Triggered by** | ${{ github.actor }} |" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)