# Publishing Guide
This document explains how to publish the Restream MCP Server to npm.
## Prerequisites
1. npm account - Create one at [npmjs.com](https://www.npmjs.com/)
2. Login to npm:
```bash
npm login
```
## Publishing to npm
### First Time Publishing
1. Ensure you're logged in to npm:
```bash
npm whoami
```
2. Build the project:
```bash
npm run build
```
3. Test the package locally:
```bash
npm pack
```
4. Publish to npm:
```bash
npm publish --access public
```
Note: The `--access public` flag is required for scoped packages (@shaktech786/...)
### Publishing Updates
1. Update the version in `package.json`:
```bash
npm version patch # For bug fixes (1.0.0 -> 1.0.1)
npm version minor # For new features (1.0.0 -> 1.1.0)
npm version major # For breaking changes (1.0.0 -> 2.0.0)
```
2. Build and publish:
```bash
npm run build
npm publish
```
3. Push the version tag to GitHub:
```bash
git push --follow-tags
```
## Submitting to MCP Registry
Once published to npm, you can submit it to the official MCP registry:
1. Visit the [MCP Registry](https://github.com/modelcontextprotocol/servers)
2. Fork the repository
3. Add your server to the registry following their contribution guidelines
4. Submit a pull request
## Pre-publish Checklist
- [ ] All tests pass
- [ ] README is up to date
- [ ] Version number is bumped
- [ ] CHANGELOG is updated
- [ ] Build succeeds (`npm run build`)
- [ ] Package contents are correct (`npm pack` and inspect)
- [ ] No sensitive information in published files
## Package Contents
The following files are included in the published package (defined in `package.json` `files` field):
- `dist/` - Compiled JavaScript and type definitions
- `README.md` - Documentation
- `QUICK_START.md` - Quick start guide
- `LICENSE` - MIT License
The following are excluded via `.npmignore`:
- Source files (`src/`)
- Environment files (`.env`, `.env.example`)
- TypeScript config
- Git files
- Development configs
## Verifying the Published Package
After publishing, verify it works:
```bash
npm install -g @shaktech786/restream-mcp-server
restream-mcp-server --version
```
## Unpublishing (Emergency Only)
If you need to unpublish a version within 72 hours:
```bash
npm unpublish @shaktech786/restream-mcp-server@1.0.0
```
Note: Use unpublishing sparingly. It's better to publish a new version with fixes.
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shaktech786/restream-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server