Skip to content

Commit ed01167

Browse files
committed
feat(all): implement GitHub-based MCP server deployment with Octokit
Add complete GitHub App integration for deploying MCP servers directly from private/public repositories. Implements synchronous deployment with real-time SSE streaming for logs and status updates. Architecture: - Backend: GitHub App authentication with ephemeral installation tokens - Satellite: Octokit-based repository download/build/spawn (no Git/NPX) - Frontend: 7-step deployment wizard with SSE status streaming Key Features: - Deploy from private GitHub repos using GitHub App (not OAuth) - Satellite downloads tarballs via Octokit API, extracts to /tmp, builds, spawns - Synchronous validation (2-5s) with streaming logs via SSE - Auto-deploy on push via webhooks - Per-user instance isolation - Team-scoped deployments Database: - Add deploymentCredentials table (GitHub App installations) - Add deploymentSettings table (auto-deploy config) - Add git_commit_sha to mcpServers, source enum ('github') - Add satellite_id to mcpServerInstallations Backend: - DeploymentCredentialService (GitHub App installation management) - DeploymentGitHubService (API client with ephemeral tokens) - Routes: /api/teams/{teamId}/deploy/* (authorize, repositories, deploy) - Webhook: /api/webhooks/deploy/{teamId} (HMAC validation, auto-deploy) - Satellite token endpoint: /api/satellites/{id}/github-token/{installationId} Satellite: - Parse github:user/repo#sha from config - Download via Octokit (GET /repos/{owner}/{repo}/tarball/{ref}) - Extract → npm install → npm build → resolve entry → spawn - Cleanup temp dir on termination - ReadableStream handling with retry logic Frontend: - ConnectGitHub, SelectRepository, SelectSatellite, ConfigureEnvironment steps - ValidatingDeployment (synchronous HTTP), StreamingLogs (SSE), Success steps - Real-time status updates (provisioning → online) - Deployment wizard with navigation breadcrumbs Security: - GitHub App credentials in encrypted global settings (not env vars) - Installation tokens generated on-demand (1-hour expiry, cached) - Satellite authorization (only assigned satellite gets tokens/config) - Team isolation (team satellites can't access other teams) - HMAC webhook validation Fixes: - ESLint errors (unused vars, any types, require() imports) - TypeScript compilation errors (proper type checking) - Migration timestamps adjusted to outside working hours
1 parent 9a7ade6 commit ed01167

File tree

71 files changed

+25959
-75
lines changed

Some content is hidden

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

71 files changed

+25959
-75
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ services/backend/tests/e2e/test-data/*.db
7373
._*.png
7474
._*.webp
7575
._*.jpg
76+
._*.jpeg
77+
._*.svg
78+
._*.gif
79+
._*.html
7680
._*.pug
7781
._*.yml
7882
._*.yaml

0 commit comments

Comments
 (0)