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
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image with the appropriate version
FROM node:18-alpine AS builder

# Set the working directory
WORKDIR /app

# Install pnpm
RUN npm install -g pnpm

# Copy the pnpm lockfile and package.json to the container
COPY pnpm-lock.yaml ./
COPY package.json ./

# Install the dependencies
RUN pnpm install

# Copy the rest of the application
COPY . .

# Build the application
RUN pnpm build

# Use a minimal Node.js runtime image for production
FROM node:18-alpine AS runtime

# Set the working directory
WORKDIR /app

# Copy the built files from the builder stage
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/package.json /app/package.json

# Environment variable for OpenAI API Key
ENV OPENAI_API_KEY=your-api-key-here

# Run the server
ENTRYPOINT ["node", "dist/index.js"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MCP OpenAI Server

[![smithery badge](https://smithery.ai/badge/@mzxrai/mcp-openai)](https://smithery.ai/server/@mzxrai/mcp-openai)

A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.

## Features
Expand All @@ -21,6 +23,14 @@ A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's mode

## Installation

### Installing via Smithery

To install OpenAI Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@mzxrai/mcp-openai):

```bash
npx -y @smithery/cli install @mzxrai/mcp-openai --client claude
```

First, make sure you've got the [Claude Desktop app](https://claude.ai/download) installed and you've requested an [OpenAI API key](https://platform.openai.com/api-keys).

Add this entry to your `claude_desktop_config.json` (on Mac, you'll find it at `~/Library/Application\ Support/Claude/claude_desktop_config.json`):
Expand Down
17 changes: 17 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- openaiApiKey
properties:
openaiApiKey:
type: string
description: The API key for the OpenAI server.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
(config) => ({ command: 'node', args: ['dist/index.js'], env: { OPENAI_API_KEY: config.openaiApiKey } })