mcpak mcpak

Publishing Packages

Learn how to create and publish MCP server packages to the registry.

1. Register an account

Before publishing, you need a registry account:

mcpak register <username>

2. Create mcpak.json

Run mcpak init or create mcpak.json manually:

{
  "name": "my-mcp-server",
  "version": "1.0.0",
  "description": "My awesome MCP server",
  "mcpServer": {
    "command": "node",
    "args": ["server.js"],
    "env": {
      "PORT": "3000"
    }
  }
}

3. Publish

From the directory containing your mcpak.json:

mcpak publish

The CLI packages your project into a tarball, computes a SHA-256 checksum, and uploads it to the registry. The first user to publish a package becomes its owner.

4. Update versions

To publish a new version, update the version field in mcpak.json and run mcpak publish again. Only the package owner can publish new versions.


Paid Packages

Charge users for your MCP server using Polar license keys. You set the price, Polar handles payment — mcpak validates the license key on install.

Step 1. Create a Polar account

  1. Go to polar.sh and sign up (GitHub login works)
  2. Create an Organization if you don't already have one
  3. Note your Organization ID — find it on your organization settings page (looks like org_xxxxx or a UUID)

Step 2. Create a Product with License Keys

  1. In your Polar dashboard, go to ProductsNew Product
  2. Set your product name (e.g. "my-mcp-server license") and price
  3. Under Benefits, add a License Keys benefit — this is what end users will receive after purchase
  4. Save the product
Tip: You can set the license key prefix (e.g. MYSERVER_) and configure activation limits in the License Keys benefit settings.

Step 3. Add Polar config to mcpak.json

Add the polar section with your Organization ID:

{
  "name": "my-mcp-server",
  "version": "1.0.0",
  "description": "My awesome MCP server",
  "mcpServer": {
    "command": "node",
    "args": ["server.js"]
  },
  "polar": {
    "organizationId": "your-polar-org-id"
  }
}

Then publish as usual with mcpak publish. The registry will mark your package as paid.

Step 4. Share your Polar product page

End users purchase a license key from your Polar product page. You can share the link directly or create a Checkout Link in Polar for a streamlined purchase experience.

How end users install paid packages

After purchasing a license key from your Polar page, users install your package with:

mcpak key add my-mcp-server THEIR_LICENSE_KEY

Then install normally:

mcpak install my-mcp-server

The registry validates the license key against your Polar organization before serving the package. Invalid or revoked keys are rejected.

Revenue

All payments go directly to your Polar account. mcpak does not take a cut of your revenue. Polar's own fees apply — see Polar's fee structure for details.