MCP Bundler Service
@highlight-ing
A microservice for bundling MCP servers from GitHub repositories and preparing it for deployment.
Overview
What is MCP Bundler Service?
MCP Bundler Service is a microservice that bundles code from public GitHub repositories and prepares it for deployment. It can return the bundled code directly or upload it to Google Cloud Storage (GCP) for further use.
How to use MCP Bundler Service?
Install dependencies with pnpm install, start the server with pnpm run dev, and access the interactive API documentation at /docs on localhost:8080. Use the /bundler or /v2/bundler endpoints with a GitHub repository URL; optionally specify a commit hash, output format (v1), or an MCP ID (v2). For GCP uploads, set the GCP_SERVICE_ACCOUNT_KEY environment variable; set DISABLE_GCP_INTEGRATION=true to return the bundle directly.
Key features of MCP Bundler Service
- Bundle code directly from any public GitHub repository
- Support for ESM (
mjs) and CommonJS (cjs) output formats - Pin commits for reproducible builds with optional commit hash
- Optional upload of bundled code to Google Cloud Storage
- Interactive Swagger documentation at
/docs - Comprehensive error handling with HTTP status codes (400, 500, 504)
Use cases of MCP Bundler Service
- Quickly fetch and bundle code from a GitHub repo for local testing or deployment
- Automate building and storing MCP server bundles in GCS for cloud-native pipelines
- Generate reproducible build artifacts by pinning specific commit hashes
- Integrate with CI/CD systems using the REST API and optional GCP upload
FAQ from MCP Bundler Service
What is the difference between the v1 and v2 endpoints?
The v1 endpoint (/bundler) returns the bundled code as a string. The v2 endpoint (/v2/bundler) can optionally upload the bundle to Google Cloud Storage and returns upload metadata, or returns the code directly if GCP upload is disabled.
How do I disable GCP upload and get the bundle directly?
Set the environment variable DISABLE_GCP_INTEGRATION=true. When disabled, the API returns the bundled code in the response and saves a copy to the bundled directory as bundle-[commit-hash].tar.gz.
What environment variables are supported?
The supported variables are GCP_SERVICE_ACCOUNT_KEY (GCP credentials JSON), DISABLE_GCP_INTEGRATION (set to "true" to disable GCP), and SENTRY_INGEST_URL (Sentry ingest URL). Only GCP_SERVICE_ACCOUNT_KEY has no default.
What are the service limitations?
Repository bundling has a 5‑minute timeout. Very large WASM files may exceed processing limits.
Is authentication required for the API?
No authentication is required for the API endpoints themselves. GCP upload is optional and requires a service account key with Storage Admin permissions on the target bucket.