Versioning
How versioned endpoints work on mctx. URL format, semantic versioning, version lifecycle, routing, and multiple concurrent versions.
mctx uses versioned endpoints so subscribers can choose when to adopt updates. Each version runs as an independent deployment with its own URL.
URL Format
MCP server endpoints follow this format:
https://{slug}.mctx.ai/v{version}| Component | Description | Example |
|---|---|---|
{slug} | Server's unique identifier | weather-api |
{version} | Semantic version number | 1.0.0, 2.1.3 |
Examples
| Purpose | URL |
|---|---|
| Production version | https://weather-api.mctx.ai/v1.0.0 |
| Minor update | https://weather-api.mctx.ai/v1.1.0 |
| Major update | https://my-tools.mctx.ai/v2.0.0 |
| Pre-release version | https://data-helper.mctx.ai/v1.0.0-beta.1 |
Semantic Versioning
mctx servers use semantic versioning (semver):
MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]Version Components
| Component | Incremented When | Example |
|---|---|---|
| MAJOR | Breaking changes (incompatible API) | 1.0.0 → 2.0.0 |
| MINOR | New features (backward compatible) | 1.0.0 → 1.1.0 |
| PATCH | Bug fixes (no API changes) | 1.0.0 → 1.0.1 |
| PRERELEASE | Pre-release versions | 1.0.0-beta.1 |
| BUILD | Build metadata | 1.0.0+20130313 |
Valid Version Examples
| Version | Type |
|---|---|
1.0.0 | Production release |
1.2.3 | Production release |
2.0.0 | Major version |
1.0.0-alpha | Alpha pre-release |
1.0.0-beta.1 | Beta pre-release (iteration 1) |
1.0.0-rc.2 | Release candidate (iteration 2) |
1.0.0+20130313144700 | Production with build metadata |
1.0.0-beta.1+exp.sha.5114f85 | Pre-release with build metadata |
Invalid Version Examples
| Version | Reason |
|---|---|
1.0 | Missing PATCH component |
v1.0.0 | Prefix not allowed |
1.0.0.0 | Too many components |
1.0.0-BETA.1 | Pre-release identifiers must be lowercase |
Version Detection
mctx detects new versions by comparing the version field in mctx.json against already-deployed versions:
- You push changes to your branch
- GitHub webhook notifies mctx
- mctx reads
mctx.jsonfrom your repository - If version is new, deployment is triggered
- If version already exists, deployment is skipped
Important: Changing your code without bumping the version will not trigger a new deployment.
Request Routing
When a request arrives at a versioned endpoint:
- Parse version - Dispatch worker extracts version from URL path
- Lookup config - Retrieves version-specific config from KV (
tenant:{slug}:v{version}) - Validate auth - Checks JWT and subscription status in D1
- Route request - Forwards to tenant worker via Workers for Platforms dispatch namespace
- Return response - Streams response back to client
Each version routes to a completely separate worker deployment. There is no shared state between versions.
Multiple Concurrent Versions
mctx allows multiple versions to run simultaneously:
- Independent deployments - Each version is a separate Cloudflare Worker
- Separate environment variables - Version-level variables override server-level
- No shared state - Versions don't communicate with each other
- Subscriber choice - Each subscriber picks their version
Example Scenario
You have three versions deployed:
| Version | Status | Subscribers | Use Case |
|---|---|---|---|
1.0.0 | Active | 50 | Stable production version |
1.1.0 | Active | 20 | Adopters of new features |
2.0.0-beta.1 | Active | 5 | Beta testers |
All three run concurrently. Subscribers on 1.0.0 are unaffected by changes to 2.0.0-beta.1.
Version Lifecycle States
| State | Description | Visibility |
|---|---|---|
| Active | Version is deployed and available | Public |
| Deploying | Deployment in progress | Dashboard |
| Failed | Deployment failed | Dashboard |
| Deprecated | Version works but developer recommends upgrade | Public |
| Deleted | Version no longer available | None |
State Transitions
New Version → Deploying → Active
↓
Failed
Active → Deprecated → DeletedFinding Available Versions
Via Server Info Page
Visit {slug}.mctx.ai (or {slug}-test.mctx.ai for test environment) to see:
- Latest version number
- Full version history
- Endpoint URL for each version
- Deprecation notices
Via Version Dropdown
On the server info page:
- Select version from dropdown
- View version-specific details
- Copy installation instructions for that version
Via API (Subscriber Perspective)
When you call an endpoint, the MCP initialize response includes the version:
{
"jsonrpc": "2.0",
"result": {
"protocolVersion": "2025-11-25",
"serverInfo": {
"name": "Weather API",
"version": "1.0.0"
},
"capabilities": {}
},
"id": 1
}Version Compatibility Guidance
For subscribers choosing which version to use:
| Change Type | Example | Recommendation |
|---|---|---|
| Patch | 1.0.0 → 1.0.1 | Safe to update immediately |
| Minor | 1.0.0 → 1.1.0 | Review new features, generally safe |
| Major | 1.0.0 → 2.0.0 | Check breaking changes carefully |
| Pre-release | 1.0.0-beta.1 | Testing only, not for production |
Version Removal
Developers can remove old versions to reduce maintenance burden:
- Navigate to server detail page
- Select version from version history
- Click Delete Version
- Confirm removal
Effect:
- Version worker is deleted from dispatch namespace
- Version config is removed from KV
- Endpoint becomes unavailable (404 responses)
- Subscribers on that version lose access
Best Practice: Deprecate versions first to give subscribers warning before removal.
Deprecation
To mark a version as deprecated:
- Navigate to server detail page
- Select version from version history
- Click Mark as Deprecated
- Optionally add deprecation message
Effect:
- Version remains functional
- Deprecation notice shown on server info page
- Subscribers are notified to upgrade
Note: This feature helps communicate lifecycle without breaking existing subscribers.
Version Errors
Version Not Found (404)
Response:
{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Version not found",
"data": {
"requestedVersion": "1.0.0",
"availableVersions": ["1.1.0", "2.0.0"]
}
},
"id": null
}Causes:
- Version never deployed
- Version was removed
- Typo in version number
Solution: Check server info page for available versions and update your configuration.
Version Deployment Failed
Causes:
- Invalid
mctx.jsonschema - Entrypoint file not found
- Worker code syntax error
- Environment variable missing
Solution: Check deploy logs in dashboard for specific error messages.
Version Limits
| Limit | Value | Notes |
|---|---|---|
| Maximum concurrent active versions | 10 | Per server |
| Version string maximum length | 64 | Characters |
| Minimum deployment interval | 1s | Between version deployments |
Note: Contact support if you need higher limits.
Versioning Best Practices
For Developers
- Follow semver strictly - Helps subscribers make upgrade decisions
- Test before major bumps - Use pre-release versions for breaking changes
- Document breaking changes - Clear changelog explaining what changed
- Deprecate before removal - Give subscribers time to migrate
- Keep LTS versions - Consider maintaining long-term support versions
For Subscribers
- Pin to specific versions - Don't use "latest" aliases (not supported)
- Test before upgrading - Especially for major version changes
- Monitor for deprecations - Plan upgrades when versions are marked deprecated
- Read changelogs - Understand what changed between versions
See Also
- mctx.json Reference - Version field specification
See something wrong? Report it or suggest an improvement — your feedback helps make these docs better.