feat(publisher): store token files in unified .mcpregistry/ directory#1148
Open
JosephDoUrden wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
feat(publisher): store token files in unified .mcpregistry/ directory#1148JosephDoUrden wants to merge 1 commit intomodelcontextprotocol:mainfrom
JosephDoUrden wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
Move GitHub and registry token files from flat .mcpregistry_* paths in the project root into a .mcpregistry/ directory with an auto-generated .gitignore containing *, so users no longer need to manually update their .gitignore. Old token files are automatically migrated to the new location on first read or write. The logout command cleans up both old and new paths. Closes modelcontextprotocol#663
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
Move GitHub and registry token files from flat
.mcpregistry_*paths in the project root into a.mcpregistry/directory with an auto-generated.gitignore, so users no longer need to manually update their.gitignore.Closes #663
Changes
cmd/publisher/auth/github-at.go:.mcpregistry/directory (github_token,registry_token)ensureTokenDir()— creates.mcpregistry/with a.gitignorecontaining*migrateOldTokenFiles()— automatically moves old flat files to the new directory on first read/writecmd/publisher/commands/logout.go:.mcpregistry/directory and legacy flat filesBackward compatibility
Existing users with old
.mcpregistry_github_token/.mcpregistry_registry_tokenfiles will have them automatically migrated to.mcpregistry/github_token/.mcpregistry/registry_tokenon next token read or write. No manual action required.Test plan
go build ./cmd/publisher/...compiles without errorsgo test ./cmd/publisher/commands/...passes all existing testsmcp-publisher login githubcreates.mcpregistry/github_tokenand.mcpregistry/.gitignoremcp-publisher logoutremoves.mcpregistry/directory and any legacy filesAI Disclosure
AI assistance (Claude) was used for issue research. The implementation was written and reviewed by the author.