fix(mcp): handle non-JSON success response, update params_to_tool docs #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish MCP to npm | |
| on: | |
| push: | |
| tags: | |
| - "mcp-v*" # Trigger on tags like mcp-v0.1.3, mcp-v1.0.0 | |
| permissions: | |
| contents: write # For creating GitHub Releases | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/mcp | |
| strategy: | |
| matrix: | |
| node-version: [18, 20, 22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: packages/mcp/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Run tests | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| publish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/mcp | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| - name: Verify package version matches tag | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#mcp-v}" | |
| PKG_VERSION=$(node -p "require('./package.json').version") | |
| if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then | |
| echo "::error::Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)" | |
| exit 1 | |
| fi | |
| echo "VERSION=$PKG_VERSION" >> "$GITHUB_ENV" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "QVeris MCP Server v${{ env.VERSION }}" | |
| body: | | |
| ## Install | |
| ```bash | |
| npx -y @qverisai/mcp@${{ env.VERSION }} | |
| ``` | |
| See [README](packages/mcp/README.md) for configuration. | |
| generate_release_notes: true |