NPM Publisher MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NPM Publisher MCP Server Run the complete publish workflow with a patch version bump"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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
Related MCP server: npmplus-mcp
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 setupUsage 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 statusMCP Tools
The server provides these tools to GitHub Copilot:
Tool | Description |
| Validate package.json and check prerequisites |
| Check NPM authentication status |
| Bump package version (patch/minor/major) |
| Check if version exists on NPM |
| Publish package to NPM registry |
| Check Git repository status |
| Create Git tags for releases |
| Commit and push changes |
| Complete automated workflow |
Documentation
π Installation Guide
π― Usage Guide
π§ API Reference
π Security
π€ Contributing
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:
β Check for uncommitted changes
π¦ Bump version (1.0.0 β 1.0.1)
πΎ Commit changes to Git
π·οΈ Create version tag (v1.0.1)
β¬οΈ Push to remote repository
π 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 publicDry Run
Test without making changes:
npm-publisher publish --dry-runWorkflow 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 alphaProject 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.mdTroubleshooting
Not logged in to NPM
npm login
# Or set NPM_TOKEN environment variableWorking directory has uncommitted changes
git status
git add .
git commit -m "Your changes"
# Or use git stashVersion already published
Bump the version first:
npm-publisher bump patchGit remote not configured
git remote add origin https://github.com/username/repo.gitSecurity
Never commit
.npmrcfiles containing authentication tokensUse environment variables for sensitive data
Review changes before publishing
Use
--dry-runto 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
NPM: (Coming soon)
Issues: https://github.com/GiDanis/copilot-npm-publisher/issues
MCP Specification: https://modelcontextprotocol.io/
Support
π§ Report issues: GitHub Issues
π¬ Discussions: GitHub Discussions
π Documentation: docs/
Made with β€οΈ by Giuseppe Danise
Available Tools
9 toolsgit_commit_and_pushC
Commit changes and push to remote repository
Inputs: message (required), push, files.
git_create_tagC
Create a Git tag for the current version
Inputs: tag, push, message.
git_statusB
Check Git repository status (uncommitted changes, branch info)
Inputs: directory.
npm_check_publishedC
Check if a specific version of the package exists on NPM
Inputs: version, packageName.
npm_login_statusB
Check NPM authentication status and logged-in user
Inputs: no named parameters.
npm_publishC
Publish package to NPM registry
Inputs: tag, access, dryRun, directory.
npm_validateB
Validate package.json and check prerequisites for NPM publishing
Inputs: directory.
npm_version_bumpB
Bump package version (patch, minor, or major)
Inputs: type (required), preid, directory.
publish_workflowA
Complete publishing workflow: bump version, commit, tag, and publish to NPM
Inputs: versionType (required), dryRun, npmTag, npmAccess, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Each tool targets a distinct step (validate, login status, version bump, publish check, publish, git status, tag, commit/push). The only boundary blur is publish_workflow, which chains together npm_version_bump, git_commit_and_push, git_create_tag, and npm_publish that already exist as standalone tools, so an agent must decide between the composite and the granular path.
Tools follow a clear prefix_action convention with npm_ and git_ namespaces, which makes resource grouping obvious. The lone outlier is publish_workflow, which drops the prefix pattern, though its meaning remains clear.
Nine tools is well-scoped for a publish-workflow server, with each tool earning its place across npm and git concerns. Adding more would likely introduce redundancy rather than coverage.
The lifecycle is largely covered: validation, auth check, version check, bump, tag, commit/push, publish, plus a one-shot workflow. Minor gaps exist around unpublish, dist-tag/latest management, and scoped/registry selection, but agents can work around these.
Maintenance
Related MCP Connectors
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Manage repositories, users, releases, and automate GitHub workflows
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, dependβ¦
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects MCP-enabled editors to GitHub Copilot CLI for non-interactive code analysis, batch processing, and code review.1033 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered JavaScript package management including search, install, update, remove, and security auditing across npm, yarn, and pnpm.45 npm10MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to create conventional Git commits, update changelogs, and optionally push changes to remote repositories.22MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to perform Git workflows with semantic commit messages, pre-PR secret audits, conflict resolution, and release changelog generation.5MIT