feat: migrate mcp-server and virtual-server endpoints to v1 API paths - #98
Open
marekdano wants to merge 2 commits into
Open
feat: migrate mcp-server and virtual-server endpoints to v1 API paths#98marekdano wants to merge 2 commits into
marekdano wants to merge 2 commits into
Conversation
Signed-off-by: Marek Dano <mk.dano@gmail.com>
Signed-off-by: Marek Dano <mk.dano@gmail.com>
a-effort
reviewed
Sep 4, 2026
Contributor
There was a problem hiding this comment.
Verified on 85-migrate-v1-endpoints: tsc clean, full vitest suite green (3278 passed).
mcpgateway/api/v1/__init__.py:374-375mounts the samegateway_routerandserver_routerobjects at/v1/mcp-serversand/v1/virtual-serversthat the legacy prefixes use, so response shapes, query params and pagination are identical.GET "",/{id},PUT,DELETEand/{id}/stateall exist under both.- Token scoping resolves the aliases back to
/gatewaysand/serversbefore matching (middleware/token_scoping.py:444,466viautils/paths.py:52-53), so scoped tokens are unaffected. This was my main worry, since unmapped paths default-deny. - No legacy literal is left in
srcexceptgetVirtualServerEndpoint, as described.
Potential blocker: docker-compose.e2e.yml:37 pins a backend that predates the aliases
ghcr.io/ibm/mcp-context-forge:v1.0.8 was cut 2026-08-18. f9af132ee landed 2026-08-24 and first ships in v1.0.9 (2026-09-01). So npm run e2e:docker now runs the migrated UI against a backend where /v1/mcp-servers and /v1/virtual-servers do not exist.
e2e/tools.spec.ts and e2e/resources.spec.ts fetch /v1/mcp-servers?limit=0&include_pagination=true (Tools.tsx:206, Resources.tsx:253). Against v1.0.8 that 404s and the cards fall back to raw IDs instead of server names. Bumping the pin to v1.0.9 or later covers it.
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.
Closes #85
Summary
/gatewaysand/serversAPI paths to the versioned/v1/mcp-serversand/v1/virtual-serverspathsutils.tsgetVirtualServerEndpoint) unchanged, since it reflects protocol data, not the admin APIDetails
This is a mechanical rename with no behavior changes. The new versioned paths are already live on the backend (mounted alongside the legacy paths since
mcp-context-forgecommitf9af132ee), so this is a forward-compatible migration ahead of the legacy paths being deprecated.Test plan
/gatewaysor/serversAPI paths insrc/ore2e//v1/mcp-serversand/v1/virtual-serversroutes are mounted on the backend