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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ src/graphify-out/
__pycache__/
*.egg-info/
dist/

# api-sync operational reports (internal β€” never commit; canonical copy in /var/log/gen-api-sync/)
.api-sync-reports/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gen-mcp-server"
version = "1.0.0"
version = "1.2.0"
description = "DEPRECATED β€” the official GEN MCP is the hosted server at https://mcp.gen.pro (Authorization: Bearer <gen_PAT>). This is the FINAL PyPI release; no further versions will be published."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
23 changes: 16 additions & 7 deletions src/gen_mcp_server/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,22 @@ async def _call(
path: str,
body: Any | None = None,
params: dict[str, Any] | None = None,
extra_headers: dict[str, str] | None = None,
) -> Any:
pat = _resolve_pat()
url = f"{base}{path}"
headers = {
"X-API-Key": pat,
"Content-Type": "application/json",
"X-Client": "gen-mcp-server",
}
if extra_headers:
headers.update(extra_headers)
async with httpx.AsyncClient(timeout=120.0) as http:
res = await http.request(
method,
url,
headers={
"X-API-Key": pat,
"Content-Type": "application/json",
"X-Client": "gen-mcp-server",
},
headers=headers,
params=params,
content=json.dumps(body) if body is not None else None,
)
Expand All @@ -141,9 +145,14 @@ async def _call(
return data


async def api_call(method: str, path: str, body: Any | None = None) -> Any:
async def api_call(
method: str,
path: str,
body: Any | None = None,
extra_headers: dict[str, str] | None = None,
) -> Any:
"""Rails content engine β€” api.gen.pro/v1."""
return await _call(BASE_URL, method, path, body)
return await _call(BASE_URL, method, path, body, extra_headers=extra_headers)


async def form_call(method: str, path: str, form: dict[str, str]) -> Any:
Expand Down
11 changes: 9 additions & 2 deletions src/gen_mcp_server/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# The 5-Step Journey

Every user of GEN β€” human or AI β€” follows the same 5-step arc. This server's
143 tools are organized around it. **Always know which step you're in.**
157 tools are organized around it. **Always know which step you're in.**

```
Step 1 Step 2 Step 3 Step 4 Step 5
Expand Down Expand Up @@ -261,16 +261,19 @@
| Tool | When to use |
|---|---|
| `gen_get_engine` | Read the full engine (columns, rows, cells) before editing. |
| `gen_list_rows_delta` | Poll only the rows that CHANGED since a cursor while watching a busy sheet; `row_ids` + `cursor` drive deletion reconciliation. |
| `gen_update_cell` | Set a cell value directly (text, prompt, etc.). |
| `gen_generate_content` | **Workhorse.** Trigger AI generation for a cell. Returns `generation_id`. |
| `gen_generate_layer` | Trigger AI generation for a specific layer within a video cell. |
| `gen_get_generation` | Poll generation status every 5s until `completed`. |
| `gen_list_cell_jobs` | Fetch one cell's (or one video layer's) generation/job history without pulling the whole row. |
| `gen_stop_generation` | Stop a running generation (refunds credits). |
| `gen_continue_generation` | Resume a stopped generation (re-charges credits). |
| `gen_create_layer` / `gen_update_layer` | Compose video layers inside a cell. |
| `gen_create_row` / `gen_duplicate_row` | Add or duplicate rows for batch production. |
| `gen_create_row` / `gen_duplicate_row` | Add or duplicate rows for batch production. Pass `idempotency_key` so a retried call replays the original result instead of creating a duplicate. |
| `gen_import_asset_from_url` | Import a YouTube/TikTok/Instagram/direct URL as an asset. |
| `gen_create_direct_upload` | Get a pre-signed URL for large file uploads (>50 MB). |
| `gen_transcribe` | Standalone audio/video β†’ text transcript with timestamps. Exactly one of `audio_url`/`video_url`/`content_resource_id`. Billed by duration. |
| `gen_estimate_job` | Check the credit cost BEFORE triggering a paid generation. |

**Generation types and models:**
Expand Down Expand Up @@ -354,6 +357,8 @@
| `gen_list_scheduled_posts` | View the content calendar. |
| `gen_get_post_status` | Poll post status β€” `accepted` β†’ `publishing` β†’ `published` or `failed`. |
| `gen_create_recurring_job` | Set up an automated daily/weekly content job. |
| `gen_preview_recurring_job_prompt` | Parse a recurring-job prompt into the row strategy/actions it implies β€” WITHOUT saving (free, read-only). Check before saving, or diff against existing actions. |
| `gen_draft_test_recurring_job` | Test an UNSAVED recurring job once before committing to save it (configure β†’ Test β†’ Save). Paid-media gated. |

**Render the final video:**

Expand Down Expand Up @@ -426,6 +431,8 @@
The server flags `insufficient_credits: true` when a call fails due to low
balance. Use `gen_get_credit_balance` to check and `gen_buy_credits` to add
more (confirmation-gated). Use `gen_estimate_job` before expensive generations.
`gen_list_subscriptions` shows the user's active plans across their workspaces
(ACTIVE first).

Standard error shape:
```json
Expand Down
Loading