← Back to docs

MCP setup

Give an agent access to the editorial workflow without giving it your dashboard session.

1. Choose how to connect

Codex and ChatGPT can sign in with Jamwidgets, so access follows your workspace role and can be disconnected later. For Claude Code, other clients and unattended scripts, open Settings → Connections and create a scoped management key.

WorkflowScopes
Reviewsites:read, inbox:read, posts:read, queue:read
DraftReview scopes + posts:write
PublishDraft scopes + posts:publish
Moderateinbox:read, inbox:write
Background workqueue:read to list and inspect tasks; queue:write to retry, cancel or start them
Galleriesgalleries:read, galleries:write, plus galleries:publish to make one public
Site setupsites:read to list sites, forms, polls and announcements; sites:write to create sites, create or change forms, polls and announcements, and update site settings
Site administrationsites:admin to change deploy hooks and delete sites. Only org owners can grant it.

Publishing is separate from writing because it makes content public and can trigger a site deploy. OAuth never grants sites:admin or full_access. Only org owners can give a management key either one; avoid full_access unless the script genuinely needs every current and future scope.

Who can create keys

Org admins and owners create management keys. Keys belong to the org, not to the person who made them, so they keep working when that person leaves. Settings → Connections flags any key whose creator has left so you can rotate it. Use a separate key for each integration, so you can rotate or revoke one without breaking the others.

2. Connect your client

Sign in with Jamwidgets

For Codex CLI:

codex mcp add jamwidgets \
  --url https://jamwidgets.com/api/manage/mcp
codex mcp login jamwidgets

The login command opens Jamwidgets in your browser, where you choose a workspace and approve the requested permissions. Revoke the connection any time from Settings → Connections. Sign-in works with Codex and ChatGPT today; other clients, including Claude Code, use a management key.

Use a management key

Use a management key for Claude Code and other clients, and wherever a browser sign-in can't complete: on a server, in CI or over SSH. Put it in an environment variable from your password manager or secret store, never in the MCP configuration itself.

Codex CLI reads the variable each time it connects:

export JAMWIDGETS_KEY=<management-key>
codex mcp add jamwidgets \
  --url https://jamwidgets.com/api/manage/mcp \
  --bearer-token-env-var JAMWIDGETS_KEY

Claude Code expands the variable in a project .mcp.json:

{
  "mcpServers": {
    "jamwidgets": {
      "type": "http",
      "url": "https://jamwidgets.com/api/manage/mcp",
      "headers": { "Authorization": "Bearer ${JAMWIDGETS_KEY}" }
    }
  }
}

Any other MCP client works the same way: send Authorization: Bearer <management-key> to the endpoint. Delete the key from Settings → Connections to cut off access.

Editorial workflow

  1. Call list_sites. Post tools require a site ID; queue tools cover the whole workspace and take none.
  2. Use list_inbox for work needing attention, or list_posts with needs_review.
  3. Create or update drafts with create_post and update_post.
  4. Review the title, body, excerpt, tags, and provenance before granting a publish action.
  5. Use publish_post for a new draft, republish_post for pending edits to a live post, or schedule_post with a future RFC 3339 timestamp.
  6. Inspect list_queue_tasks to see the deploy and notification work triggered by publication.

Background work

  • list_queue_tasks and get_queue_task show deploys, notification emails and other background tasks, filtered by state: pending, in_progress, succeeded, cancelled or failed. They need queue:read.
  • retry_queue_task runs a failed or cancelled task again, for example a deploy after you fix its hook or token. A deploy the host rejects outright, because the hook was deleted or the token revoked, fails at once instead of retrying.
  • cancel_queue_task stops a pending task before it runs.
  • enqueue_task starts a workspace sweep now instead of waiting for its schedule: publish_scheduled_posts publishes posts whose time has come, and process_pending_notifications sends post emails that were held for a deploy callback and have waited long enough.
  • Retry, cancel and enqueue need queue:write.

Gallery workflow

  1. Call prepare_gallery_photo_upload with the file's name, type and size in bytes. Photos are still JPEG, PNG or WebP, up to 25 MB.
  2. PUT the file to the returned url with the returned headers within 5 minutes, for example curl -T photo.jpg -H "Content-Type: image/jpeg" "$url". The photo never passes through the conversation.
  3. Call finalize_gallery_photo_upload with the uploadId, then update_gallery_photo to set alt text, a caption and tags. It replaces all of them, so send every value you want to keep.
  4. Create the gallery with create_gallery and the photo IDs, and make it public with publish_gallery once the photos finish processing.

Site setup

  • create_form and list_forms: forms that widgets submit to by slug. list_forms returns up to 100 at a time, newest first; pass the last ID as after for the next page.
  • create_poll takes a question and two or more option texts; update_poll with is_active: false closes it, and delete_poll removes it with its votes.
  • create_announcement, update_announcement and delete_announcement manage the site-wide banner: info, success, warning or error, with optional start and end times.
  • update_site changes the name, URL, allowed origins or subscriber email mode. Only the fields you send change, in one step; deploy settings and the site key are never touched. An empty site_url clears it, and an empty allowed_origins allows every origin.

Static-site publishing

Publishing updates Jamwidgets immediately. A statically generated site also needs a deploy connection in its site settings so the new post is included in a fresh build. Queue success means Jamwidgets handed off the deploy; use your hosting or repository checks to confirm the build reached production.