diff --git a/README.md b/README.md index 78ee5b83..2acd8528 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 2fe6b778..08969e66 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -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). diff --git a/packages/mcp-server/build b/packages/mcp-server/build index 90381d31..46ef4c92 100644 --- a/packages/mcp-server/build +++ b/packages/mcp-server/build @@ -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 diff --git a/packages/mcp-server/icon.png b/packages/mcp-server/icon.png new file mode 100644 index 00000000..3bd018c3 Binary files /dev/null and b/packages/mcp-server/icon.png differ diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 3ef16e93..e737d0c5 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -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" @@ -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", @@ -56,6 +61,14 @@ } }, "keywords": [ - "api" + "api", + "imagekit", + "media", + "images", + "videos", + "dam", + "cdn", + "transformation", + "asset-management" ] -} +} \ No newline at end of file diff --git a/packages/mcp-server/server.json b/packages/mcp-server/server.json new file mode 100644 index 00000000..e141d24c --- /dev/null +++ b/packages/mcp-server/server.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts index 832cece5..15cdf9eb 100644 --- a/packages/mcp-server/src/code-tool.ts +++ b/packages/mcp-server/src/code-tool.ts @@ -69,11 +69,18 @@ export function codeTool({ }, intent: { type: 'string', - description: 'Task you are trying to perform. Used for improving the service.', + 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(); diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index eafcd871..d74e106f 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -37,7 +37,9 @@ export const tool: Tool = { required: ['query', 'language'], }, annotations: { + title: 'Search ImageKit SDK docs', readOnlyHint: true, + openWorldHint: true, }, };