This document covers local development and publishing to npm.
-
Prerequisites:
- Node.js v22+ (required)
- npm
-
Clone the repository:
git clone https://github.com/soracom-labs/soracom-mcp-server.git cd soracom-mcp-server npm install -
Set up environment variables:
export SORACOM_AUTH_KEY_ID=your-key-id export SORACOM_AUTH_KEY=your-token export SORACOM_COVERAGE_TYPE=jp # or "g" for global
# Run in development mode (TypeScript directly)
npm run dev
# Run tests
npm test
# Type checking
npm run typecheck
# Linting
npm run lint
# Build for production
npm run build
# Run built version
npm startSee Claude Desktop Configuration for setting up local development with Claude Desktop.
- npm account with publish access to @soracom-labs scope
- Logged in to npm:
npm login
-
Run tests and checks:
npm test npm run lint npm run typecheck -
Update version:
npm version patch # or minor, major -
Build:
npm run build
-
Publish:
npm publish
Releases are handled manually to ensure quality control:
# Update version
npm version patch # Creates patch version tag (1.6.0 → 1.6.1)
npm version minor # Creates minor version tag (1.6.0 → 1.7.0)
npm version major # Creates major version tag (1.6.0 → 2.0.0)
# Push version and tags
git push origin main
git push origin --tags
# Manual publish to npm
npm publish- 401 Unauthorized: Check npm login status with
npm whoami - 403 Forbidden: Ensure you have publish access to @soracom-labs scope
- Build failures: Run
npm run checkto verify all checks pass - Missing dist folder: Run
npm run buildbefore publishing