feat: Add support for Bearer token (access token) authentication#68
Open
egorpavlikhin wants to merge 1 commit intomainfrom
Open
feat: Add support for Bearer token (access token) authentication#68egorpavlikhin wants to merge 1 commit intomainfrom
egorpavlikhin wants to merge 1 commit intomainfrom
Conversation
The MCP server now supports short-lived access tokens as an alternative to API keys, intended for automated scenarios such as CI/CD pipelines and machine-to-machine workflows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
--access-token/-tand environment variableOCTOPUS_ACCESS_TOKEN@octopusdeploy/api-clientSDK already supports this via theaccessTokenproperty onClientConfigurationNote: Bearer token auth is intended only for automated scenarios (CI/CD pipelines, orchestration, machine-to-machine workflows) where the issued token is short-lived.
Files changed
src/helpers/getClientConfigurationFromEnvironment.ts— Core auth logic supporting both credential typessrc/index.ts— New--access-tokenCLI optionsrc/helpers/errorHandling.ts— Updated auth error messagessrc/tools/__tests__/testSetup.ts— Test config supports access tokensREADME.md— New Authentication section documenting both methods.env.example— DocumentsOCTOPUS_ACCESS_TOKENTest plan
npm run buildcompiles cleanly--access-tokenflag and verify it connectsOCTOPUS_ACCESS_TOKENenv var and verify it connects🤖 Generated with Claude Code