Hosted HTTP transport (multi-tenant)#3
Merged
Conversation
VyMCP can now run as one shared server (VYMCP_TRANSPORT=http) that many engineers connect to, each authenticating with their own vym_ token per request — instead of everyone running a local stdio instance. - ServerConfig splits server settings from the per-request token; api_token only required for stdio - VyManagerTokenVerifier validates each request's bearer token against VyManager (cached); tools resolve a per-token client via current_client() - plans are owner-scoped so one engineer can't apply another's pending change - main() runs stdio or streamable-http per config; stdio path unchanged Verified live against VyManager: http client connects with a bearer token and acts as that user; unauthenticated/invalid tokens rejected; a second token cannot apply the first's plan.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an optional hosted HTTP transport so VyMCP can run as one shared server that many engineers connect to, each authenticating with their own VyManager token per request — instead of everyone running a local stdio instance.
stdioremains the default and is unchanged.What changed
ServerConfigsplits server settings from the per-request token;VYMANAGER_API_TOKENis only required for stdio.VyManagerTokenVerifiervalidates each request's bearer token against VyManager (cached); tools resolve a per-token client viacurrent_client().main()runs stdio or streamable-http perVYMCP_TRANSPORT.Config (http mode)
VYMCP_TRANSPORT=http,VYMCP_HOST,VYMCP_PORT,VYMCP_PUBLIC_URL(see.env.example).Verified
Live against VyManager: an MCP http client connects with a bearer token and acts as that user; unauthenticated/invalid tokens are rejected (401); a second token cannot apply the first's plan. Gate green — ruff, mypy, 67 tests.