MCP

MCP server

Ask Claude, ChatGPT or Cursor about your leads in plain words. Gemlead's MCP server gives AI assistants the data and actions of the API, with your permission.

What it is

The Model Context Protocol is the open standard AI assistants use to call outside tools. Connect Gemlead once and your assistant can search your hot leads, read and answer your conversations, check how a campaign does or start an export, right in the chat. It only sees the X account you connect, and the rules of the API apply, Business and Enterprise plans with the same scopes.

The server speaks Streamable HTTP. Claude and ChatGPT sign in with OAuth, Cursor and Claude Code can send an API key as a bearer token.

Server URL
https://gemlead.ai/mcp

Setup

  1. In Claude, open Customize, then Connectors.
  2. Click Add, then Add custom connector.
  3. Name it Gemlead and paste https://gemlead.ai/mcp as the server URL.
  4. Keep Use Claude's published identity as the OAuth client, then click Add.
  5. Click Connect, sign in to Gemlead and pick the X account.

In a chat, turn Gemlead on from the + menu, under Connectors. Claude Desktop and the mobile apps use the same connectors as your Claude account, nothing more to set up.

On Team and Enterprise, an owner adds Gemlead in Organization settings, Connectors, then each member clicks Connect. The Free plan of Claude allows one custom connector.

Other clients

Any client that speaks Streamable HTTP connects the same way, with the URL and an Authorization header. Try the server with the MCP Inspector.

Terminal
npx @modelcontextprotocol/inspector --cli https://gemlead.ai/mcp \
  --transport http \
  --header "Authorization: Bearer $GEMLEAD_API_KEY" \
  --method tools/list

Several X accounts

A connection is for one X account. To work on several at once, add Gemlead once for each account, each with its own server URL, https://gemlead.ai/mcp/ and a name you choose, like https://gemlead.ai/mcp/acme and https://gemlead.ai/mcp/julien. The name is only a label, made of letters, digits, - and _.

Connect each one and pick its X account on Gemlead's consent page. A name that is the account's X username picks it for you. If the accounts are on different Gemlead logins, sign in to the right one before you connect.

Each connection reads and acts on its own account only, and tells the assistant which @handle it is, so a DM always goes out from the account you asked for. Name each connector after its account, like Gemlead Acme, to tell them apart in the chat.

Tools

The server has 67 tools, one for each thing the API does. Read tools only read. Write tools change data or act on X from your account, so they need the write scope, and the assistant asks you before it sends, starts or deletes anything.

Click an endpoint's MCP tag in the API reference to land on its tool.

No tool sets or removes the X Chat passcode, by design, so a passcode never goes through an AI chat. Set it in the app or with Set the X Chat passcode.

Leads

  • search_leadsread scope
    Leads with the filters of List leads, like hot leads of one persona found this week.
    Optionalpersona_idstatusscore_minscore_maxhotscored_afterscored_beforefound_afterfound_beforeorderlimitcursor
  • get_leadread scope
    One lead with its profile, score and reason.
    Requiredlead_id
  • update_leadwrite scope
    Sets metadata on a lead, or closes it when you are done with it.
    Requiredlead_id
    Optionalmetadatastatus
  • get_lead_originread scope
    How Gemlead found a lead, the post that surfaced it and its campaigns.
    Requiredlead_id
  • lead_actionwrite scope
    Rescores a lead for up to 2 credits a lead: 1 for the first pass, 1 more for the deep score when it passes, reads its X profile again, or follows or unfollows it from your X account.
    Requiredlead_idaction
  • convert_lead_to_sourcewrite scope
    Makes a lead a source of its persona, to read who it follows, its followers or who comments on its posts.
    Requiredlead_id
    Optionalmethod
  • delete_leadwrite scope
    Deletes a lead and stops it in every campaign. The assistant asks you first.
    Requiredlead_id

Personas

  • list_personasread scope
    Your personas with their counts and today's numbers.
    Optionallimitcursor
  • get_personaread scope
    One persona and its stats.
    Requiredpersona_id
  • create_personawrite scope
    Creates a persona with its description, keywords, competitors and starting sources. Scoring uses up to 2 credits a lead: 1 for the first pass, 1 more for the deep score when it passes.
    Requirednamedescription
    Optionalwebsitemarketkeywordscompetitorsavoidmin_followersinclude_closed_inboxesauto_expandauto_expand_directiondaily_scoring_limitsources
  • get_persona_settingsread scope
    Every setting of a persona, with its keyword searches and competitor accounts.
    Requiredpersona_id
  • update_personawrite scope
    Changes a persona's settings, or activates or pauses it.
    Requiredpersona_id
    Optionalnamewebsitedescriptionmarketkeywordscompetitorsavoidmin_followersinclude_closed_inboxesauto_expandauto_expand_directiondaily_scoring_limitstatus
  • delete_personawrite scope
    Deletes a persona with its sources and the leads no campaign worked on. The assistant asks you first.
    Requiredpersona_id
  • reorder_personaswrite scope
    Sets the order of your personas.
    Requiredpersona_ids
  • suggest_personawrite scope
    Asks the AI to write a persona from a name and what you sell.
    Requiredpersona_name
    Optionalwebsitebriefcurrent_descriptioninstruction
  • get_persona_suggestionread scope
    The last persona suggestion, pending, ready with its text, or error.
    No arguments
  • get_persona_sharingread scope
    Which X accounts of the owner share a persona, and the others it can be shared with.
    Requiredpersona_id
  • update_persona_sharingwrite scope
    Sets which other X accounts of the owner share a persona. Owner only.
    Requiredpersona_idaccount_ids

Sources

  • list_sourcesread scope
    A persona's sources with their stats, or one of them.
    Requiredpersona_id
    Optionalsource_idlimitcursorpaused
  • add_sourcewrite scope
    Adds an X account as a source of a persona.
    Requiredpersona_idusername
    Optionalread_followingread_followersscore_self
  • update_sourcewrite scope
    Changes what Gemlead reads on a source, or pauses, resumes, skips, refreshes or scores it.
    Requiredpersona_idsource_id
    Optionalread_followingread_followersscore_selfaction
  • delete_sourcewrite scope
    Removes a source and its leads no campaign worked on. The assistant asks you first.
    Requiredpersona_idsource_id
  • list_source_leadsread scope
    The leads a source found, best score first.
    Requiredpersona_idsource_id
    Optionalorderlimitcursor
  • list_persona_itemsread scope
    A persona's keyword searches or competitor accounts, each with its leads found, scored and hot.
    Requiredpersona_idkind
  • edit_persona_itemswrite scope
    Adds or removes keyword searches or competitor accounts on a persona.
    Requiredpersona_idkind
    Optionaladdremove
  • list_item_leadsread scope
    The leads one keyword search or one competitor account found, best score first.
    Requiredpersona_id
    Optionalsearch_querycompetitor_accountorderlimitcursor
  • suggest_sourcesread scope
    X accounts the AI suggests as sources for a persona.
    Requiredpersona_id
  • lookup_x_profileread scope
    Reads an X profile live, and with a persona, how good a source it makes.
    Requiredusername
    Optionalpersona

Campaigns

  • list_campaignsread scope
    Your campaigns with their totals.
    Optionalstatuspersona_idlimitcursor
  • get_campaign_statsread scope
    A campaign's DMs, replies and reply rate over a period, day by day.
    Requiredcampaign_id
    Optionalfromto
  • create_campaignwrite scope
    Creates a draft campaign from a template or your own flow. Nothing goes out until it starts.
    Requiredpersona_idname
    Optionalmethodmin_scoredaily_limitlead_ordertemplateflow
  • get_campaign_settingsread scope
    A campaign's settings and its flow, every step with its ID.
    Requiredcampaign_id
  • update_campaignwrite scope
    Changes a campaign's settings or replaces its flow.
    Requiredcampaign_id
    Optionalnamemethodmin_scoredaily_limitlead_orderflow
  • set_campaign_statuswrite scope
    Starts, pauses or archives a campaign. Starting it sends likes, comments, follows and DMs from your X account, so the assistant asks you first.
    Requiredcampaign_idstatus
  • duplicate_campaignwrite scope
    Copies a campaign's settings and flow into a new draft.
    Requiredcampaign_id
  • delete_campaignwrite scope
    Deletes a campaign. Its leads and conversations stay, and the assistant asks you first.
    Requiredcampaign_id
  • list_campaign_leadsread scope
    A campaign's leads by stage, with what it posted for each.
    Requiredcampaign_id
    Optionalstagestep_idbranchskippedqlimitcursor
  • list_campaign_templatesread scope
    The campaign templates with their whole flows.
    Optionalmethodmarket

Conversations

  • list_conversationsread scope
    Your conversations, the most recent message first, or only the unread ones if you ask. With include_messages each one comes with all its messages.
    Optionalunreadpersona_idinclude_messageslimitcursor
  • get_conversationread scope
    One conversation with all its messages.
    Requiredconversation_id
  • list_messagesread scope
    A conversation's whole history from X, page by page.
    Requiredconversation_id
    Optionallimitcursor
  • view_mediaread scope
    Lets the assistant see an image or a GIF of a message, from the url in its media.
    Requiredurl
  • send_messagewrite scope
    Sends a DM from your X account to the lead, with text, an image, a GIF, a video or a voice note. The assistant shows you the text first.
    Requiredconversation_id
    Optionaltextmediareply_to_message_id
  • react_to_messagewrite scope
    Adds or removes your emoji reaction on a recent message.
    Requiredconversation_idmessage_idemoji
    Optionalremove
  • delete_messagewrite scope
    Deletes a recent message, for you or for both sides. The assistant asks you first.
    Requiredconversation_idmessage_id
    Optionalfor_everyone
  • update_conversationwrite scope
    Marks a conversation read or unread, moves it to a board column, or pins or unpins it.
    Requiredconversation_id
    Optionalreadcolumn_idpinned
  • delete_conversationwrite scope
    Deletes a conversation in Gemlead and in your X inbox. The assistant asks you first.
    Requiredconversation_id
  • update_conversation_translationwrite scope
    Turns a conversation's translation on or off, or reads its settings.
    Requiredconversation_id
    Optionalenabledshownlanguage
  • translate_messageswrite scope
    Translates a conversation's recent messages into a language.
    Requiredconversation_id
    Optionalmessage_idslanguage
  • list_pipeline_columnsread scope
    The columns of your Conversations board, in order.
    No arguments
  • edit_pipeline_columnswrite scope
    Creates, renames, folds, deletes or reorders the columns of your Conversations board.
    Requiredaction
    Optionalcolumn_idnamecollapsedpositioncolumn_ids

Sam AI

  • get_sam_settingsread scope
    Sam AI's mode, instructions and files on the X account, a persona or a conversation. On a conversation, also the mode that runs, what Sam AI is doing and the reply it has ready.
    Optionalconversation_idpersona_id
  • update_sam_settingswrite scope
    Changes Sam AI's mode or instructions on a persona or a conversation, or turns it on or off and sets your business info on the X account. auto sends replies from your X account, so the assistant asks you first.
    Optionalconversation_idpersona_idmodeinstructionsenabled
  • edit_sam_fileswrite scope
    Adds files from a URL or removes files Sam AI reads, on the X account, a persona or a conversation. The assistant asks you before it removes one.
    Optionalconversation_idpersona_idaddremove

Account and more

  • get_accountread scope
    The X account the connection belongs to, and its plan.
    No arguments
  • get_account_settingsread scope
    The inbox sync, the DM pause, X Chat and the owner's time zone and language.
    No arguments
  • update_account_settingswrite scope
    Changes the inbox sync or the owner's time zone, language or name, or reads the X profile again.
    Optionalsync_all_conversationstimezonelanguagefirst_namelast_nameinbox_syncrefresh_x_profile
  • get_exclusion_listread scope
    The X accounts and domains Gemlead never contacts, on the account or on one persona.
    Optionalpersona
  • edit_exclusion_listwrite scope
    Adds or removes X accounts and domains on the exclusion list of the account or of one persona.
    Optionaladdremovepersona
  • get_analyticsread scope
    A chart of your Dashboard for the account or a persona, or the latest replies, DMs and hot leads.
    Requiredmetric
    Optionalpersonascalestartendtimezone
  • create_exportread scope
    Starts one file of your leads, CSV or JSON Lines, or of every DM conversation with its whole thread, JSON Lines or Markdown.
    Optionaltypeformatfilters
  • get_exportread scope
    An export's status, progress and download link.
    Requiredexport_id
  • list_exportsread scope
    Your exports, newest first, with their status and link.
    No arguments

Team

  • get_teamread scope
    The owner of the X account, its members and invites, with their roles and zones.
    No arguments
  • edit_teamwrite scope
    Invites someone by email, changes a member's role or zones, removes a member or cancels an invite, or leaves the team.
    Requiredaction
    Optionalemailrolezonesmember_id

Julien AI

  • ask_julien_aiwrite scope
    Asks Julien AI, the Gemlead assistant, about Gemlead and your account's data. chat_id goes on in a chat. A reply still running after 25 seconds comes back with its ID, to call again with reply_id only.
    Optionaltextchat_idreply_id

Arguments and results

  • A tool takes the parameters of its endpoint, with IDs named after their object, like lead_id, persona_id, campaign_id, conversation_id or export_id. Lists page with limit and cursor, as in Pagination.
  • A tool that does several things takes an action, a kind or a status, like lead_action with action set to rescore, refresh, follow or unfollow.
  • list_campaigns takes status as an array of draft, active, paused and archived. get_campaign_stats counts from from up to to, both ISO 8601 times, to by default now and from 30 days before it.
  • create_export takes the filters of search_leads in filters, without limit and cursor. With type set to conversations, it exports every DM conversation with its whole thread, and filters takes persona_id and unread. It runs on a read key, as Create an export does.
  • ask_julien_ai sends text to Julien AI, with chat_id to go on in a chat. An answer that takes more than 25 seconds comes back running with its id. Call the tool again with only reply_id set to it, and it waits up to 25 seconds more.
  • get_conversation and list_messages list each message's media with a url. view_media takes the url of an image or a GIF and shows the image itself to the assistant, so it can read a screenshot a lead sent. send_message sends one with media, a public https url or base64 data with its mime_type.
  • A wrong argument comes back as a tool error that names it. An API error comes back as a tool error with its code and the argument it is about.

Each tool answers with the JSON of its endpoint, as structured content and as text. The tools publish no output schema, the API reference describes every object.

On the Free and Starter plans the server installs and lists its tools, and each call answers with a plan_required error the assistant can explain. Tool calls count toward the key's 120 requests a minute, shared with the REST API.

Example prompts

  • Show me today's hot leads for my Tipsters persona, with the reason each one scored high.
  • Which campaign had the best reply rate over the last 30 days, and how many DMs did it send?
  • List my unread conversations and summarize what each lead is asking for.
  • Export every hot lead found this week to CSV and give me the link.
  • Export all my DM conversations, then tell me which openers get the most replies and how leads answer the price.
  • Mark the lead @jane_builds as closed and save her HubSpot ID hs_48213 in its metadata.
  • Put Sam AI on Semi-auto for my Tipsters persona and add our pricing PDF to what it reads.

Security

  • The assistant only sees the X account you connected.
  • Revoke a connection or a key in the app, under API, at any time.
  • Give a read key to an assistant that only needs to read.
  • Assistants can be tricked by text they read. Check what a write tool is about to do before you allow it.