MCP Server Publishing
Guides publishing MCP servers to NPM or PyPI/UVX.
Workflow
- •Detect server type
- •Run validation script
- •Fix issues
- •Publish
Type Detection
Check project root:
- •
package.json-> TypeScript/Node.js -> See references/npm.md - •
pyproject.toml-> Python -> See references/uvx.md
If both exist, ask which runtime the server targets.
Validation
Run before publishing:
TypeScript/Node.js:
bash
python <skill-path>/scripts/validate_npm.py <project-path>
Python:
bash
python <skill-path>/scripts/validate_uvx.py <project-path>
Replace <skill-path> with this skill's location and <project-path> with the MCP server directory.
Fix all errors before proceeding to publish.
Repository URL Validation
After running validation, check that the package manifest matches the git remote:
- •Get the configured git remote:
git remote get-url origin - •Compare with repository field in package.json or pyproject.toml
- •If mismatch, confirm with user which is correct before proceeding
- •Update the manifest file if needed
README Installation Section
Before publishing, verify and update the README installation instructions.
Validation checks for all four installation methods:
TypeScript/Node.js:
- •npx command:
npx @scope/package-name - •Global install:
npm install -g @scope/package-name - •Claude Desktop config (claude_desktop_config.json with mcpServers)
- •Claude Code CLI:
claude mcp add
Python:
- •uvx command:
uvx package-name - •Pip install:
pip install package-name - •Claude Desktop config (claude_desktop_config.json with mcpServers)
- •Claude Code CLI:
claude mcp add
Update README sections automatically if any methods are missing.
Pre-Publish Checklist
Verify before any publish:
- •Version incremented from last release
- •README.md exists with server description
- •LICENSE file present
- •No secrets in committed files
- •Build artifacts excluded via .gitignore
- •Server runs locally without errors
- •Repository URL in manifest matches git remote
- •README installation instructions are correct