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
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
# Builder stage
FROM node:lts-alpine AS builder
WORKDIR /app

# Copy package files
COPY package.json package-lock.json ./

# Copy source code
COPY src ./src

# Install dependencies and build
RUN npm ci --ignore-scripts && npm run build

# Runtime stage
FROM node:lts-alpine
WORKDIR /app
ENV NODE_ENV=production

# Copy build artifacts
COPY --from=builder /app/build ./build

# Copy production dependencies
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts

# Entrypoint for MCP
ENTRYPOINT ["node", "build/index.js"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<a href="https://github.com/CLOUDWERX-DEV/gpt-image-1-mcp/blob/main/LICENSE"><img src="https://img.shields.io/github/license/CLOUDWERX-DEV/gpt-image-1-mcp.svg" alt="license"></a>
<a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/@cloudwerxlab/gpt-image-1-mcp.svg" alt="node version"></a>
<a href="https://cloudwerx.dev"><img src="https://img.shields.io/badge/website-cloudwerx.dev-blue" alt="Website"></a>
<a href="https://smithery.ai/server/@cloudwerxlab/gpt-image-1-mcp"><img src="https://smithery.ai/badge/@cloudwerxlab/gpt-image-1-mcp" alt="Smithery Installs"></a>
</p>

<p align="center">
Expand Down Expand Up @@ -335,6 +336,14 @@ npx -y @cloudwerxlab/gpt-image-1-mcp

## Installation & Usage

### Installing via Smithery

To install gpt-image-1-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@cloudwerxlab/gpt-image-1-mcp):

```bash
npx -y @smithery/cli install @cloudwerxlab/gpt-image-1-mcp --client claude
```

### NPM Package

This package is available on npm: [@cloudwerxlab/gpt-image-1-mcp](https://www.npmjs.com/package/@cloudwerxlab/gpt-image-1-mcp)
Expand Down
30 changes: 30 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Smithery configuration file: https://smithery.ai/docs/build/project-config

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- openAiApiKey
properties:
openAiApiKey:
type: string
description: OpenAI API key with access to gpt-image-1
gptImageOutputDir:
type: string
description: Optional directory for saving generated images
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => ({
command: 'node',
args: ['build/index.js'],
env: {
OPENAI_API_KEY: config.openAiApiKey,
...(config.gptImageOutputDir ? { GPT_IMAGE_OUTPUT_DIR: config.gptImageOutputDir } : {})
}
})
exampleConfig:
openAiApiKey: sk-your-openai-api-key
gptImageOutputDir: /path/to/generated-images