-
Notifications
You must be signed in to change notification settings - Fork 0
Publishing Guide
Complete guide for publishing MCP HTTP Client to GitHub Packages, npm, and Homebrew.
- GitHub account with repository access
- GitHub Personal Access Token with
write:packagesscope
- npm account (sign up here)
- npm access token
- GitHub repository with releases
- Homebrew tap repository (optional, or submit to homebrew-core)
No special setup required. The workflow uses GITHUB_TOKEN which is automatically provided by GitHub Actions.
Login to npm:
npm loginCreate access token:
- Go to npmjs.com → Account → Access Tokens
- Generate new token (Automation type)
- Add to GitHub secrets:
NPM_TOKEN
Add these secrets to your GitHub repository (Settings → Secrets and variables → Actions):
-
NPM_TOKEN- npm access token
That's it! No GPG keys or Sonatype accounts needed.
-
Create a release on GitHub:
- Go to your repository → Releases → "Draft a new release"
- Choose an existing tag or create a new one (e.g.,
0.0.1orv1.0.0) - Add release title and description
- Click "Publish release"
-
GitHub Actions automatically:
- Builds the project
- Runs tests
- Creates GitHub release with JAR and tarball
- Publishes to GitHub Packages
- Publishes to npm
./gradlew publishMavenPublicationToGitHubPackagesRepositorynpm publish --access public- Update your Homebrew tap repository
- Or submit PR to homebrew-core
- Update version in
build.gradle.kts - Update version in
package.json - Run tests:
./gradlew test - Build project:
./gradlew build - Create GitHub release
- Wait for GitHub Actions to complete
- Verify publication on GitHub Packages
- Verify publication on npm
- Update Homebrew tap (if using custom tap)
Check if published:
https://github.com/ferPrieto/MCP-Http-Client/packages
Use in projects:
repositories {
maven {
url = uri("https://maven.pkg.github.com/ferPrieto/MCP-Http-Client")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation("io.mcp:httpclient:1.0.0")
}Note: Requires GitHub Personal Access Token with read:packages scope.
Check if published:
npm view @mcp/http-clientInstall globally:
npm install -g @mcp/http-client
mcp-http-clientInstall from tap:
brew tap ferPrieto/mcp-http-client
brew install mcp-http-client
mcp-http-clientnpm: "Package already exists"
- Version must be unique
- Increment version number
Homebrew: "SHA256 mismatch"
- Regenerate SHA256 after any changes to archive
- Use
shasum -a 256 mcp-http-client-X.X.X.tar.gz
GitHub Packages: "401 Unauthorized"
- Ensure
GITHUB_TOKENhas proper permissions - Check repository settings → Actions → Workflow permissions
Follow Semantic Versioning:
- Major (1.x.x): Breaking changes
- Minor (x.1.x): New features, backward compatible
- Patch (x.x.1): Bug fixes, backward compatible
After publishing, your package will be available at:
-
GitHub Packages:
https://github.com/ferPrieto/MCP-Http-Client/packages -
npm:
https://www.npmjs.com/package/@mcp/http-client -
Homebrew:
brew install ferPrieto/mcp-http-client/mcp-http-client -
GitHub Releases:
https://github.com/ferPrieto/MCP-Http-Client/releases
For publishing issues:
- GitHub Packages: https://docs.github.com/en/packages
- npm: https://docs.npmjs.com/cli/v9/commands/npm-publish
- Homebrew: https://docs.brew.sh/Formula-Cookbook