Skip to main content
Glama
deploy.shโ€ข2.52 kB
#!/bin/bash # Deployment script for MCP Docs Server set -e DEPLOYMENT_MODE=${1:-"local"} VERSION=${2:-"latest"} echo "๐Ÿš€ Deploying MCP Docs Server (Mode: $DEPLOYMENT_MODE, Version: $VERSION)" case $DEPLOYMENT_MODE in "local") echo "๐Ÿ“ Local deployment mode" # Build the project echo "๐Ÿ”จ Building project..." npm run build # Test the build echo "๐Ÿงช Testing build..." node test-server.js # Package for distribution echo "๐Ÿ“ฆ Creating package..." npm pack # Install globally for testing echo "๐ŸŒ Installing globally..." npm install -g . echo "โœ… Local deployment complete!" echo "Test with: npx @modelcontextprotocol/inspector mcp-docs-server" ;; "docker") echo "๐Ÿณ Docker deployment mode" # Build Docker image echo "๐Ÿ”จ Building Docker image..." docker build -t mcp-docs-server:$VERSION . # Test the image echo "๐Ÿงช Testing Docker image..." docker run --rm -d --name mcp-docs-test mcp-docs-server:$VERSION sleep 5 if docker ps | grep -q mcp-docs-test; then echo "โœ… Docker container is running" docker stop mcp-docs-test else echo "โŒ Docker container failed to start" docker logs mcp-docs-test exit 1 fi echo "โœ… Docker deployment complete!" echo "Run with: docker run -it mcp-docs-server:$VERSION" ;; "npm") echo "๐Ÿ“ฆ NPM registry deployment mode" # Verify we're ready for publication echo "๐Ÿ” Pre-publication checks..." # Check if we're in a git repo and committed if git status --porcelain | grep -q .; then echo "โš ๏ธ Warning: Uncommitted changes detected" echo "Consider committing changes before publishing" fi # Check version CURRENT_VERSION=$(node -p "require('./package.json').version") echo "๐Ÿ“‹ Current version: $CURRENT_VERSION" # Build and test npm run build node test-server.js # Dry run echo "๐Ÿงช NPM publish dry run..." npm publish --dry-run echo "โœ… NPM deployment ready!" echo "To publish: npm publish" ;; *) echo "โŒ Unknown deployment mode: $DEPLOYMENT_MODE" echo "Available modes: local, docker, npm" exit 1 ;; esac echo "" echo "๐ŸŽ‰ Deployment completed successfully!" echo "" echo "๐Ÿ“‹ Next steps:" echo "- Test the deployment thoroughly" echo "- Monitor for any issues" echo "- Update documentation if needed"

Latest Blog Posts

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/glassBead-tc/mcp-docs-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server