···11+name: Publish MCP Package
22+33+on:
44+ release:
55+ types: [published]
66+77+permissions:
88+ contents: read
99+ id-token: write
1010+1111+jobs:
1212+ publish:
1313+ runs-on: ubuntu-24.04
1414+ if: ${{ startsWith(github.event.release.tag_name, 'mcp-v') }}
1515+1616+ steps:
1717+ - name: Checkout repository
1818+ uses: actions/checkout@v4
1919+2020+ - name: Setup pnpm
2121+ uses: pnpm/action-setup@v4
2222+ with:
2323+ version: 10.32.1
2424+2525+ - name: Setup Node.js
2626+ uses: actions/setup-node@v6
2727+ with:
2828+ node-version: 20.19.0
2929+ cache: pnpm
3030+ registry-url: https://registry.npmjs.org
3131+3232+ - name: Install dependencies
3333+ run: pnpm install --frozen-lockfile
3434+3535+ - name: Run MCP checks
3636+ run: |
3737+ pnpm --filter @kaneo/mcp test
3838+ pnpm --filter @kaneo/mcp build
3939+4040+ - name: Validate MCP release tag
4141+ run: |
4242+ PACKAGE_VERSION=$(node -p "require('./packages/mcp/package.json').version")
4343+ TAG_VERSION="${GITHUB_REF_NAME#mcp-v}"
4444+4545+ if [ "${GITHUB_REF_NAME}" = "${TAG_VERSION}" ]; then
4646+ echo "Release tag must start with mcp-v, got ${GITHUB_REF_NAME}"
4747+ exit 1
4848+ fi
4949+5050+ if [ "${TAG_VERSION}" != "${PACKAGE_VERSION}" ]; then
5151+ echo "Release tag version (${TAG_VERSION}) does not match packages/mcp version (${PACKAGE_VERSION})"
5252+ exit 1
5353+ fi
5454+5555+ - name: Check whether @kaneo/mcp version is already published
5656+ id: version_check
5757+ run: |
5858+ PACKAGE_VERSION=$(node -p "require('./packages/mcp/package.json').version")
5959+6060+ if npm view "@kaneo/mcp@${PACKAGE_VERSION}" version >/dev/null 2>&1; then
6161+ echo "already_published=true" >> "$GITHUB_OUTPUT"
6262+ echo "@kaneo/mcp@${PACKAGE_VERSION} is already published; skipping publish."
6363+ else
6464+ echo "already_published=false" >> "$GITHUB_OUTPUT"
6565+ fi
6666+6767+ - name: Publish @kaneo/mcp
6868+ if: ${{ steps.version_check.outputs.already_published == 'false' }}
6969+ run: |
7070+ cd packages/mcp
7171+ npm publish --access public --provenance
7272+ env:
7373+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
apps/mcp/LICENSE
packages/mcp/LICENSE
+3-3
apps/mcp/README.md
packages/mcp/README.md
···2233`@kaneo/mcp` is a local MCP server for Kaneo.
4455-It runs over stdio, signs in with Kaneo's device flow, and then calls the Kaneo API with a bearer token. The package lives in `apps/mcp` in this monorepo and exposes the `kaneo-mcp` CLI.
55+It runs over stdio, signs in with Kaneo's device flow, and then calls the Kaneo API with a bearer token. The package lives in `packages/mcp` in this monorepo and exposes the `kaneo-mcp` CLI.
6677## Prerequisites
88···6969kaneo-mcp install --help
7070```
71717272-If you are currently inside the local `apps/mcp` package directory, npm may resolve the local workspace package instead of the published one and fail to expose the bin. In that case, either run `npx` from outside `apps/mcp`, or use a local build:
7272+If you are currently inside the local `packages/mcp` package directory, npm may resolve the local workspace package instead of the published one and fail to expose the bin. In that case, either run `npx` from outside `packages/mcp`, or use a local build:
73737474```bash
7575node dist/index.js
···9191Or run it from the package directory:
92929393```bash
9494-pnpm -C apps/mcp run build
9494+pnpm -C packages/mcp run build
9595```
96969797The CLI entry points to `./dist/index.js`. Use `npx @kaneo/mcp` or `kaneo-mcp` after a global install so your IDE config points at the resolved path.