|
| 1 | +# Publishing Guide for Agents |
| 2 | + |
| 3 | +This document outlines the steps for building, versioning, and publishing the `@takescake/1password-mcp` server. |
| 4 | + |
| 5 | +## Versioning |
| 6 | + |
| 7 | +We adhere to [Semantic Versioning](https://semver.org/). |
| 8 | +- **Patch** (2.4.x): Bug fixes and minor security updates. |
| 9 | +- **Minor** (2.x.0): New tools, prompts, or non-breaking features. |
| 10 | +- **Major** (x.0.0): Breaking changes to the MCP tool schemas or core architecture. |
| 11 | + |
| 12 | +When bumping the version, ensure it is updated in the following locations: |
| 13 | +1. `package.json` |
| 14 | +2. `server.json` |
| 15 | +3. `src/config.ts` (the `SERVER_VERSION` constant) |
| 16 | +4. `CHANGELOG.md` |
| 17 | + |
| 18 | +## Build and Validation |
| 19 | + |
| 20 | +Before publishing, always run the full validation suite: |
| 21 | + |
| 22 | +```bash |
| 23 | +# Clean previous builds |
| 24 | +npm run clean |
| 25 | + |
| 26 | +# Install fresh dependencies |
| 27 | +npm ci |
| 28 | + |
| 29 | +# Type-check, build, and run tests |
| 30 | +npm run build |
| 31 | +npm run lint |
| 32 | +npm test |
| 33 | +``` |
| 34 | + |
| 35 | +## Publishing to npm |
| 36 | + |
| 37 | +### Automated (Recommended) |
| 38 | + |
| 39 | +1. Create a new GitHub Release on the `master` branch. |
| 40 | +2. The `publish.yml` workflow will automatically trigger, build, test, and publish to npm. |
| 41 | +3. Ensure the `NPM_TOKEN` is configured in GitHub Secrets. |
| 42 | + |
| 43 | +### Manual |
| 44 | + |
| 45 | +If manual publishing is required: |
| 46 | + |
| 47 | +```bash |
| 48 | +npm login |
| 49 | +npm publish --access public |
| 50 | +``` |
| 51 | + |
| 52 | +*Note: The `prepublishOnly` script in `package.json` will automatically run `clean`, `build`, and `test` before the package is uploaded.* |
| 53 | + |
| 54 | +## Configuration Variables |
| 55 | + |
| 56 | +- `OP_SERVICE_ACCOUNT_TOKEN`: **Required.** The service account token for 1Password. |
| 57 | +- `OP_INTEGRATION_NAME`: (Optional) Defaults to `1password-mcp`. |
| 58 | +- `OP_INTEGRATION_VERSION`: (Optional) Defaults to the current `SERVER_VERSION`. |
| 59 | +- `MCP_LOG_LEVEL`: (Optional) `debug`, `info`, `warn`, `error`. Defaults to `info`. |
| 60 | + |
| 61 | +## CI/CD Pipeline |
| 62 | + |
| 63 | +The CI pipeline (`ci.yml`) runs on every push and pull request to the `master` branch. It validates the build across Node.js 18, 20, and 22. |
0 commit comments