Skip to content

Publishing Guide

Fernando Prieto Moyano edited this page Nov 9, 2025 · 1 revision

Complete guide for publishing MCP HTTP Client to GitHub Packages, npm, and Homebrew.

Prerequisites

For GitHub Packages

  • GitHub account with repository access
  • GitHub Personal Access Token with write:packages scope

For npm

For Homebrew

  • GitHub repository with releases
  • Homebrew tap repository (optional, or submit to homebrew-core)

Setup Instructions

1. GitHub Packages Setup

No special setup required. The workflow uses GITHUB_TOKEN which is automatically provided by GitHub Actions.

2. npm Setup

Login to npm:

npm login

Create access token:

  1. Go to npmjs.com → Account → Access Tokens
  2. Generate new token (Automation type)
  3. Add to GitHub secrets: NPM_TOKEN

3. GitHub Secrets Setup

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.

Publishing Process

Automated Release (Recommended)

  1. 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.1 or v1.0.0)
    • Add release title and description
    • Click "Publish release"
  2. GitHub Actions automatically:

    • Builds the project
    • Runs tests
    • Creates GitHub release with JAR and tarball
    • Publishes to GitHub Packages
    • Publishes to npm

Manual Publishing

GitHub Packages

./gradlew publishMavenPublicationToGitHubPackagesRepository

npm

npm publish --access public

Homebrew

  1. Update your Homebrew tap repository
  2. Or submit PR to homebrew-core

Release Checklist

  • 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)

Verification

GitHub Packages

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.

npm

Check if published:

npm view @mcp/http-client

Install globally:

npm install -g @mcp/http-client
mcp-http-client

Homebrew

Install from tap:

brew tap ferPrieto/mcp-http-client
brew install mcp-http-client
mcp-http-client

Troubleshooting

npm: "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_TOKEN has proper permissions
  • Check repository settings → Actions → Workflow permissions

Version Numbering

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

Distribution URLs

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

Support

For publishing issues: