alterlab-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ALTERLAB_API_KEY | Yes | Your API key. Get one free at https://app.alterlab.io/signin?redirect=/dashboard/keys&source=mcp | |
| ALTERLAB_API_URL | No | API base URL (for self-hosted or development) | https://api.alterlab.io |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| alterlab_scrapeA | Scrape a URL and return its content as markdown, text, HTML, JSON, or structured sections. Automatically handles anti-bot protection with tier escalation. Returns markdown by default — optimized for LLM context. Supports GET (default) and POST/PUT/PATCH/DELETE/HEAD via the method parameter. Use method='POST' with body for GraphQL APIs, REST endpoints, and form submissions. For GraphQL: set body='{"query": "{ ... }"}' and method='POST'. Use render_js=true for JavaScript-heavy sites (React, Angular, 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=['content'] for AI/KB pipelines — returns body_markdown, content_hash, images, links. Use extraction_schema to extract structured fields from the page using LLM (add formats=['json'] to retrieve result in content.json, also available in filtered_content). Use extraction_prompt for natural language extraction instructions (mutually exclusive with extraction_schema). Use extraction_profile to select a pre-built extraction template (product, article, job_posting, etc.). Use extraction_provider to select a specific BYOK LLM provider (openai, anthropic, openrouter, groq). Supports authenticated scraping via session_id (stored session) or inline cookies. Use scroll_to_load=true for infinite-scroll pages that lazy-load content. Use location.country to scrape geo-targeted content. |
| alterlab_extractA | Extract structured data from raw HTML, text, or markdown content WITHOUT scraping. Bring your own pre-fetched content. Use this when you already have the page content and want to run AlterLab's extraction pipeline on it. For scraping + extraction in one step, use alterlab_scrape with formats=['json'] 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 full-page screenshot of a URL. Returns the screenshot as a PNG image. Uses headless browser rendering. Use wait_for to wait for a specific element before capturing. |
| alterlab_estimate_costA | Estimate the cost of scraping a URL without actually scraping it. Returns the predicted tier, cost per request, and confidence level. Use this to check costs before running expensive scrapes. |
| alterlab_check_balanceA | Check your AlterLab account balance and credit usage. Returns current balance, total deposited, and total spent. No parameters required — uses your API key for identification. |
| alterlab_crawlA | Start an asynchronous crawl of an entire website. Discovers URLs via sitemap parsing and link extraction, then scrapes each page. 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 to extract structured data from every page. |
| 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 | Execute a web search and return SERP results (URLs, titles, snippets). Uses AlterLab's own SERP engine with Google/Bing/DuckDuckGo multi-engine failover. Costs $0.001 per search query. Set scrape_results=true to also scrape each result page 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). |
| alterlab_mapA | Discover all URLs on a website via sitemap parsing and link extraction. No JS rendering, no content scraping — pure lightweight URL discovery. Costs $0.001 per call regardless of how many URLs are found. 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. |
| alterlab_batchA | Submit up to 100 URLs for parallel scraping in a single batch request. 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 instead of calling alterlab_scrape repeatedly for multiple 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
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