Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The ImageKit Node.js SDK is a comprehensive library designed to simplify the int

The full API of this library is documented in [api.md](api.md). All request parameters and response types are fully typed and importable, offering unparalleled TypeScript support. This ensures that you can rely on accurate type definitions and enjoy a smooth development workflow with modern editors.

For additional details, refer to the [ImageKit REST API documentation](https://imagekit.io/docs/api-reference).
For additional details, refer to the [ImageKit documentation](https://imagekit.io/docs/).

If you are looking to integrate file uploads in browsers, use one of our [frontend SDKs](https://imagekit.io/docs/quick-start-guides#front-end).

Expand Down
53 changes: 53 additions & 0 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,56 @@ A configuration JSON for this server might look like this, assuming the server i
}
}
```

## Usage Examples

Once connected, you can drive the server with natural-language prompts. The agent will
call `search_docs` to look up the right SDK methods and then `execute` to run the code.

### Example 1: Upload and organize

1. Upload a photo https://ik.imagekit.io/demo/medium_cafe_B1iTdD0C.jpg as coffee.jpg to my Imagekit DAM
2. Create a folder called /products/2026-spring" in Imagekit
3. Move the file 'coffee.jpg' into /products/2026-spring" in Imagekit

### Example 2: Search and filter your library

1. Find all image files uploaded in last 7 days in Imagekit
2. Find all files having Brand as Nike (custom metadata).
3. Show me the details and tags for the above files

### Example 3: Tag and update metadata

1. Add the tags 'featured' and 'homepage' to file ID 690db96c5c7cd75eb8bfd61c in Imagekit
2. List my custom metadata fields
3. Set the custom metadata field 'Brand' to 'ADIDAS Originals' on file ID 6a4789ee5c7cd75eb8f8126c

## Privacy Policy

This connector processes your prompts and the ImageKit account data required to fulfill
your requests. See ImageKit's privacy policy for full details:
[https://imagekit.io/privacy-policy/](https://imagekit.io/privacy-policy/).

- **Data collected**: the code/instructions you send to the `execute` tool and the
ImageKit API requests it makes on your behalf (e.g. file listings, uploads, metadata).
- **Authentication**: your ImageKit private key (or an OAuth-issued token for the hosted
server) is used only to authenticate ImageKit API calls. Executed code runs in an
isolated sandbox with network access restricted to the ImageKit API hosts; it cannot
read the host process environment or other secrets.
- **Third-party sharing**: none beyond the ImageKit API required to perform your request.
- **Retention**: operational logs are retained per ImageKit's standard retention policy.
- **Contact**: [support@imagekit.io](mailto:support@imagekit.io).

## Support

- **Documentation**: [https://imagekit.io/docs/](https://imagekit.io/docs/)
- **Issues**: [https://github.com/imagekit-developer/imagekit-nodejs/issues](https://github.com/imagekit-developer/imagekit-nodejs/issues)
- **Email**: [imagekit-developer@imagekit.io](mailto:imagekit-developer@imagekit.io)

### Troubleshooting

- **`Deno is required for code execution`** — install Deno from
[https://deno.land](https://deno.land) or run `npm install deno`; the `execute` tool
runs your code in a Deno sandbox.
- **Authentication errors** — verify `IMAGEKIT_PRIVATE_KEY` (starts with `private_`) is
set and valid in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/api-keys).
1 change: 1 addition & 0 deletions packages/mcp-server/build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cd ..

# pack bundle
cp manifest.json dist-bundle
cp icon.png dist-bundle

npx mcpb pack dist-bundle imagekit_nodejs_api.mcpb

Expand Down
Binary file added packages/mcp-server/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"dxt_version": "0.2",
"manifest_version": "0.3",
"name": "@imagekit/api-mcp",
"version": "7.9.1",
"description": "The official MCP Server for the Image Kit API",
"long_description": "The official MCP server for ImageKit. Upload, search, organize images, videos, and files in your ImageKit media library. Manage folders, tags, and custom metadata by writing code against the ImageKit TypeScript SDK, executed in an isolated sandbox with access limited to the ImageKit API.",
"author": {
"name": "Image Kit",
"email": "developer@imagekit.io"
Expand All @@ -12,7 +13,11 @@
"url": "git+https://github.com/imagekit-developer/imagekit-nodejs.git"
},
"homepage": "https://github.com/imagekit-developer/imagekit-nodejs/tree/main/packages/mcp-server#readme",
"documentation": "https://imagekit.io/docs/api-reference",
"documentation": "https://imagekit.io/docs/",
"icon": "icon.png",
"privacy_policies": [
"https://imagekit.io/privacy-policy/"
],
"server": {
"type": "node",
"entry_point": "index.js",
Expand Down Expand Up @@ -56,6 +61,14 @@
}
},
"keywords": [
"api"
"api",
"imagekit",
"media",
"images",
"videos",
"dam",
"cdn",
"transformation",
"asset-management"
]
}
}
41 changes: 41 additions & 0 deletions packages/mcp-server/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.imagekit-developer/api-mcp",
"title": "ImageKit",
"description": "Upload, search, organize, and transform images, videos, and files in your ImageKit media library.",
"repository": {
"url": "https://github.com/imagekit-developer/imagekit-nodejs",
"source": "github"
},
"version": "7.9.1",
"packages": [
{
"registryType": "npm",
"identifier": "@imagekit/api-mcp",
"version": "7.9.1",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"name": "IMAGEKIT_PRIVATE_KEY",
"description": "Your ImageKit private API key (starts with `private_`). Found in the ImageKit dashboard under Developer > API Keys.",
"isRequired": true,
"isSecret": true
},
{
"name": "IMAGEKIT_WEBHOOK_SECRET",
"description": "Your ImageKit webhook secret (starts with `whsec_`). Only required if you verify webhook signatures.",
"isRequired": false,
"isSecret": true
}
]
}
],
"remotes": [
{
"type": "streamable-http",
"url": "https://api-mcp.imagekit.io/mcp"
}
]
}
9 changes: 8 additions & 1 deletion packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@ export function codeTool({
},
intent: {
type: 'string',
description: 'Task you are trying to perform. Used for improving the service.',

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this line, even though we are not logging intent anywhere, having this line could raise some eye brows as per 1.D in https://support.claude.com/en/articles/13145358-anthropic-software-directory-policy

description: 'Task you are trying to perform.',
},
},
required: ['code'],
},
annotations: {
title: 'Execute ImageKit API code',
readOnlyHint: false,
destructiveHint: true,
idempotentHint: false,
openWorldHint: true,
},
};

const logger = getLogger();
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export const tool: Tool = {
required: ['query', 'language'],
},
annotations: {
title: 'Search ImageKit SDK docs',
readOnlyHint: true,
openWorldHint: true,
},
};

Expand Down