Conversation
✅ Deploy Preview for contentrain-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@contentrain/mcp@1.4.0
Minor Changes
cc066fe: feat(mcp): 1.4.0 — multi-tenant HTTP MCP, GitHub App auth, published conformance fixtures
Multi-tenant HTTP MCP — per-request provider resolver
startHttpMcpServerWithnow accepts aresolveProvider(req)callbackinstead of (or in addition to) a single pre-built provider. Every new
MCP session resolves its own
RepoProviderfrom the incoming HTTPrequest — Studio's MCP Cloud and any similar hosted agent can serve
many projects from one endpoint without spinning up N server
instances.
Resolver invoked exactly once per MCP session; subsequent requests
carrying
Mcp-Session-Idreuse the resolved server + transport pair.Idle sessions are disposed after
sessionTtlMs. Existing single-provider shape is fully backward compatible.
GitHub App installation auth in the factory
createGitHubProvider({ auth: { type: 'app', appId, privateKey, installationId } })now mints a short-lived JWT, exchanges it for aninstallation access token, and instantiates Octokit with the
resulting bearer. Removes the old "
appauth coming in Phase 5.2"throw.
New public exports under
@contentrain/mcp/providers/github:exchangeInstallationToken(config, opts?)— standalone helper,useful when callers want to cache / refresh tokens externally
(redis, KV, cross-worker pool). Supports custom
baseUrlforGitHub Enterprise Server.
signAppJwt(config)— pure JWT signer (RS256, 10-min TTL).Types:
AppAuthConfig,InstallationTokenResult.The factory ships a ~1-hour bearer and does not auto-refresh — for
long-lived hosted providers, inject your own Octokit with
@octokit/auth-app's auth strategy instead (Studio's pattern — seethe embedding guide).
Conformance fixtures published
New subpath export
@contentrain/mcp/testing/conformanceexposes thebyte-parity scenarios the package tests itself against, so external
tools (Studio, alt-provider harnesses, third-party reimplementations)
can assert matching output without symlinking
packages/mcp/tests/.Fixtures were moved from
packages/mcp/tests/fixtures/conformance/to
packages/mcp/testing/conformance/and are included in thepublished tarball via
files[]. Helpers:validateProject(reader, options)overload pinnedPhase 5.5b's reader overload got a dedicated test file
(
tests/core/validator/reader-overload.test.ts) that exercises:validation through a pure
RepoReadererror surfacing from reader-backed content
OverlayReadercomposition — the exact shape Studio uses forpre-commit validation
The test pins the contract so the overload cannot regress silently.
Docs
docs/guides/embedding-mcp.mdRecipe 3 now shows three GitHub Appauth patterns with a trade-off table:
Factory
auth.type: 'app'— simple, 1-hour TTLexchangeInstallationToken+ external cache — manual refreshOctokit injection with
@octokit/auth-app— auto-refresh(recommended for Studio-style hosted providers)
Plus a new 3a section showing the multi-tenant resolver pattern.
Package description updated from "13 deterministic tools" to
accurately describe the current 17-tool surface.
Verification
oxlintacross the monorepo → 0 warnings on 424 files.@contentrain/mcptypecheck → 0 errors.tests beyond 1.3.0 baseline: 4 app-auth, 3 resolver, 5 conformance
subpath, 3 validateProject reader, plus the fixture-move
adjustments).
vitepress build docs/→ success.contentrain@0.5.1
Patch Changes