Skip to main content
Glama

Perchance MCP Lite - Under 512MB RAM (No Browser)

For Render Free Tier 512MB - Uses external Byparr/Camoufox solver on separate Render account

Main MCP needs 1-2GB for Chromium (SeleniumBase UC). This lite version stays 80-120MB by offloading Turnstile solving to a separate service.

Architecture - Split for 512MB

Render Account 1 (512MB, 750h) - perchance-mcp-lite (this repo)
  - 80-120MB RAM, no browser
  - Only curl_cffi + httpx + mcp + fastapi
  - Calls solver via SOLVER_URL env var
  - Endpoints: /sse, /mcp, /ping (health)

Render Account 2 (512MB, 750h) - perchance-solver (separate repo)
  - 250-350MB RAM, Camoufox Firefox stealth (Byparr)
  - Solves Turnstile sitekey 0x4AAAAAAAA8g8NphwaSOT59
  - Returns userKey + generates images via curl_cffi
  - Endpoints: /solve, /generate, /ping, /v1 (FlareSolverr-compatible)
  - Docker: ghcr.io/thephaseless/byparr:latest or custom solver.py

Each Render workspace has 750h/month free, so 2 accounts = 1500h total, both can be kept alive via UptimeRobot.

Related MCP server: Cloudflare Image MCP

Why Byparr/Camoufox?

  • FlareSolverr official v3.5.2 fixed Turnstile in #1634 but still Chromium + undetected-chromedriver = 400MB+ and detectable

  • Byparr = custom fork using Camoufox Firefox - C++ fingerprint patches (not JS), 0% detection on CreepJS, BrowserScan, 200MB vs 400MB+, 2-5x better success rate on Turnstile in 2026 benchmarks

  • Unlimited: Self-hosted, no Browserless 1000/mo limit

Quick Start

1. Deploy Solver (Render Account 2)

cd /home/user/perchance-solver
# Push to GitHub perchance-solver repo
git init && git add . && git commit -m "Byparr solver" && git push

# Render → New Web Service → Connect repo → Docker → Port 8000 → Health /ping → Free 512MB
# URL: https://perchance-solver.onrender.com
# Test: curl https://perchance-solver.onrender.com/ping → {"status":"ok"}

Keep alive solver:

  • UptimeRobot free → Monitor https://perchance-solver.onrender.com/ping every 5 min

2. Deploy Lite MCP (Render Account 1)

cd /home/user/perchance-mcp-lite
# Push to GitHub perchance-mcp-lite repo

# Render → New Web Service → Docker → Port 8000 → Health /ping → Free 512MB
# Env vars:
#   SOLVER_URL=https://perchance-solver.onrender.com
#   PORT=8000
# URL: https://perchance-mcp-lite.onrender.com
# Test: curl https://perchance-mcp-lite.onrender.com/ping

Keep alive lite:

  • UptimeRobot → Monitor https://perchance-mcp-lite.onrender.com/ping every 5 min

3. Connect MCP Clients

{
  "mcpServers": {
    "perchance-lite": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://perchance-mcp-lite.onrender.com/sse"]
    }
  }
}

Or for solver direct (if you want images directly from solver):

{
  "mcpServers": {
    "perchance-solver": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://perchance-solver.onrender.com/sse"]
    }
  }
}

Tools (same 15 as full MCP, but lite)

  • generate_image - Main: calls solver if SOLVER_URL set, else needs PERCHANCE_USER_KEY

  • get_user_key_status - Check cached key + solver health

  • get_ad_code - Ad code via curl_cffi (no browser, unlimited)

  • list_styles, get_generator_info, generate_batch

Env Vars

  • SOLVER_URL - https://your-solver.onrender.com (Byparr/Camoufox solver on separate Render account) - recommended for 512MB

  • PERCHANCE_USER_KEY - 64-char hex from browser localStorage (manual, no solver, valid 30s IP-bound)

  • PORT - Render sets automatically (8000)

Memory

  • Lite MCP: 80-120MB (no browser) - fits Render 512MB

  • Solver: 250-350MB (Camoufox) - fits separate Render 512MB

  • Full MCP: 800MB-1.5GB (SeleniumBase UC) - needs 2GB, OOM on Render

How it works

  1. Lite: get_ad_code_via_curl_cffi() - TLS impersonation impersonate="chrome", bypasses JA3, 200 OK 64 hex, no browser

  2. Lite: If no cached userKey, POST SOLVER_URL/solve → solver launches Camoufox, solves Turnstile 0x4AAAAAAAA8g8NphwaSOT59, calls verifyUser?browserId&token&thread=0 → userKey 64 hex

  3. Lite: Option A - Generate via POST SOLVER_URL/generate (solver does curl_cffi generate + download, returns base64, same IP as solve, no invalid_key) Option B - Generate via curl_cffi directly (if userKey IP matches Lite IP - may fail if solver IP != lite IP, so Option A recommended)

  4. Download via curl_cffi immediate (token single-use expires 5min, IP-bound)

FlareSolverr-compatible API

Solver also exposes /v1 for drop-in Byparr/FlareSolverr clients:

curl -X POST https://perchance-solver.onrender.com/v1 -H "Content-Type: application/json" -d '{
  "cmd": "request.get",
  "url": "https://image-generation.perchance.org/embed",
  "maxTimeout": 60000
}'
→ {"status":"ok","solution":{"cookies":[...],"userAgent":"...","response":"<html>..."}}

Custom Fork - How we got Turnstile solving

  • Official FlareSolverr v3.5.2 fixed Turnstile in PR #1634

  • Byparr is custom fork using Camoufox Firefox (C++ patches, not JS) - better fingerprint, 200MB

  • For Perchance, we built custom solver that does exactly turnstile.render({sitekey: '0x4AAAAAAAA8g8NphwaSOT59'}) → token → verifyUser → userKey

  • Docker: ghcr.io/thephaseless/byparr:latest is drop-in, no custom code needed for generic, but custom solver returning userKey is more reliable for Perchance

Test Lite

pip install -r requirements.txt
export SOLVER_URL=https://perchance-solver.onrender.com
python server.py
# or
python -m uvicorn remote_server:app --host 0.0.0.0 --port 8000

Available Tools

6 tools
generate_batchC

Generate multiple images via lite mode.

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNo
promptsYes
save_dirNo
art_styleNo
resolutionNo512x512
guidance_scaleNo
negative_promptNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not explain what 'lite mode' means, how batching behaves, whether images are saved to disk, or any output/error side effects. The description only restates the core action without behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no fluff and is front-loaded. However, it is under-specified rather than efficiently complete; 'lite mode' introduces a term with no explanation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters, no annotations, and no parameter descriptions, the definition is too sparse for an agent to confidently invoke the tool. The presence of an output schema helps with return understanding, but the ambiguous 'lite mode' and lack of behavioral guidance leave significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description mentions no parameters. 'Multiple images' loosely maps to the prompts array, but the description adds no meaning for seed, save_dir, art_style, resolution, guidance_scale, or negative_prompt, leaving the agent without the needed parameter guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Generate') and resource ('multiple images via lite mode'), making it clear this is a batch generation tool and distinguishing it from the sibling generate_image. However, 'lite mode' is left undefined, so the exact nature of the tool is somewhat ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The word 'multiple' implies this tool is for batch generation compared to a single-image sibling, but there is no explicit when-to-use/when-not-to-use guidance or mention of alternatives. Usage context is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_imageA

Generate an image via lite mode (curl_cffi + external solver).

Memory: 80-120MB (no browser). If SOLVER_URL set, calls solver service (Byparr/Camoufox) that does Turnstile solving (200MB) on separate Render account. If no solver, requires PERCHANCE_USER_KEY env var (64 hex from browser).

Args: prompt: What to draw negative_prompt: Things to avoid seed: -1 random or specific int resolution: 512x512, 512x768, 768x512, 768x768 guidance_scale: 1-30 default 7 art_style: Optional style from list_styles save_path: Where to save (default auto)

Returns JSON with saved_path, seed, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNo
promptYes
art_styleNo
save_pathNo
resolutionNo512x512
guidance_scaleNo
negative_promptNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well by disclosing memory usage (80-120MB), solver delegation behavior, required environment variables, and that it returns JSON. It does not mention rate limits, cost, or file overwrite behavior, but the core behavioral traits are transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a lead sentence, environment notes, an Args list, and a return note. It is slightly dense with technical jargon like 'curl_cffi' and 'Byparr/Camoufox', but each sentence contributes useful information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers prerequisites, parameter meanings, and return behavior. Since an output schema exists, detailed return documentation is not necessary. It lacks error handling, rate limits, and how to obtain PERCHANCE_USER_KEY, but overall it is sufficient for a 7-parameter tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. Every parameter is explained: prompt, negative_prompt, seed semantics, resolution allowed values, guidance_scale range, art_style source, and save_path default. This fully bridges the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('Generate an image') and specifies the mode ('lite mode'), which distinguishes it from a generic image tool. It references list_styles as a source for art_style, but it does not explicitly contrast with the sibling generate_batch, so it is not a full 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides useful environmental context: when SOLVER_URL is set, a solver service is used; otherwise PERCHANCE_USER_KEY is required. However, it gives no explicit guidance on when to choose this tool over generate_batch or other siblings, leaving the selection logic mostly implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_ad_codeA

Get current ad access code via curl_cffi (no browser, unlimited).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It does disclose the mechanism (curl_cffi), the headless nature, and an 'unlimited' usage characteristic. But it omits potential prerequisites, side effects, error behavior, and what 'unlimited' specifically refers to.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single terse sentence with no filler. The primary action ('Get current ad access code') is front-loaded, and the implementation notes are compactly appended.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless tool with an output schema, the description adequately states what is fetched and how. Minor gaps remain around the meaning of 'unlimited' and how this relates to sibling status tools, but none prevent an agent from invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the empty input schema is already complete. The description makes no misleading parameter claims, and the baseline for zero-parameter tools applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Get') and a specific resource ('current ad access code'), and adds implementation context (curl_cffi, no browser) that helps differentiate it from sibling tools about generator info and user key status. It doesn't explain what an 'ad access code' is, but the action and target are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Phrases like 'no browser' and 'unlimited' imply this tool is a straightforward, headless way to fetch the current ad code and can be called freely. However, there is no explicit guidance about when to choose this over alternatives such as get_user_key_status or get_generator_info.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_generator_infoB

Get information about the generator and lite mode.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure, but it only says 'Get information.' It does not state whether this is strictly read-only, whether it reflects current state, or whether any lite-mode behavior is affected. The read-only implication is weak and unsupported by explicit wording.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no wasted words. It sacrifices some specificity by not explaining what 'generator' or 'lite mode' mean, but it is appropriately compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema likely documents return values, and the zero-parameter signature makes invocation trivial. However, the description lacks contextual detail about what the generator is, what lite mode means, and when this tool should be requested, leaving mild but real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so parameter ambiguity is not an issue. The baseline of 4 applies because there is nothing for the description or schema to clarify.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: 'Get information about the generator and lite mode.' It is not a tautology because it adds 'lite mode,' but it does not explicitly distinguish itself from sibling tools like generate_image or list_styles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or typical call context. An agent must infer usage solely from the name and the generic 'get information' phrasing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_key_statusA

Check if cached userKey is valid and solver status.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Check') and mentions 'cached' and 'solver status', which adds some context. However, it does not state whether the check has side effects, whether it requires any preconditions, or how errors are handled. The information is minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that states the core purpose without any wasted words. It is front-loaded and appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, an output schema exists, and it is a straightforward status check), the description is adequately complete. The output schema covers return details, and the description conveys the essential function. It lacks any usage context, but that is already penalized in usage_guidelines.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema coverage is trivially 100%. Since there are no parameters to document, the description does not need to add anything. Per the calibration, a baseline of 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('Check') and a specific resource ('cached userKey' and 'solver status'). It is not a tautology and is distinct from the sibling tools, which involve style listing, generator info, ad code, and generation operations. However, it does not explicitly differentiate from alternatives, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus the siblings. There is no mention of context, prerequisites, or situations where this check would be preferable to other tools. The description simply states what it does, leaving usage entirely to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_stylesA

List all available art styles for Perchance Stable Diffusion.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the action but doesn't disclose whether the call is read-only, requires authentication, or has other constraints. The agent can infer it's likely a safe read, but nothing explicit is stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no filler words. It is appropriately minimal for a zero-parameter listing tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no required parameters and an output schema, the description covers the basic purpose. It lacks any usage note relative to sibling tools, but given the simplicity, it is mostly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so the baseline is 4. The description adds the word 'all', clarifying that the tool returns every available style without filtering. This is a small addition beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'List' and identifies the resource 'all available art styles' with a domain qualifier. It is clear and distinct from the sibling tools, which concern generation, user keys, and ad code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It doesn't mention that it provides style options for generate_image or any other usage context. For a zero-parameter discovery tool, this is a missed opportunity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.0.0
    • First observedgenerate_batch
    • First observedgenerate_image
    • First observedget_ad_code
    • First observedget_generator_info
    • First observedget_user_key_status
    • First observedlist_styles

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation4/5

Most tools have clear, distinct purposes: style listing, generator info, key status, ad code, and image generation. However, generate_image and generate_batch share the same core action and may cause agents to hesitate when choosing which suits a task, though their singular vs. batch nature provides adequate separation.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: list_, get_, and generate_. Even the batch and single image tools share the generate_ prefix, making the set predictable and easy to navigate.

Tool Count5/5

With 6 tools, this server is well-scoped for a lightweight Perchance image generation interface. Each tool maps to a distinct functional area (styles, generator info, auth status, ad access, single/batch generation) without unnecessary bloat.

Completeness4/5

The core workflow is covered: discover styles, check key validity, and generate single or batch images. Minor gaps exist—such as no explicit tool to set or refresh the user key (relying on env var/solver) and no ability to list or retrieve generated images—but these are reasonable for a 'lite' server.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    C
    maintenance
    Standalone MCP server and CLI for generating images via ChatGPT backend, with reliable exact file paths and multi-account login support.
    2
    5
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for AI-powered image generation using OpenAI's gpt-image-1 and gpt-image-2 models with advanced text rendering and native transparency support.
    20 npm
    1
    MIT