feat(magento): use connection-level Authorization token instead of form field#518
Merged
Merged
Conversation
…rm field Removes apiToken from the configSchema form and StateSchema — users now set their Magento integration token in the encrypted Token field of the HTTP connection. resolveCredentials reads MESH_REQUEST_CONTEXT.authorization (strips Bearer prefix) with MAGENTO_API_TOKEN env var as a local fallback. Co-Authored-By: Claude Sonnet 4.6 <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
apiTokenfrom the Magento MCP connection form (configSchemaandStateSchema) — users now enter their Magento integration token in the encrypted Token field of the HTTP connection instead.resolveCredentialsnow accepts the fullMESH_REQUEST_CONTEXTand extracts the API token fromctx.authorization(stripping theBearerprefix), withMAGENTO_API_TOKENenv var as a local dev fallback.env.MESH_REQUEST_CONTEXTdirectly instead ofenv.MESH_REQUEST_CONTEXT?.state.This aligns the Magento MCP with the pattern used by Strapi, HyperDX, and Discord MCPs in this repo, where the connection-level token (encrypted at rest) is used as the downstream API key.
🤖 Generated with Claude Code
Summary by cubic
Switch Magento MCP to use the HTTP connection’s Authorization token instead of the
apiTokenform field. This simplifies setup, encrypts the token at rest, and aligns with our other MCPs.Refactors
MESH_REQUEST_CONTEXT.authorization(strips Bearer), withMAGENTO_API_TOKENas a local fallback.apiTokenfromconfigSchema/StateSchema; updated all tools to pass the fullMESH_REQUEST_CONTEXT.Migration
apiTokenfrom existing Magento connections; keepbaseUrlonly.MAGENTO_API_TOKENenv var.Written for commit a14faf6. Summary will update on new commits.