npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

copilot-npm-publisher

v1.0.0

Published

MCP server for GitHub Copilot CLI to automate NPM package publishing with Git integration

Downloads

106

Readme

NPM Publisher MCP Server

🚀 Automate NPM package publishing with GitHub Copilot CLI

A Model Context Protocol (MCP) server that streamlines NPM package publishing workflows by integrating version management, Git operations, and NPM publishing into GitHub Copilot CLI.

License: MIT Node.js Version

Features

  • 🔍 Package Validation - Comprehensive checks for package.json and prerequisites
  • 📦 Version Management - Automated version bumping (semantic versioning)
  • 🏷️ Git Integration - Automatic tagging, committing, and pushing
  • 🚀 NPM Publishing - One-command publishing with safety checks
  • 🔄 Complete Workflow - End-to-end automation from version bump to publish
  • 🤖 Copilot Integration - Natural language commands via GitHub Copilot CLI
  • 💻 Standalone CLI - Use without Copilot for manual operations

Quick Start

Installation

# Clone the repository
git clone https://github.com/GiDanis/copilot-npm-publisher.git
cd copilot-npm-publisher

# Install dependencies
npm install

# Run setup wizard
npm run setup

Usage with GitHub Copilot CLI

Once configured, use natural language commands:

gh copilot chat

# Then ask:
"Check if my package is ready to publish"
"Bump the version to a minor release"
"Publish my package to NPM"
"Run the complete publish workflow with a patch version"

Standalone CLI Usage

# Validate package
npm-publisher validate

# Bump version
npm-publisher bump patch

# Publish to NPM
npm-publisher publish --access public

# Complete workflow
npm-publisher workflow minor

# Check status
npm-publisher status

MCP Tools

The server provides these tools to GitHub Copilot:

| Tool | Description | |------|-------------| | npm_validate | Validate package.json and check prerequisites | | npm_login_status | Check NPM authentication status | | npm_version_bump | Bump package version (patch/minor/major) | | npm_check_published | Check if version exists on NPM | | npm_publish | Publish package to NPM registry | | git_status | Check Git repository status | | git_create_tag | Create Git tags for releases | | git_commit_and_push | Commit and push changes | | publish_workflow | Complete automated workflow |

Documentation

Requirements

  • Node.js: >= 16.0.0
  • NPM Account: With publishing permissions
  • Git: Installed and configured
  • GitHub Copilot CLI: (Optional) For natural language interface

Configuration

NPM Authentication

# Login to NPM
npm login

# Or set NPM_TOKEN environment variable
export NPM_TOKEN="your_npm_token_here"

GitHub Copilot Integration

The setup wizard automatically configures Copilot CLI, or manually add to ~/.config/github-copilot/apps.json:

{
  "mcpServers": {
    "npm-publisher": {
      "command": "node",
      "args": ["/path/to/copilot-npm-publisher/src/index.js"],
      "env": {
        "NPM_TOKEN": "optional_token_here"
      }
    }
  }
}

Examples

Complete Publishing Workflow

# Using CLI
npm-publisher workflow patch

# Using Copilot
gh copilot chat
> "Run a complete publish workflow with a patch version bump"

This will:

  1. ✅ Check for uncommitted changes
  2. 📦 Bump version (1.0.0 → 1.0.1)
  3. 💾 Commit changes to Git
  4. 🏷️ Create version tag (v1.0.1)
  5. ⬆️ Push to remote repository
  6. 🚀 Publish to NPM

Publish Beta Version

# Bump to prerelease
npm-publisher bump prepatch --preid beta

# Publish with beta tag
npm-publisher publish --tag beta --access public

Dry Run

Test without making changes:

npm-publisher publish --dry-run

Workflow Examples

Standard Release

# 1. Validate
npm-publisher validate

# 2. Run workflow
npm-publisher workflow patch

# Package is now published! 🎉

Prerelease

npm version prepatch --preid alpha --no-git-tag-version
git add package.json
git commit -m "chore: bump to alpha"
git push
npm publish --tag alpha

Project Structure

copilot-npm-publisher/
├── src/
│   ├── index.js          # MCP server implementation
│   └── cli.js            # Standalone CLI
├── setup/
│   └── config-wizard.js  # Interactive setup
├── docs/
│   ├── installation.md   # Installation guide
│   ├── usage.md          # Usage guide
│   └── api.md            # API reference
├── .github/
│   └── workflows/
│       ├── ci.yml        # CI pipeline
│       └── publish.yml   # Auto-publish on tags
├── package.json
├── README.md
├── LICENSE
├── SECURITY.md
└── CONTRIBUTING.md

Troubleshooting

Not logged in to NPM

npm login
# Or set NPM_TOKEN environment variable

Working directory has uncommitted changes

git status
git add .
git commit -m "Your changes"
# Or use git stash

Version already published

Bump the version first:

npm-publisher bump patch

Git remote not configured

git remote add origin https://github.com/username/repo.git

Security

  • Never commit .npmrc files containing authentication tokens
  • Use environment variables for sensitive data
  • Review changes before publishing
  • Use --dry-run to test without publishing

See SECURITY.md for more details.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

License

MIT © Giuseppe Danise

See LICENSE for details.

Links

  • GitHub: https://github.com/GiDanis/copilot-npm-publisher
  • NPM: (Coming soon)
  • Issues: https://github.com/GiDanis/copilot-npm-publisher/issues
  • MCP Specification: https://modelcontextprotocol.io/

Support


Made with ❤️ by Giuseppe Danise