Conversation
✅ Deploy Preview for contentrain-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…d conformance fixtures
### Multi-tenant HTTP MCP — per-request provider resolver
startHttpMcpServerWith now accepts resolveProvider(req) — every new
MCP session resolves its own RepoProvider from the inbound request.
Studio's MCP Cloud and similar hosted agents can serve many projects
from one endpoint without N server instances. Resolver invoked
exactly once per session; subsequent requests with Mcp-Session-Id
reuse the resolved server + transport pair. Idle sessions disposed
after sessionTtlMs (default 15m). Single-provider shape fully
backward compatible.
### GitHub App installation auth in the factory
createGitHubProvider({ auth: { type: 'app', appId, privateKey,
installationId } }) now mints a JWT, exchanges it for an installation
token, and returns an Octokit-backed client. Removes the legacy
"coming in Phase 5.2" throw.
New public exports under @contentrain/mcp/providers/github:
- exchangeInstallationToken(config, opts?) — standalone helper;
supports custom baseUrl for GHES; useful for external token
caching across workers
- signAppJwt(config) — pure RS256 JWT signer (10-min TTL)
- Types: AppAuthConfig, InstallationTokenResult
Factory-minted tokens are ~1 hour and don't auto-refresh — for long-
lived hosted providers, inject your own Octokit with
@octokit/auth-app's auth strategy (Studio's pattern).
### Conformance fixtures published
New subpath @contentrain/mcp/testing/conformance exposes the byte-
parity scenarios the package tests itself against. External tools
(Studio, alt-provider harnesses, third-party reimplementations) can
assert matching output without symlinking the tests directory.
Fixtures moved from tests/fixtures/conformance/ to
testing/conformance/ and included in the published tarball via
files[].
Helpers: fixturesDir, listConformanceScenarios,
loadConformanceScenario + ConformanceScenario type.
### validateProject(reader, options) overload pinned
New tests/core/validator/reader-overload.test.ts exercises the
Phase 5.5b overload:
- validation through a pure RepoReader
- error surfacing from reader-backed content
- OverlayReader composition (Studio's pre-commit validation shape)
Pins the contract against silent regressions.
### Docs
docs/guides/embedding-mcp.md Recipe 3 shows 3 GitHub App auth
patterns with a trade-off table:
1. Factory auth.type: 'app' — simple, 1-hour TTL
2. exchangeInstallationToken + external cache — manual refresh
3. Octokit injection with @octokit/auth-app — auto-refresh
(recommended for Studio-style hosted providers)
New Recipe 3a shows the multi-tenant resolver pattern.
Package description updated from "13 deterministic tools" to
accurately describe the current 17-tool surface.
### Verification
- oxlint monorepo → 0 warnings on 424 files
- @contentrain/mcp typecheck → 0 errors
- MCP fast suite → 471 passed / 2 skipped / 34 files (21 new tests
beyond 1.3.0 baseline: 4 app-auth, 3 resolver, 5 conformance
subpath, 3 validateProject reader + conformance test adjustments
for the fixture move)
- vitepress build → success
2a63678 to
cc066fe
Compare
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.
Covers every MCP-side item surfaced in the Studio S2-S8 handoff audit, in a single release.
Headline: multi-tenant HTTP MCP
startHttpMcpServerWithnow accepts a per-request provider resolver:Resolver invoked once per MCP session; subsequent requests with the same
Mcp-Session-Idheader reuse the resolved server + transport pair. Idle sessions disposed aftersessionTtlMs. Single-provider shape fully backward compatible. Unblocks Studio S6 (MCP Cloud).Also shipping
GitHub App auth in
createGitHubProviderNew
auth: { type: 'app', appId, privateKey, installationId }factory mode: signs a JWT, exchanges for installation token, returns Octokit-backed client. Removes the oldPhase 5.2throw.Public exports:
exchangeInstallationToken— standalone helper, custom baseUrl for GHESsignAppJwt— pure RS256 JWT signerAppAuthConfig,InstallationTokenResultConformance fixtures published
@contentrain/mcp/testing/conformancesubpath exposes the byte-parity scenarios the package tests itself against. External tools (Studio, alt-provider harnesses) can assert matching output without symlinkingtests/.Fixtures moved from
tests/fixtures/conformance/→testing/conformance/, shipped in the tarball viafiles[]. Helpers:fixturesDir,listConformanceScenarios,loadConformanceScenario.validateProject(reader, options)overload pinnedNew dedicated test exercises the Phase 5.5b overload: pure
RepoReader, error surfacing,OverlayReadercomposition. Pins the contract Studio S3 depends on.Docs
docs/guides/embedding-mcp.mdRecipe 3 now shows three GitHub App auth patterns with a trade-off table — (a) factory auth.type:'app', (b)exchangeInstallationToken+ external cache, (c) Octokit injection with@octokit/auth-app(Studio's pattern). New Recipe 3a documents the multi-tenant resolver.Package description updated from "13 deterministic tools" to the current 17-tool surface.
Test plan
oxlintmonorepo → 0 warnings on 424 files@contentrain/mcptypecheck → 0 errorsvitepress builddocs → successVersion
@contentrain/mcp: 1.3.0 → 1.4.0 (minor — new public exports, no breaking changes).🤖 Generated with Claude Code