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.
https://gemlead.ai/mcpSetup
- In Claude, open Customize, then Connectors.
- Click Add, then Add custom connector.
- Name it Gemlead and paste
https://gemlead.ai/mcpas the server URL. - Keep Use Claude's published identity as the OAuth client, then click Add.
- 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.
npx @modelcontextprotocol/inspector --cli https://gemlead.ai/mcp \
--transport http \
--header "Authorization: Bearer $GEMLEAD_API_KEY" \
--method tools/listSeveral 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_leads
readscopeLeads with the filters of List leads, like hot leads of one persona found this week.Optionalpersona_idstatusscore_minscore_maxhotscored_afterscored_beforefound_afterfound_beforeorderlimitcursor - get_lead
readscopeOne lead with its profile, score and reason.Requiredlead_id - update_lead
writescopeSets metadata on a lead, or closes it when you are done with it.Requiredlead_idOptionalmetadatastatus - get_lead_origin
readscopeHow Gemlead found a lead, the post that surfaced it and its campaigns.Requiredlead_id - lead_action
writescopeRescores 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_source
writescopeMakes a lead a source of its persona, to read who it follows, its followers or who comments on its posts.Requiredlead_idOptionalmethod - delete_lead
writescopeDeletes a lead and stops it in every campaign. The assistant asks you first.Requiredlead_id
Personas
- list_personas
readscopeYour personas with their counts and today's numbers.Optionallimitcursor - get_persona
readscopeOne persona and its stats.Requiredpersona_id - create_persona
writescopeCreates 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.RequirednamedescriptionOptionalwebsitemarketkeywordscompetitorsavoidmin_followersinclude_closed_inboxesauto_expandauto_expand_directiondaily_scoring_limitsources - get_persona_settings
readscopeEvery setting of a persona, with its keyword searches and competitor accounts.Requiredpersona_id - update_persona
writescopeChanges a persona's settings, or activates or pauses it.Requiredpersona_idOptionalnamewebsitedescriptionmarketkeywordscompetitorsavoidmin_followersinclude_closed_inboxesauto_expandauto_expand_directiondaily_scoring_limitstatus - delete_persona
writescopeDeletes a persona with its sources and the leads no campaign worked on. The assistant asks you first.Requiredpersona_id - reorder_personas
writescopeSets the order of your personas.Requiredpersona_ids - suggest_persona
writescopeAsks the AI to write a persona from a name and what you sell.Requiredpersona_nameOptionalwebsitebriefcurrent_descriptioninstruction - get_persona_suggestion
readscopeThe last persona suggestion,pending,readywith its text, orerror.No arguments - get_persona_sharing
readscopeWhich X accounts of the owner share a persona, and the others it can be shared with.Requiredpersona_id - update_persona_sharing
writescopeSets which other X accounts of the owner share a persona. Owner only.Requiredpersona_idaccount_ids
Sources
- list_sources
readscopeA persona's sources with their stats, or one of them.Requiredpersona_idOptionalsource_idlimitcursorpaused - add_source
writescopeAdds an X account as a source of a persona.Requiredpersona_idusernameOptionalread_followingread_followersscore_self - update_source
writescopeChanges what Gemlead reads on a source, or pauses, resumes, skips, refreshes or scores it.Requiredpersona_idsource_idOptionalread_followingread_followersscore_selfaction - delete_source
writescopeRemoves a source and its leads no campaign worked on. The assistant asks you first.Requiredpersona_idsource_id - list_source_leads
readscopeThe leads a source found, best score first.Requiredpersona_idsource_idOptionalorderlimitcursor - list_persona_items
readscopeA persona's keyword searches or competitor accounts, each with its leads found, scored and hot.Requiredpersona_idkind - edit_persona_items
writescopeAdds or removes keyword searches or competitor accounts on a persona.Requiredpersona_idkindOptionaladdremove - list_item_leads
readscopeThe leads one keyword search or one competitor account found, best score first.Requiredpersona_idOptionalsearch_querycompetitor_accountorderlimitcursor - suggest_sources
readscopeX accounts the AI suggests as sources for a persona.Requiredpersona_id - lookup_x_profile
readscopeReads an X profile live, and with a persona, how good a source it makes.RequiredusernameOptionalpersona
Campaigns
- list_campaigns
readscopeYour campaigns with their totals.Optionalstatuspersona_idlimitcursor - get_campaign_stats
readscopeA campaign's DMs, replies and reply rate over a period, day by day.Requiredcampaign_idOptionalfromto - create_campaign
writescopeCreates a draft campaign from a template or your own flow. Nothing goes out until it starts.Requiredpersona_idnameOptionalmethodmin_scoredaily_limitlead_ordertemplateflow - get_campaign_settings
readscopeA campaign's settings and its flow, every step with its ID.Requiredcampaign_id - update_campaign
writescopeChanges a campaign's settings or replaces its flow.Requiredcampaign_idOptionalnamemethodmin_scoredaily_limitlead_orderflow - set_campaign_status
writescopeStarts, 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_campaign
writescopeCopies a campaign's settings and flow into a new draft.Requiredcampaign_id - delete_campaign
writescopeDeletes a campaign. Its leads and conversations stay, and the assistant asks you first.Requiredcampaign_id - list_campaign_leads
readscopeA campaign's leads by stage, with what it posted for each.Requiredcampaign_idOptionalstagestep_idbranchskippedqlimitcursor - get_campaign_trends
readscopeA campaign's leads started, DMs, replies and follows by day or by hour.Requiredcampaign_idOptionalmetricsrangetimezone - list_campaign_templates
readscopeThe campaign templates with their whole flows.Optionalmethodmarket
Conversations
- list_conversations
readscopeYour conversations, the most recent message first, or only the unread ones if you ask. Withinclude_messageseach one comes with all its messages.Optionalunreadpersona_idinclude_messageslimitcursor - get_conversation
readscopeOne conversation with all its messages.Requiredconversation_id - list_messages
readscopeA conversation's whole history from X, page by page.Requiredconversation_idOptionallimitcursor - view_media
readscopeLets the assistant see an image or a GIF of a message, from theurlin itsmedia.Requiredurl - send_message
writescopeSends 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_idOptionaltextmediareply_to_message_id - react_to_message
writescopeAdds or removes your emoji reaction on a recent message.Requiredconversation_idmessage_idemojiOptionalremove - delete_message
writescopeDeletes a recent message, for you or for both sides. The assistant asks you first.Requiredconversation_idmessage_idOptionalfor_everyone - update_conversation
writescopeMarks a conversation read or unread, moves it to a board column, or pins or unpins it.Requiredconversation_idOptionalreadcolumn_idpinned - delete_conversation
writescopeDeletes a conversation in Gemlead and in your X inbox. The assistant asks you first.Requiredconversation_id - update_conversation_translation
writescopeTurns a conversation's translation on or off, or reads its settings.Requiredconversation_idOptionalenabledshownlanguage - translate_messages
writescopeTranslates a conversation's recent messages into a language.Requiredconversation_idOptionalmessage_idslanguage - list_pipeline_columns
readscopeThe columns of your Conversations board, in order.No arguments - edit_pipeline_columns
writescopeCreates, renames, folds, deletes or reorders the columns of your Conversations board.RequiredactionOptionalcolumn_idnamecollapsedpositioncolumn_ids
Sam AI
- get_sam_settings
readscopeSam 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_settings
writescopeChanges 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.autosends replies from your X account, so the assistant asks you first.Optionalconversation_idpersona_idmodeinstructionsenabled - edit_sam_files
writescopeAdds 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_account
readscopeThe X account the connection belongs to, and its plan.No arguments - get_account_settings
readscopeThe inbox sync, the DM pause, X Chat and the owner's time zone and language.No arguments - update_account_settings
writescopeChanges 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_list
readscopeThe X accounts and domains Gemlead never contacts, on the account or on one persona.Optionalpersona - edit_exclusion_list
writescopeAdds or removes X accounts and domains on the exclusion list of the account or of one persona.Optionaladdremovepersona - get_analytics
readscopeA chart of your Dashboard for the account or a persona, or the latest replies, DMs and hot leads.RequiredmetricOptionalpersonascalestartendtimezone - create_export
readscopeStarts one file of your leads, CSV or JSON Lines, or of every DM conversation with its whole thread, JSON Lines or Markdown.Optionaltypeformatfilters - get_export
readscopeAn export's status, progress and download link.Requiredexport_id - list_exports
readscopeYour exports, newest first, with their status and link.No arguments
Team
- get_team
readscopeThe owner of the X account, its members and invites, with their roles and zones.No arguments - edit_team
writescopeInvites someone by email, changes a member's role or zones, removes a member or cancels an invite, or leaves the team.RequiredactionOptionalemailrolezonesmember_id
Julien AI
- ask_julien_ai
writescopeAsks Julien AI, the Gemlead assistant, about Gemlead and your account's data.chat_idgoes on in a chat. A reply stillrunningafter 25 seconds comes back with its ID, to call again withreply_idonly.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_idorexport_id. Lists page withlimitandcursor, as in Pagination. - A tool that does several things takes an
action, akindor astatus, likelead_actionwithactionset torescore,refresh,followorunfollow. list_campaignstakesstatusas an array ofdraft,active,pausedandarchived.get_campaign_statscounts fromfromup toto, both ISO 8601 times,toby default now andfrom30 days before it.create_exporttakes the filters ofsearch_leadsinfilters, withoutlimitandcursor. Withtypeset toconversations, it exports every DM conversation with its whole thread, andfilterstakespersona_idandunread. It runs on areadkey, as Create an export does.ask_julien_aisendstextto Julien AI, withchat_idto go on in a chat. An answer that takes more than 25 seconds comes backrunningwith itsid. Call the tool again with onlyreply_idset to it, and it waits up to 25 seconds more.get_conversationandlist_messageslist each message's media with aurl.view_mediatakes theurlof an image or a GIF and shows the image itself to the assistant, so it can read a screenshot a lead sent.send_messagesends one withmedia, a public httpsurlor base64datawith itsmime_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
readkey 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.