Stable JSON everywhere
Add --json to any command for a machine-readable envelope. --dry-run prints the exact request first, so an agent never guesses.
One prompt, pasted into Claude Code, Codex, Cursor or Gemini CLI, installs the FlowLeap CLI, signs you in, and teaches your agent to run grounded patent research. EPO and USPTO search, claims, citations, legal status, and full-corpus analytics, in the tool you already have open.
Copy this prompt and paste it into your agent. It installs the CLI, stops so you can sign in, installs the skills for the harness it runs in, and reports back what it did.
Set up the FlowLeap patent CLI on this machine and wire it into yourself. FlowLeap gives you real patent data: EPO and USPTO search, claims, citations, legal status, and full-corpus analytics.
Work through these steps in order. Run the commands yourself, except where a step tells you to stop.
1. Install. Check my OS and architecture first. Prefer npm: `npm i -g flowleap`. If npm is not available, run `curl -fsSL https://flowleap.co/install.sh | sh`, which downloads the release binary for my platform from github.com/flowleap-ai/flowleap-cli and verifies it against the release sha256 checksums before it runs. Confirm with `flowleap --version`.
2. Sign in. Run `flowleap auth login`. It opens a browser and prints a verification URL and a user code. Print that URL and that code in your reply and STOP there. I complete the sign-in myself. Continue only once I tell you it is done.
3. Install the skills, so you know which commands to call: `flowleap skills install --target <harness>`. The targets are claude, claude-project, codex, cursor and gemini. Pick the one matching the harness you are running in; if none matches, use claude.
4. Provider keys are mine, not yours. Never ask me for an EPO or USPTO key, never read one from a file, never put one in a command, and never write one anywhere. Tell me to run `flowleap keys setup` myself in my own terminal, then `flowleap keys test` to check them. Keys are optional during the trial, which runs on FlowLeap's own patent-data keys up to a daily cap; past that, or after the trial, mine are required.
5. Verify. Run `flowleap auth status`, then `flowleap doctor`, then one harmless read: `flowleap --json tools list`.
6. Report back: the installed version, whether I am signed in, where the skills went, whether provider keys are set, and one example question I can now ask you.Nothing in the prompt assumes one agent. It picks its own skills target from claude, claude-project, codex, cursor and gemini.
Sign-in opens a browser and prints a code. The agent prints both and waits. You finish the sign-in yourself.
Provider keys never pass through your agent. The prompt forbids it from asking for or handling an EPO or USPTO secret, and sends you to the terminal wizard instead.
Five commands, in order. Same result.
npm i -g flowleapThe npm package runs no install scripts. The native binary downloads on first run, verified against the release checksum, and covers macOS, Linux (including a static musl build), and Windows.
flowleap auth loginOpens a browser and prints a verification code. For headless or CI use, mint a revocable token with flowleap auth create-token and export FLOWLEAP_TOKEN wherever the CLI runs.
flowleap skills install --target claude32 skills ship inside the binary and install offline, 14 of them multi-step workflow recipes: prior art, freedom-to-operate, claim analysis, office-action response, invalidity, infringement charting. Target claude, claude-project, codex, cursor or gemini, then keep them fresh with flowleap skills update.
flowleap keys setup
flowleap keys testThe wizard is interactive and human-only by design: keys are stored locally on your machine and never travel through a model. Check them with flowleap keys test. Keys are optional during the trial (a daily cap applies; add your own keys for unlimited use).
flowleap doctorflowleap doctor checks config, auth and backend reachability. Add --json to any command for a machine-readable envelope, or --dry-run to see the exact request first.
curl -fsSL https://flowleap.co/install.sh | shcargo install --git https://github.com/flowleap-ai/flowleap-cli.gitThe quick-install script downloads the release binary for your platform and verifies it against the release sha256 checksums. Cargo builds from source. Homebrew installs are upgraded in place by flowleap upgrade.
Predictable output, predictable failure, and a next step on every error, whether a person or an agent is reading it.
Add --json to any command for a machine-readable envelope. --dry-run prints the exact request first, so an agent never guesses.
Every run exits with a documented code (3 for auth, 4 for subscription, 6 for rate limit), so a script can branch without parsing output.
An error tells the agent what to do next: log in, add a provider key, back off, or surface an upgrade URL to a human. A failed call never crashes the session.
flowleap mcp serves the same patent tools over the Model Context Protocol, so a harness that speaks MCP gets them with no skills install at all.
flowleap mcp runs as a stdio server from the same binary you installed. No separate service, no URL to host. Every tool call still goes on to the FlowLeap backend.
Point any MCP client at flowleap mcp and the tools appear. Only the config file and its schema differ between harnesses.
Tools are read from the backend at startup, so a tool added there appears in your harness with no CLI upgrade.
Prior art, patent data, citations, legal research, and analytics, all callable straight from the conversation.
search_patentsSearch EPO and USPTO for prior art in one call, with query building and enrichment handled for you.
get_bibliographyPull bibliographic data, abstract, and legal status for any patent by its publication number.
get_claimsFetch the full claim text of a patent in any published language.
get_patent_summaryGet a one-call snapshot of a patent: bibliography, family, legal status, and remaining term.
patstat_technologyMap the technology landscape for one CPC class from PATSTAT: top applicants, filing trend, grant rate by office, new entrants, and the most-cited families.
reference_searchSearch academic papers and non-patent literature for prior art that is not in patent databases.
And more. The server mirrors the backend /v1/tools registry, 51 tools at the last count, so this list is a sample rather than the whole of it.
The PATSTAT tools read FlowLeap's own PATSTAT snapshot, so they need no Patent-Data Key. The Graph Analytics tools and the PATSTAT docs tool are free at sign-in, with no plan. Portfolio Analytics and guarded SQL come with the plan. Every PATSTAT result carries its Data Edition and the EPO attribution.
Office tools need your own free EPO or USPTO key, which you add once on the Patent-data keys page of your dashboard; PATSTAT tools need none. Add a key
Install the CLI and sign in first, then add the server with one of these.
Claude Code
claude mcp add flowleap -- flowleap mcpclaude mcp add defaults to project scope. Add -s user to enable FlowLeap in every project.
Cursor · ~/.cursor/mcp.json
{
"mcpServers": {
"flowleap": { "command": "flowleap", "args": ["mcp"] }
}
}Codex · ~/.codex/config.toml
[mcp_servers.flowleap]
command = "flowleap"
args = ["mcp"]opencode · opencode.json
{
"mcp": {
"flowleap": {
"type": "local",
"command": ["flowleap", "mcp"],
"enabled": true
}
}
}Cline · cline_mcp_settings.json
{
"mcpServers": {
"flowleap": { "command": "flowleap", "args": ["mcp"] }
}
}Gemini CLI · ~/.gemini/settings.json
{
"mcpServers": {
"flowleap": { "command": "flowleap", "args": ["mcp"] }
}
}Windsurf · ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"flowleap": { "command": "flowleap", "args": ["mcp"] }
}
}Zed · settings.json
{
"context_servers": {
"flowleap": { "command": "flowleap", "args": ["mcp"], "env": {} }
}
}Roo Code · .roo/mcp.json
{
"mcpServers": {
"flowleap": { "command": "flowleap", "args": ["mcp"] }
}
}Goose · ~/.config/goose/config.yaml
extensions:
flowleap:
name: flowleap
type: stdio
cmd: flowleap
args: ["mcp"]
enabled: true
timeout: 300One command reports backend reachability, auth, provider keys, and the live tool count, then exits instead of serving.
flowleap mcp --checkSkip the interactive login by passing a personal token in the config's env block.
{
"mcpServers": {
"flowleap": {
"command": "flowleap",
"args": ["mcp"],
"env": { "FLOWLEAP_TOKEN": "fl_pat_..." }
}
}
}Using claude.ai, Claude Desktop, the Claude mobile apps or ChatGPT? They cannot run the CLI, so connect the hosted MCP server in the next section instead. This section covers the local MCP server for harnesses like Claude Code, Cursor, and Codex.
claude.ai, Claude Desktop, the Claude mobile apps and ChatGPT cannot run the CLI. For them, FlowLeap serves the same tools from its hosted MCP server: add one URL, sign in, and ask.
https://api.flowleap.co/mcpThe hosted MCP server lists the same 51 MCP tools as flowleap mcp, with 6 resources and 3 prompts. Only the transport and the sign-in differ.
Your editor asks you to confirm, saves the server to its config, and opens the FlowLeap sign-in on first use.
A connector you add on claude.ai belongs to your Claude account, so Claude Desktop and the Claude mobile apps show it too. There is no second setup.
Sign-in can fail until Perplexity fixes a reported issue: it asks for a client secret that FlowLeap's sign-in does not issue. The personal-token lines below are for CLIs and agents, not for chat products such as Perplexity.
Copy the line for your client. Each client opens the FlowLeap sign-in on first use.
claude mcp add --transport http flowleap https://api.flowleap.co/mcpThen run /mcp in Claude Code to sign in.
{
"mcpServers": {
"flowleap": {
"httpUrl": "https://api.flowleap.co/mcp"
}
}
}{
"mcpServers": {
"flowleap": {
"type": "http",
"url": "https://api.flowleap.co/mcp"
}
}
}Then run /mcp in a chat to sign in in your browser.
{
"mcpServers": {
"flowleap": {
"serverUrl": "https://api.flowleap.co/mcp"
}
}
}{
"context_servers": {
"flowleap": {
"url": "https://api.flowleap.co/mcp"
}
}
}If the agent lists only the authenticate tool after sign-in, ask it to authenticate once.
Mistral Vibe CLI and Google ADK agents cannot sign in with OAuth, so they send a FlowLeap personal token as a bearer header. Claude Code and Cursor can do the same and skip the browser sign-in. Replace fl_pat_... with your token.
The token comes from flowleap auth create-token. You can revoke it at any time.
claude mcp add --transport http flowleap https://api.flowleap.co/mcp --header "Authorization: Bearer fl_pat_..."{
"mcpServers": {
"flowleap": {
"url": "https://api.flowleap.co/mcp",
"headers": {
"Authorization": "Bearer fl_pat_..."
}
}
}
}[[mcp_servers]]
name = "flowleap"
transport = "streamable-http"
url = "https://api.flowleap.co/mcp"
headers = { "Authorization" = "Bearer fl_pat_..." }{
"mcpServers": {
"flowleap": {
"url": "https://api.flowleap.co/mcp",
"headers": {
"Authorization": "Bearer fl_pat_..."
}
}
}
}JetBrains does not document header support, so this line is not tested. If the server does not connect, use the local MCP server above.
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams
flowleap = McpToolset(
connection_params=StreamableHTTPConnectionParams(
url="https://api.flowleap.co/mcp",
headers={"Authorization": "Bearer fl_pat_..."},
),
)OAuth sign-in runs on FlowLeap's sign-in page and asks for one scope, patent-data: read patent data and PATSTAT analytics on your behalf under your plan, with no writes. A personal token gives the same access.
MCP access is in every plan, hosted or local. The Graph Analytics tools and the PATSTAT docs tool are free at sign-in, with no plan. Portfolio Analytics, guarded SQL and the other data tools need the plan, and a 7-day trial starts at sign-up.
Plain questions. Your agent picks the commands, and every answer traces back to a record you can open yourself.
How often do BASF's European patents get opposed?
What CPC classes should I search for solid-state battery electrolytes?
Are there any divisionals of EP2771468?
Where is EP05820528 protected?
Which journals get cited most in solid-electrolyte patents?
Opposition rates, family coverage and citation patterns come from the PATSTAT tools, Portfolio Analytics and Graph Analytics, and each answer names its Data Edition. The rest are live EPO and USPTO reads.
The CLI and the MCP server are included in the FlowLeap plan. The binary is open source; patent-data commands need an account with an active plan or trial, except the Graph Analytics tools and the PATSTAT docs tool, which need only a sign-in.
Data commands require a FlowLeap account with an active plan. The PATSTAT Graph Analytics tools and the PATSTAT docs tool are the exception: a sign-in is enough. A 7-day trial starts at sign-up. Without one, commands return a clear 402 with an upgrade URL, never a silent failure.
Sign in once with flowleap auth login, then mint a revocable token with flowleap auth create-token and export FLOWLEAP_TOKEN wherever the CLI runs.
7-day trial, no card required · $39/month after · bring your own model key.
Copy the setup prompt, paste it into the agent you already use, and run your first search in a couple of minutes.