# OpenAI MCP

> OpenAI MCP connects your AI client to the full suite of OpenAI tools, letting your agent perform advanced tasks like generating images (DALL-E 3), structuring complex data into reliable JSON, or converting text into searchable embeddings. It's a single connection that lets your workflow handle everything from creative media assets to deep content moderation and model fine-tuning.

## Overview
- **Category:** superpower
- **Price:** Free
- **Tags:** llm, generative-ai, embeddings, content-moderation, fine-tuning, image-generation, structured-output

## Description

Your AI agent can now access the core capabilities of OpenAI models directly through this MCP. Instead of needing multiple specialized APIs, you get a unified set of tools for handling complex data pipelines. You can ask your agent to generate responses using various GPT models; it can also create entirely new images from simple text prompts using DALL-E 3. For advanced data work, the connection handles converting raw text into vector embeddings, making semantic search reliable and fast. Need your output in a predictable format? The structured output tool ensures the response is perfect JSON every time. Plus, you can check content for policy violations or even run custom model training jobs. Because this entire catalog lives on Vinkius, connecting here gives your agent access to all these operations without switching services.

## Tools

### create_fine_tune
This tool initiates a specialized training job using your uploaded data file ID to customize model behavior.

### list_fine_tunes
You can check the status and list all existing fine-tuning jobs you've started.

### chat_completion
Generate conversational text responses by specifying a model like gpt-4o or gpt-4o-mini.

### structured_output
Force the AI to generate output that strictly follows a defined JSON schema from your prompt.

### list_models
Retrieves a list of all available OpenAI models you can use in your prompts.

### create_embedding
Converts any piece of text into a dense numerical vector representation for indexing.

### generate_image
Creates an image file and returns its direct URL based on your descriptive prompt using DALL-E 3.

### list_files
Retrieves a list of files previously uploaded to the OpenAI system for training or reference.

### moderate_content
Checks provided text against policy guidelines and returns a violation score for multiple categories.

### list_assistants
Lists any configured OpenAI assistants that your agent can interact with or manage.

## Prompt Examples

**Prompt:** 
```
Ask GPT-4o to summarize this document in 3 bullet points.
```

**Response:** 
```
Here's the GPT-4o summary:

• **Revenue grew 23%** YoY driven by enterprise contracts
• **Operating costs decreased** 8% through automation initiatives
• **Customer retention** reached 94%, highest in company history
```

**Prompt:** 
```
Generate an image of a futuristic cityscape at sunset.
```

**Response:** 
```
🎨 Image generated!

- **URL**: https://oaidalleapiprodscus.blob.core.windows.net/...
- **Size**: 1024x1024
- **Revised prompt**: A breathtaking futuristic cityscape...
```

**Prompt:** 
```
Check if this text violates content policies.
```

**Response:** 
```
✅ Content analysis complete:

| Category | Flagged | Score |
|----------|---------|-------|
| Hate | No | 0.001 |
| Violence | No | 0.002 |
| Sexual | No | 0.000 |
| Self-harm | No | 0.000 |

No policy violations detected.
```

## Capabilities

### Generate complex text and structured data
Your AI client can generate natural language responses using models like GPT-4o or force the output into a precise, predictable JSON format.

### Create media from descriptions
The system uses DALL-E 3 to produce images based solely on text prompts.

### Index and search unstructured text
It converts large amounts of raw text into vector embeddings, allowing your agent to perform semantic searches across massive knowledge bases.

### Monitor content policy compliance
The MCP checks any given piece of text against known policies for violations like hate speech or violence.

### Build custom, specialized models
You can manage and run fine-tuning jobs to create highly customized versions of the base models.

## Use Cases

### Drafting a marketing campaign with assets
A marketer asks their agent to draft three social media posts. The agent uses `chat_completion` for the copy and then calls `generate_image` three times, returning both text and associated visual URLs in one response.

### Building a corporate knowledge search bot
An engineer uploads hundreds of PDF reports. The agent uses `create_embedding` to turn these PDFs into vectors. Later, when asked a question, the agent searches these vectors and summarizes the answer using `chat_completion`.

### Pre-flight content review pipeline
A technical writer pastes a draft article. The agent first runs `moderate_content` to check for compliance, then uses `structured_output` to pull out key talking points into a structured report.

### Creating a niche customer service bot
A product team trains a model using the `create_fine_tune` tool on 10k support tickets. The resulting custom assistant can then answer specific, highly technical questions via `list_assistants`.

## Benefits

- Structured output ensures your agent never gives you messy text. You get reliable JSON data every time, perfect for feeding into databases or subsequent code blocks.
- Need to search a huge internal document library? Running the `create_embedding` tool turns raw text into searchable vectors, making semantic searches possible—you find meaning, not just keywords.
- Stop juggling asset tools. If you need an accompanying graphic for your content, the agent can run the `generate_image` tool right after writing the summary, giving you a complete package instantly.
- Content compliance is key. Before publishing anything, use `moderate_content` to automatically check all text against policy guidelines and catch violations before they go live.
- You're building specialized agents? The MCP handles fine-tuning jobs (`create_fine_tune`), letting you train custom models on proprietary data without leaving your primary workflow.

## How It Works

The bottom line is your agent handles entire workflows—like drafting an article and generating accompanying graphics—in one conversation thread.

1. Your AI agent sends a request describing the required action—for example, 'Summarize this document and provide an image for it.'
2. The MCP routes that request to the appropriate tool, running both text generation and image creation in sequence.
3. You get back a single, cohesive result set: structured summary text alongside a direct URL link to the generated image.

## Frequently Asked Questions

**How does the OpenAI MCP handle images?**
You use the `generate_image` tool to create pictures using DALL-E 3. You simply provide a text description, and it returns a direct URL for the generated asset.

**Is the content moderation tool reliable?**
The `moderate_content` tool checks text against established policies for violations like hate speech or violence, giving you scores and clear flags on compliance status.

**Can I train a custom model with this MCP?**
Yes. You manage the process using `create_fine_tune` to upload data and start training jobs, and then check progress via `list_fine_tunes`.

**Does the OpenAI MCP support multiple AI models?**
The chat completion tool allows you to specify various models, such as gpt-4o or gpt-4o-mini, letting you pick the right model for the job.