Skip to main content
Glama
RapierCraft

alterlab-mcp-server

by RapierCraft

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ALTERLAB_API_KEYYesYour API key. Get one free at https://app.alterlab.io/signin?redirect=/dashboard/keys&source=mcp
ALTERLAB_API_URLNoAPI base URL (for self-hosted or development)https://api.alterlab.io

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
alterlab_scrapeA

Get data from any website, bypass Cloudflare and anti-bot protection, scrape JavaScript-rendered pages, or fetch content from dynamic single-page apps. Turn any URL into clean, LLM-ready markdown — or get text, HTML, JSON, and structured sections. Automatically bypasses anti-bot protection (Cloudflare, Akamai, DataDome, PerimeterX, hCaptcha) with intelligent 4-tier escalation — no manual configuration needed. Cost-efficient: starts at $0.0001/page for simple sites, auto-escalates only when protection is detected. Returns markdown by default — optimized for LLM context. Supports GET (default) and POST via the method parameter. Use method='POST' with body for GraphQL APIs, REST endpoints, and form submissions. Use content_type to set the POST body Content-Type (json, urlencoded, graphql, plain). Use render_js=true to scrape dynamic pages, JavaScript-heavy sites (React, Angular, Vue, SPAs). Use render_js='auto' for mixed sites to detect JS needs per-page (saves 30-60%). Use use_proxy=true for geo-restricted or heavily protected sites. Use formats=['json_v2'] for a structured section tree (headings + content blocks). Use formats=['rag'] for chunked text optimized for RAG pipelines. Use formats=['raw'] for the raw response body without extraction. Use formats=['content'] for AI/KB pipelines — returns body_markdown, content_hash, images, links. Use extraction_schema to extract structured fields from the page using LLM. Use extraction_prompt for natural language extraction instructions. Use extraction_profile for pre-built templates (product, article, job_posting, etc.). Use evidence=true to include source passages alongside extracted fields. Use cache=true and cache_ttl to enable response caching. Use cost_controls to cap spending, pin a tier, or set a time budget. Supports authenticated scraping via session_id or inline cookies. Use scroll_to_load=true for infinite-scroll pages. Use location.country to scrape geo-targeted content from any region. Use prefer_cost=true to minimize credit spend (starts from cheapest tier). Use prefer_speed=true to skip to a fast reliable tier immediately. Use fail_fast=true to error instead of auto-escalating to expensive tiers. Use force_refresh=true to bypass cache and always fetch live content. Use promote_schema_org=true to prefer Schema.org JSON-LD over LLM extraction on structured pages. Use estimate_first=true to run a free cost estimate before scraping (prepended to the result).

alterlab_extractA

Extract product data, scrape prices, get structured data from any page content, or pull specific fields like names, emails, and ratings from HTML. Runs AlterLab's extraction pipeline on raw HTML, text, or markdown you already have — does NOT scrape a URL. For scraping + extraction in one step, use alterlab_scrape with extraction_schema instead. Profiles: 'product' (price, title, reviews), 'article' (title, author, body), 'job_posting', 'faq', 'recipe', 'event', 'ecommerce_homepage', 'directory_listing'. Returns JSON data. Use extraction_prompt for natural language extraction (LLM-powered). Use cache='only' to retrieve a previously cached result without calling the LLM.

alterlab_screenshotA

Take a screenshot of any website, capture a webpage as an image, or snapshot a URL visually. Works on anti-bot protected sites (Cloudflare, DataDome, etc.) — uses the same bypass engine as alterlab_scrape. Returns a full-page PNG screenshot directly in the conversation — rendered with a real headless browser. Use wait_for to wait for a specific element before capturing. Use wait_until to control page load timing (networkidle, domcontentloaded, load).

alterlab_estimate_costA

Preview the cost of scraping a URL before committing — no credits charged. Returns the predicted anti-bot tier (1-4), estimated cost per request, and confidence level. Call this before scraping protected or unfamiliar sites to avoid surprises. Tier 1 (simple HTTP): $0.0001. Tier 4 (full browser + anti-bot bypass): $0.001. Use render_js and use_proxy flags to see how options affect cost.

alterlab_check_balanceA

Check your AlterLab account balance, status, and credit usage. Call this before expensive operations (batch scrapes, large crawls) to verify sufficient funds. Returns current balance in dollars, balance status (healthy/low/critical/exhausted), total deposited, and total spent. For a full spending breakdown by time window and top domains, use alterlab_get_usage instead. No parameters required — uses your API key for identification.

alterlab_get_usageA

Get a detailed spending breakdown for your AlterLab account — credits consumed today, this week, and this month, plus the top domains by credit consumption. Use this to audit costs, identify expensive domains, and track usage trends. No parameters required — uses your API key for identification.

alterlab_crawlA

Crawl an entire website for RAG, index all pages on a site, or build a knowledge base from a domain. Automatically bypasses anti-bot protection on every page — works on Cloudflare-protected sites. Discovers URLs via sitemap parsing and link extraction, then scrapes each page asynchronously. Returns content as clean markdown, text, or structured data. Returns a crawl_id immediately — use alterlab_crawl_status to poll results. Use include_patterns/exclude_patterns to scope the crawl to specific sections. Use render_js='auto' for mixed sites to save 30-60% vs always rendering. Supports extraction_schema or extraction_profile to extract structured data from every page. Use cost_controls to cap total credits or pin the scraping tier for all pages. Use sitemap_path to specify a non-standard sitemap location. Use headers to inject custom HTTP headers (e.g., Authorization) into every page request.

alterlab_crawl_statusA

Poll the status and results of an ongoing or completed crawl. Call this after alterlab_crawl to check progress and retrieve scraped pages. Status values: queued, running, completed, failed, cancelled. When completed, results contains the scraped page content.

alterlab_crawl_cancelA

Cancel an ongoing crawl and refund unused pre-debited credits. Already-scraped pages are kept and available via alterlab_crawl_status. Cancelled crawls cannot be resumed.

alterlab_searchA

Search the web, find information online, look up any topic, or research a subject across the internet. Returns search results with URLs, titles, and snippets from multiple search engines. Uses AlterLab's SERP engine with Google/Bing/DuckDuckGo multi-engine failover for reliable results. Costs $0.001 per search query. Set scrape_results=true to also scrape each result page (with anti-bot bypass) and get full content — each page is billed at its normal scraping tier cost. Use domain to restrict results to a specific site (equivalent to site: operator). Use time_range to filter by recency (hour/day/week/month/year). Use safe_search=true to filter adult content from results.

alterlab_mapA

Discover all URLs on a website, get a sitemap, or find specific pages within a large site. Lightweight URL discovery via sitemap parsing and link extraction — no content scraping, no JS rendering. Costs just $0.001 per call regardless of how many URLs are found (up to 50,000). Use this before alterlab_crawl or alterlab_batch to identify which pages to scrape. Returns a flat list of URLs with source (sitemap/link) and depth. Use include_patterns/exclude_patterns to scope discovery to specific sections. Use search to rank URLs by relevance to a query. Use include_metadata=true to also fetch page titles and descriptions. Use sitemap_path to specify a non-standard sitemap location (e.g., '/sitemap_index.xml').

alterlab_batch_scrapeA

Scrape multiple URLs simultaneously and get all results back in one call — no polling required. Unlike alterlab_batch (async with batch_id polling), this returns all results inline when complete. Best for 2-20 URLs where you need results immediately. For 20+ URLs, use alterlab_batch instead. Uses concurrent scraping (controlled by max_concurrent) for speed. Shows per-URL status, content preview, and a total cost summary at the end. Handles partial failures gracefully — failed URLs show error details, successful ones show content.

alterlab_batchA

Scrape up to 100 URLs in parallel with a single request — much faster and more efficient than sequential alterlab_scrape calls. Each URL automatically gets anti-bot bypass protection (Cloudflare, DataDome, etc.) at its own tier level. Returns a batch_id immediately — use alterlab_batch_status to poll results. Each URL can have its own mode, formats, extraction_schema, and options. Credits are pre-debited based on estimated cost; unused credits are refunded on completion. Use this whenever you need to scrape more than 2-3 URLs.

alterlab_batch_statusA

Poll the status and results of a submitted batch. Call this after alterlab_batch to check progress and retrieve scraped content. Status values: processing, completed, failed, partially_failed. When completed, results contains the content for each URL.

alterlab_list_sessionsA

List all stored sessions for authenticated scraping. Sessions contain cookies for specific domains, allowing you to scrape content that requires login (e.g., Amazon order history, LinkedIn profiles). Use the returned session_id with alterlab_scrape to scrape authenticated pages.

alterlab_create_sessionA

Create a new stored session for authenticated scraping. Provide cookies from a logged-in browser session to enable scraping behind login walls. The session is stored securely and can be reused across multiple scrape requests via session_id.

alterlab_get_sessionA

Get detailed information about a specific stored session. Returns session status, cookie names, usage statistics (total requests, success rate), expiry info, and notes. Use this to inspect a session before deciding to validate, refresh, or delete it.

alterlab_update_sessionA

Update a stored session's properties. You can change the name, rotate cookies, update custom headers, set a new expiration, or add notes. When cookies are provided, they replace ALL existing cookies (not merged). Use this instead of delete+recreate when you need to rotate credentials.

alterlab_refresh_sessionA

Refresh a session by rotating its cookies and resetting failure counters. This is the preferred way to update cookies after re-authenticating in your browser. The session status is reset to active. If cookies are omitted, only the failure counters are reset.

alterlab_validate_sessionA

Validate whether a stored session is still active and its cookies are valid. Run this before scraping if you suspect a session may have expired. Returns the session status and a reason if invalid.

alterlab_delete_sessionA

Delete a stored session. This permanently removes the session and its cookies. Use this when a session is no longer needed or has been compromised.

alterlab_list_beta_featuresA

List all public beta and GA features available on AlterLab, with your current opt-in state for each. Beta features require opting in; GA features are available to all users. Use alterlab_enable_beta_feature to opt in to any beta feature that interests you.

alterlab_list_my_beta_featuresA

List all beta and GA features currently active on your account — a compact slug list for quick checks. Includes all GA features plus any beta features you have opted in to. Use this to verify which features are available before making API calls that require them.

alterlab_enable_beta_featureA

Opt in to a beta feature on your AlterLab account. Beta features are experimental capabilities available before general release. This operation is idempotent — calling it when already opted in returns success. Use alterlab_list_beta_features to discover available feature slugs.

alterlab_disable_beta_featureA

Opt out of a beta feature on your AlterLab account. This operation is idempotent — calling it when not opted in returns success. GA (generally available) features cannot be disabled.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RapierCraft/alterlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server