# Glif MCP Glif is a creative agent platform. Describe what you want to make, and Glif chooses the models and does the work across image, video, and audio. Each `compose_project` call creates or continues a saved project. ## Connect Endpoint: `https://glif.app/api/mcp` The endpoint uses JSON-RPC 2.0 over stateless Streamable HTTP. Every authenticated client receives the same public tool set. ## Project, job and media IDs - A project keeps messages, media and agent settings across calls. Results return `projectId`; tool inputs use `project_id`. - A job is one `compose_project` run. Results return `jobId`; `get_job_status` takes it as `job_id`. - Media has an `assetId`, distinct from its file URL. Owned media goes in `compose_project.asset_ids`. External URLs and signed upload URLs go in `compose_project.attachments`. ## Use the tools - `compose_project` starts or continues a project from a natural-language prompt. The optional `intelligence` value selects `lite`, `smart` or `genius`. Without a tier, new projects use your preferred model and existing ones keep theirs. - `get_job_status` returns saved public messages and media during a job. Pass `progressCursor` as `progress_cursor` on the next call. - `get_project` reads current project state, recent messages and media. - `list_projects` lists the authenticated user's recent projects. - `view_media` reopens saved media in the Glif card on clients that show one. It generates nothing. - `select_project_images` picks saved images from one of your projects and returns their asset IDs for `compose_project.asset_ids`. It never starts generation. - Share returned media as plain links. Some hosts, including ChatGPT, show Markdown image embeds of these URLs as broken placeholders; hosts with the Glif card show the media there. - `upload_file` uploads supported media or creates a signed direct upload for a local file. - Pass an inline upload's `assetId` in `asset_ids`. Pass a signed upload's `fileUrl` in `attachments` after sending the bytes. External media URLs also go in `attachments`. - `list_user_skills` and `get_user_skill` read the authenticated user's personal Glif skills. - `whoami` returns identity, the API key or connected app label, plan, credit balance, recent spend and the default agent tier. - `read_settings` and `update_settings` read or change the account's default agent tier for new projects. Runtime `tools/list` output is the source of truth for schemas. ## Describe what you want to make Glif chooses the media models and tools for your prompt. One prompt can describe a series of scenes or a multi-step project. Once a file is uploaded, pass its `assetId` in `asset_ids`, or a signed upload's URL in `attachments`. ## Complete a project run 1. Start a run with `compose_project`. 2. Share `projectUrl`. Follow `get_job_status` with `job_id` while working. Pass each returned `progressCursor` as `progress_cursor` on the next call. 3. Show new saved text and media before the job finishes. Track message IDs and asset IDs to avoid repeating output. 4. Report the completed result or failure. End early only if the user requested background work. If polling cannot continue, explain that limit and share the project link. Do not promise an automatic chat update. 5. Continue the work by passing the returned `projectId` as `project_id` to `compose_project`. Status calls wait up to 15 seconds by default, or an integer `wait_seconds` from 0 to 30. Zero returns at once. They return early for changed saved public output or job-state changes, not individual model tokens. `compose_project` costs credits and starts as soon as it is called. Glif shows no confirmation form, so get the user's go-ahead first. There is no approval step once a run is working. While a job is working, a call with the same `project_id` returns an error, and a call without one starts a separate billable job in a new project. Neither speeds up the current job. Finished job records expire after about 30 minutes. Saved project media remains available through `get_project`. ## Read the result A completed result can contain: - text content blocks, including the media URLs - `structuredContent.media`, containing each generated file's `assetId`, URL, title and media kind; only outputs from this job appear in this gallery - a JSON continuity block such as `{ "project_id": "...", "job_id": "..." }` - `_meta.glif` details about status, the project, the job and billing Some clients render returned media inline; others show links. Keep polling the same job to report its final result. Polling does not send an automatic chat reply. ## Plans and credits - Generations and agent messages cost credits. Credits come with a subscription: `https://glif.app/pricing`. - Credit packs are one-time top-ups for subscribers only: `https://glif.app/pricing/credit-packs`. - Subscription credits expire at the end of each billing period. Pack credits expire six months after purchase. - New accounts get a one-time signup bonus. There are no daily free credits. - `whoami` returns the current plan and credit balance. ## Authenticate MCP clients use OAuth 2.1 with PKCE. A 401 response includes the protected-resource metadata needed to start browser authorization. Plain HTTP clients can use a `glif_v1_...` API key in the bearer authorization header. Keys are created at `https://glif.app/settings/api-tokens`. ## Example Pass this object as the `params` of a JSON-RPC `tools/call` request: ~~~json { "name": "compose_project", "arguments": { "prompt": "A moody noir portrait of a sloth detective", "intelligence": "smart" } } ~~~ Pass the returned `jobId` to `get_job_status` as `job_id`. To continue the project later, pass the returned `projectId` to `compose_project` as `project_id`. ## Make Glif-branded work For Glif colors, typography, logos, voice, and illustration style, read [the brand guide](https://glif.app/brand) or its [agent-readable Markdown](https://glif.app/brand.md) before creating branded work. These rules apply to Glif’s identity, not to every style people create with Glif. ## Find more detail - Worked examples: `https://glif.app/chat/cards` lists ready-made prompts with their finished output, and each card page shows the prompt behind it. - MCP resource: `glif://capabilities` - HTTP overview and OpenAPI links: `https://glif.app/api`