Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to NPM in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/imagekit-developer/imagekit-nodejs/actions/workflows/publish-npm.yml
name: Publish NPM
on:
workflow_dispatch:
inputs:
path:
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
required: true

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: |
yarn install

- name: Publish to NPM
run: |
if [ -n "${{ github.event.inputs.path }}" ]; then
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
else
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
fi
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
env:
NPM_TOKEN: ${{ secrets.IMAGE_KIT_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Upload MCP Server DXT GitHub release asset
run: |
gh release upload ${{ github.event.release.tag_name }} \
packages/mcp-server/imagekit_nodejs_api.mcpb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.IMAGE_KIT_NPM_TOKEN || secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.0.0"
".": "7.0.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 42
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-d1a3e6dfc45ae832b6b14a0aef25878985c679fa9f48c1470df188b1578ba648.yml
openapi_spec_hash: 1d382866fce3284f26d341f112988d9d
config_hash: ff23f46fe08ef3f43c57c8cf13eff3a1
config_hash: d57f3c7c581048428b41398f30da8b9b
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 7.0.1 (2025-09-21)

Full Changelog: [v7.0.0...v7.0.1](https://github.com/imagekit-developer/imagekit-nodejs/compare/v7.0.0...v7.0.1)

### Chores

* update SDK settings ([0a6ec00](https://github.com/imagekit-developer/imagekit-nodejs/commit/0a6ec001c489c53040ea197d6c864f8b96fa8ac4))

## 7.0.0 (2025-09-21)

Full Changelog: [v0.0.1-alpha.0...v7.0.0](https://github.com/imagekit-developer/imagekit-nodejs/compare/v0.0.1-alpha.0...v7.0.0)
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,17 @@ To format and fix all lint issues automatically:
```sh
$ yarn fix
```

## Publishing and releases

Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
the changes aren't made through the automated pipeline, you may want to make releases manually.

### Publish with a GitHub workflow

You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/imagekit-developer/imagekit-nodejs/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.

### Publish manually

If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
the environment.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ If you are looking to integrate file uploads in browsers, use one of our [fronte
## Installation

```sh
npm install git+ssh://git@github.com:imagekit-developer/imagekit-nodejs.git
npm install @imagekit/nodejs
```

> [!NOTE]
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install @imagekit/nodejs`

## Usage

The full API of this library can be found in [api.md](api.md).
Expand Down
4 changes: 4 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

errors=()

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@imagekit/nodejs",
"version": "7.0.0",
"version": "7.0.1",
"description": "Offical NodeJS SDK for ImageKit.io integration",
"author": "Image Kit <developer@imagekit.io>",
"types": "dist/index.d.ts",
Expand Down
25 changes: 5 additions & 20 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,19 @@

## Installation

### Building
### Direct invocation

Because it's not published yet, clone the repo and build it:
You can run the MCP Server directly via `npx`:

```sh
git clone git@github.com:imagekit-developer/imagekit-nodejs.git
cd imagekit-nodejs
./scripts/bootstrap
./scripts/build
```

### Running

```sh
# set env vars as needed
export IMAGEKIT_PRIVATE_KEY="My Private Key"
export OPTIONAL_IMAGEKIT_IGNORES_THIS="My Password"
export IMAGEKIT_WEBHOOK_SECRET="My Webhook Secret"
node ./packages/mcp-server/dist/index.js
npx -y imagekit-api-mcp@latest
```

> [!NOTE]
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npx -y imagekit-api-mcp`

### Via MCP Client

[Build the project](#building) as mentioned above.

There is a partial list of existing clients at [modelcontextprotocol.io](https://modelcontextprotocol.io/clients). If you already
have a client, consult their documentation to install the MCP server.

Expand All @@ -39,8 +24,8 @@ For clients with a configuration JSON, it might look something like this:
{
"mcpServers": {
"imagekit_nodejs_api": {
"command": "node",
"args": ["/path/to/local/imagekit-nodejs/packages/mcp-server", "--client=claude", "--tools=dynamic"],
"command": "npx",
"args": ["-y", "imagekit-api-mcp", "--client=claude", "--tools=dynamic"],
"env": {
"IMAGEKIT_PRIVATE_KEY": "My Private Key",
"OPTIONAL_IMAGEKIT_IGNORES_THIS": "My Password",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imagekit-api-mcp",
"version": "7.0.0",
"version": "7.0.1",
"description": "The official MCP Server for the Image Kit API",
"author": "Image Kit <developer@imagekit.io>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'imagekit_nodejs_api',
version: '7.0.0',
version: '7.0.1',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '7.0.0'; // x-release-please-version
export const VERSION = '7.0.1'; // x-release-please-version