codex-xai-oauth 0.1.0 → 0.2.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-xai-oauth",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Use xAI/Grok OAuth or API-key credentials from Codex through local MCP tools.",
5
5
  "author": {
6
6
  "name": "ilseoblee"
@@ -13,15 +13,16 @@
13
13
  "mcpServers": "./.mcp.json",
14
14
  "interface": {
15
15
  "displayName": "xAI Grok OAuth",
16
- "shortDescription": "Generate with Grok, including images, from Codex.",
17
- "longDescription": "Adds local Codex MCP tools for xAI/Grok text, web search, X search, image generation, TTS, video generation, and credential status using OAuth or XAI_API_KEY.",
16
+ "shortDescription": "Generate with Grok, including artifact-backed images, from Codex.",
17
+ "longDescription": "Adds local Codex MCP tools for xAI/Grok text, web search, X search, artifact-backed image generation, TTS, video generation, and credential status using OAuth or XAI_API_KEY.",
18
18
  "developerName": "ilseoblee",
19
19
  "category": "Productivity",
20
20
  "capabilities": ["MCP", "Local tools", "Image generation"],
21
21
  "defaultPrompt": [
22
- "Generate an image with xAI.",
22
+ "Use xai_image_generate with artifact_dir to generate an image and save local artifacts.",
23
23
  "Check my xAI credential status.",
24
- "Search the web with Grok."
24
+ "Search the web with Grok.",
25
+ "Call the OpenAI-compatible /v1/images/generations proxy with n, resolution, size, and response_format."
25
26
  ],
26
27
  "brandColor": "#111111"
27
28
  }
package/README.md CHANGED
@@ -13,7 +13,7 @@ Codex plugin that exposes xAI/Grok tools through a local stdio MCP server. It is
13
13
  - `xai_tts`
14
14
  - `xai_video_generate`
15
15
 
16
- `xai_image_generate` calls xAI `/images/generations`. Default model is `grok-imagine-image`, default response format is `url`, and `resolution` supports `1k` or `2k`.
16
+ `xai_image_generate` calls xAI `/images/generations`. Default model is `grok-imagine-image`, default response format is `url`, and `resolution` supports `1k` or `2k`. Pass `artifact_dir` to save returned URL or `b64_json` images locally and include artifact metadata in the tool result.
17
17
 
18
18
  ## Unofficial / Use At Your Own Risk
19
19
 
@@ -81,6 +81,18 @@ Status:
81
81
  npx codex-xai-oauth status
82
82
  ```
83
83
 
84
+ Generate an image directly from the NPX CLI:
85
+
86
+ ```bash
87
+ npx codex-xai-oauth image --prompt "minimal blue dot icon" --resolution 2k
88
+ ```
89
+
90
+ Save generated image payloads to local artifacts:
91
+
92
+ ```bash
93
+ npx codex-xai-oauth image --prompt "minimal blue dot icon" --response-format b64_json --artifact-dir .codex-xai-artifacts
94
+ ```
95
+
84
96
  OAuth credentials are stored at:
85
97
 
86
98
  ```text
@@ -121,6 +133,8 @@ The proxy exposes:
121
133
  - `/v1/responses`
122
134
  - `/v1/images/generations`
123
135
 
136
+ `/v1/images/generations` and `/images/generations` forward `prompt`, `model`, `n`, `size`, `resolution`, and `response_format`. Invalid `n`, `resolution`, or `response_format` values return a 400 response before any upstream xAI call.
137
+
124
138
  ## Codex Plugin Surface
125
139
 
126
140
  - `.codex-plugin/plugin.json` declares the plugin metadata, skill bundle, and MCP config.