@fre4x/openai 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +62 -0
  2. package/dist/index.js +44075 -0
  3. package/package.json +27 -0
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # openai — Multimodal Reasoning Bridge
2
+
3
+ > *Vision, imagination, and perception. The intelligence of OpenAI, delivered through the Model Context Protocol.*
4
+
5
+ Part of **[FRE4X-B1TE](../)** — a monorepo of MCP servers built for autonomous agents.
6
+
7
+ This B1TE bridges your agent directly to OpenAI's advanced models — enabling it to see with GPT-4o, imagine with DALL-E 3, and hear with Whisper.
8
+
9
+ ## Tools
10
+
11
+ | Tool | Capability |
12
+ |------|-----------|
13
+ | `openai_analyze_media` | Analyze an image from a `file://` or `http(s)://` URL. Prompt is optional. |
14
+ | `openai_list_models` | List available OpenAI models with pagination. |
15
+ | `openai_generate_image` | Image synthesis via DALL-E 3. Optionally save to `output_dir`. |
16
+ | `openai_transcribe_audio` | Transcribe local audio files using Whisper (`whisper-1`). |
17
+ | `openai_generate_speech` | Generate speech audio from text and optionally save it locally. |
18
+
19
+ ## Setup
20
+
21
+ ### Environment Variables
22
+
23
+ - `OPENAI_API_KEY`: Your OpenAI API key.
24
+ - `MOCK`: Set to `true` to use mock data instead of real API calls.
25
+
26
+ ### Claude Desktop Configuration
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "openai": {
32
+ "command": "npx",
33
+ "args": ["-y", "@fre4x/openai"],
34
+ "env": {
35
+ "OPENAI_API_KEY": "your-key-here"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Features
43
+
44
+ - **Protocol Compliance**: Implements the split `content` (Markdown) and `structuredContent` (Raw Data) model for high-fidelity agent interaction.
45
+ - **Strict Validation**: All tools utilize `outputSchema` for reliable data parsing and reduced hallucinations.
46
+ - **Privacy & Security**: Aggressively masks implementation details (HTTP codes, library names) in error messages.
47
+ - **Token Efficiency**: Mandatory pagination for model listing.
48
+ - **Vision Input Contract**: `openai_analyze_media` accepts only `file://` and `http(s)://` URLs. `data:` URLs are rejected at validation time.
49
+
50
+ ## Development
51
+
52
+ ```bash
53
+ npm install
54
+ npm run build
55
+ npm run typecheck
56
+ npm test
57
+ MOCK=true npm run inspector
58
+ ```
59
+
60
+ ## License
61
+
62
+ MIT — **WE ARE THE FRE4X.**