Skip to main content

MCP & AI agents

Lantfly runs a Model Context Protocol (MCP) server. Add its address to an AI app and the app's assistant can use Lantfly for you: find and run scrapers, read their results, follow runs, and work with your social listening projects.

MCP server address
https://lantfly.com/mcp

What an AI can do​

AreaExamples
ActorsSearch the Store and your own actors, read an actor's README and input schema, run it with an input and get the first results.
Runs and resultsList recent runs, wait for a run to finish, read its log, abort it, page through its dataset, read OUTPUT and other key-value records.
Social listening: readList projects, search mentions by words, platform, sentiment, intent and date, read dashboards, hashtag trends, topics, peaks, influencers, creators, campaigns, leads and reports.
Social listening: actLabel up to 200 mentions at a time (sentiment, intent, attributes, relevant or not), work the verify queue, save an aggregate audience estimate, and, as a project manager, change keywords, sources, campaigns, alerts and reports.

Every tool does only what you may do yourself. A read-only connection only reads, a token without a permission doesn't see that permission's tools, and on a listening project viewers read, analysts label and verify, and managers change settings. See Permissions and the tool reference.

Runs cost money

Runs an AI starts are billed to the account it acts for, exactly like runs you start in the Console. Connect read-only if you only want the AI to look, and use plan limits or a spending limit to cap costs.

Transport​

  • Streamable HTTP, protocol revision 2025-06-18. Clients on 2025-03-26 and 2024-11-05 also work.
  • Each POST carries one JSON-RPC 2.0 message, or a batch of up to 10, and gets a plain JSON answer. There is no server-to-client stream and no session: GET and DELETE answer 405, and no Mcp-Session-Id is issued.
  • Methods: initialize, ping, tools/list, tools/call.
  • https://lantfly.com/api/v3/mcp is the same server, kept for clients set up with that address.

Authentication​

Pick one:

OptionBest forHow
OAuth 2.1 (recommended)Claude, ChatGPT, Claude Code, Cursor, VS Code and any client with MCP OAuthGive the app only the address. It opens a Lantfly page where you sign in, pick the account and allow it. No token to paste. See OAuth.
API token, headerClients that let you set headersAuthorization: Bearer $LANTFLY_TOKEN. Use a scoped token.
API token, query stringClients that take only a URLhttps://lantfly.com/mcp?token=…. The URL then holds a secret: prefer the other options.

To act for an organization with an API token, add X-Lantfly-Account: <organization id> or use an organization token. With OAuth, you pick the account on the consent page.

Set up​

  1. Copy the address from the Console's AI & MCP page (or use https://lantfly.com/mcp).
  2. Add it to your AI app. Step-by-step for each client: Connect clients.
  3. Sign in to Lantfly when the app asks, pick the account, and click Allow.
  4. Ask the assistant something, for example "Find a TikTok scraper on Lantfly and get 20 posts for #skincare." More in Examples.

Apps you've connected appear under Connected apps on the AI & MCP page, where you can disconnect them.

Limits per request​

One HTTP request to the server (one message or a batch) can:

  • carry up to 10 JSON-RPC messages;
  • start up to 3 runs. Further call-actor calls in that request return a tool error; send them in a new request;
  • wait up to 120 seconds in total across its tool calls. Later calls get what's left, then return the run ID without waiting.

Tool calls that wait also need one of your account's 5 waiting slots, shared with Actor Standby. Results are trimmed to about 100 KB so they fit the model's context, with truncated: true when items were left out.

In this section​

PageWhat it covers
Connect clientsSetup for Claude, Claude Code, ChatGPT, Cursor, VS Code and others
OAuthThe OAuth 2.1 flow, tokens, revoking access
ToolsEvery tool, its arguments and results
PermissionsWhich tools a token or role sees
ExamplesPrompts and workflows
Troubleshooting401s, missing tools, timeouts