feat(cli): server-edition credential command group (spec 074 T9)#695
Open
Dumbris wants to merge 1 commit into
Open
feat(cli): server-edition credential command group (spec 074 T9)#695Dumbris wants to merge 1 commit into
credential command group (spec 074 T9)#695Dumbris wants to merge 1 commit into
Conversation
Add `mcpproxy credential list|status|connect|rm` to the server edition for
managing per-user brokered upstream credentials over the T8 REST surfaces
(GET/DELETE /api/v1/user/credentials, .../{server}/connect).
- Responses are decoded into a non-secret typed view, so token material is
never printed (FR-026) even if a response carries it.
- Honors -o table|json|yaml and MCPPROXY_OUTPUT via the existing formatters.
- Targets a server URL (--url / MCPPROXY_SERVER_URL) with a user JWT
(--token / MCPPROXY_TOKEN): these surfaces sit behind session-or-Bearer
auth, not the API-key/socket group, so a Bearer transport was added to the
shared CLI client.
- `connect` prints the browser URL (escaping slash-named servers); the flow
binds to the user's browser session server-side.
- Build-tagged (//go:build server) and registered via a server-edition
command seam; the personal edition is unaffected (verified: `credential`
is absent there).
Docs: docs/cli/credential-commands.md.
Related: spec 074 T9 / MCP-1042
Deploying mcpproxy-docs with
|
| Latest commit: |
80bde2e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://516f0890.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://074-t9-credential-cli.mcpproxy-docs.pages.dev |
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 27605230022 --repo smart-mcp-proxy/mcpproxy-go
|
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.
Summary
Adds the server-edition
mcpproxy credentialcommand group (spec 074 T9, MCP-1042), built on the T8 per-user brokered-credential REST surfaces (/api/v1/user/credentials, merged in #692).mcpproxy credential list— table of brokered upstreams + connection status + metadata (no secrets)mcpproxy credential status <server>— one upstream's connection detailmcpproxy credential connect <server>— prints the browser connect URL (OAuth connect flow)mcpproxy credential rm <server>— disconnect/revoke (aliases:remove,disconnect)Design notes
CredentialStatusview that has no token fields, so token material is dropped rather than rendered — even if a response carries it. Covered byTestListCredentials_DropsSecretMaterialandTestRenderCredential_NoSecretLeak.--url/MCPPROXY_SERVER_URL) and presents a user JWT (--token/MCPPROXY_TOKEN). ANewClientWithBearertransport was added to the shared CLI client.connectprints (rather than follows) the browser URL — the connect flow binds to the user's browser session server-side. Slash-named registry servers are path-escaped.-o table|json|yamlandMCPPROXY_OUTPUTvia the existinginternal/cli/outputformatters.//go:build server; commands are registered via a build-tagged seam (mirroringcollectServerEditionInfo). Verifiedcredentialis absent in the personal binary.Testing
go test -tags server ./internal/cliclient/... ./cmd/mcpproxy/...— green (incl.-race)go build [-tags server] ./cmd/mcpproxy)golangci-lint v2.5.0(CI config) clean with and without--build-tags serverDocs (ENG-9)
docs/cli/credential-commands.md— full reference. (Server-edition routes aren't covered byswagger.yaml/verify-oas-coverage.)Related: spec 074 T9 / MCP-1042. Blocked-by T8 (#692) — merged.