Gleam MCP Server
Connect Claude or Codex to your Gleam site so it can read your campaigns, edit their settings and draw winners for you. It's available on the Hobby Plan & above.
Each token works on one site, and your AI app can do anything the tools below allow on that site, so only create one for an app you trust.
Go to Settings > MCP on your site and click Create MCP Token.
Gleam shows the token once, with the setup steps for each app filled in. Copy it before you close the dialog.
Claude Code: Run this in your terminal:
claude mcp add --transport http gleam-campaigns https://gleam.io/mcp --header "Authorization: Bearer YOUR_MCP_TOKEN"
Codex CLI: Run these in your terminal. Keep the first line in your shell profile (usually ~/.zshrc or ~/.bashrc), because Codex reads the token from your shell every time it starts:
export GLEAM_MCP_TOKEN="YOUR_MCP_TOKEN"
codex mcp add gleam-campaigns --url https://gleam.io/mcp --bearer-token-env-var GLEAM_MCP_TOKEN
Claude app: Open Settings > Connectors > Add custom connector, set Authentication to No sign-in, then fill in:
-
MCP server URL:
https://gleam.io/mcp -
Request header
authorization:Bearer YOUR_MCP_TOKEN
ChatGPT connects custom MCP servers over OAuth, which Gleam doesn't support yet.
The server has seven tools:
- list_campaigns: Lists your Competitions, Rewards or Captures, 25 per page, newest first
- get_campaign: Reads one campaign the way the editor shows it (dates, prize, actions, settings and counts)
- get_campaign_schema: Lists the fields your app can edit
-
update_campaign: Changes a campaign's:
- Name, dates, time zone and language
- Prize details: name, description, images, a YouTube, Vimeo, Wistia or Twitch video, and the prizes themselves
- Widget look: theme, spacing, text alignment, whether the entry title and total entries show, and the landing page's background colour
- Entry settings: login first, contact details, newsletter opt-in, email or phone verification (phone needs Twilio connected), login options and fraud level
- Which countries can enter
- Terms & Conditions fields
- draw_winners: Draws random winners, and can assign prizes, allow the same person to win more than once, or only draw from entries made between two dates
- store_asset: Copies an image or file from another site into Gleam, which is where campaign images have to come from
- get_job: Checks whether an update or a draw has finished (both run in the background)
Your app can't create or delete campaigns, export entries or entrant data, or edit the actions in a campaign. If an update includes a setting your plan doesn't have, Gleam skips that setting.
Each token shows who created it, when, when it was last used and its last four characters. Click Revoke to delete one, and any app using it loses access.