Developer Documentation

Get started with Webpill

Add web search to any AI agent in under 2 minutes. One URL, three tools, structured JSON responses in <50ms.

1

Quickstart

Webpill is an MCP (Model Context Protocol) server. Connect it to any MCP-compatible client — no SDK installation, no API keys to manage during beta.

01Claude Desktop

Open Claude Desktop settings, navigate to the MCP section, and add Webpill as a server. Edit your claude_desktop_config.json:

claude_desktop_config.json
json
{
  "mcpServers": {
    "webpill": {
      "url": "https://mcp.webpill.dev"
    }
  }
}

Config location: macOS ~/Library/Application Support/Claude/claude_desktop_config.json

02Cursor

In Cursor, go to Settings → MCP and add a new server:

.cursor/mcp.json
json
{
  "mcpServers": {
    "webpill": {
      "url": "https://mcp.webpill.dev"
    }
  }
}

Restart Cursor after saving. The Webpill tools will appear in your AI chat.

03Any MCP Client

Webpill supports both Streamable HTTP and SSE transports. Point any MCP-compatible client to:

server endpoint
url
https://mcp.webpill.dev

Supported transports:

Streamable HTTP— recommended, used by Claude Desktop & Cursor
SSE (Server-Sent Events)— for clients that use the older SSE transport
HTTP REST— direct HTTP calls for custom integrations
2

API Reference

Webpill exposes three MCP tools. When connected via MCP, your AI agent can call these tools directly. You can also call them via HTTP REST.

TOOL

fetch_page

Fetch any URL and get its content as clean, parsed text. Handles JavaScript rendering, removes ads and boilerplate — returns just the content.

ParamTypeRequiredDescription
urlstringrequiredThe URL to fetch
formatstringoptionalOutput format: 'text' (default), 'markdown', or 'html'
max_lengthnumberoptionalMax content length in characters (default: 50000)

Example request

fetch_page call
json
{
  "tool": "fetch_page",
  "arguments": {
    "url": "https://docs.anthropic.com/en/docs/agents",
    "format": "markdown"
  }
}

Example response

response
json
{
  "content": "# Building Agents with Claude\n\nAgents are AI systems that can...",
  "url": "https://docs.anthropic.com/en/docs/agents",
  "title": "Building Agents - Anthropic Documentation",
  "content_type": "text/html",
  "word_count": 2847,
  "response_time_ms": 38
}
TOOL

extract

Extract structured data from a web page. Define what you want using a natural language prompt, and get back clean JSON.

ParamTypeRequiredDescription
urlstringrequiredThe URL to extract data from
promptstringrequiredWhat data to extract (natural language)
schemaobjectoptionalOptional JSON schema for the output structure

Example request

extract call
json
{
  "tool": "extract",
  "arguments": {
    "url": "https://news.ycombinator.com",
    "prompt": "Extract the top 5 stories with title, URL, points, and comment count"
  }
}

Example response

response
json
{
  "data": [
    {
      "title": "Show HN: I built a web search MCP server",
      "url": "https://example.com/post",
      "points": 342,
      "comment_count": 127
    }
  ],
  "url": "https://news.ycombinator.com",
  "items_extracted": 5,
  "response_time_ms": 45
}
3

Code Examples

Use Webpill from any language. Connect via MCP client libraries or call the HTTP endpoint directly.

Python— using mcp client library

webpill_example.py
python
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    # Connect to Webpill MCP server
    async with streamablehttp_client("https://mcp.webpill.dev") as (r, w, _):
        async with ClientSession(r, w) as session:
            await session.initialize()

            # Search the web
            result = await session.call_tool("web_search", {
                "query": "latest Python 3.13 features",
                "num_results": 5
            })
            print(result)

            # Fetch a page
            page = await session.call_tool("fetch_page", {
                "url": "https://docs.python.org/3.13/whatsnew",
                "format": "markdown"
            })
            print(page)

            # Extract structured data
            data = await session.call_tool("extract", {
                "url": "https://pypi.org/project/fastapi",
                "prompt": "Get package name, version, description, and download count"
            })
            print(data)

import asyncio
asyncio.run(main())

Install: pip install mcp

TypeScript— using @modelcontextprotocol/sdk

webpill_example.ts
typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://mcp.webpill.dev")
);

const client = new Client({
  name: "my-app",
  version: "1.0.0",
});

await client.connect(transport);

// Search the web
const searchResult = await client.callTool({
  name: "web_search",
  arguments: {
    query: "best TypeScript ORMs 2025",
    num_results: 5,
  },
});
console.log(searchResult);

// Fetch a page as markdown
const page = await client.callTool({
  name: "fetch_page",
  arguments: {
    url: "https://orm.drizzle.team/docs/overview",
    format: "markdown",
  },
});
console.log(page);

// Extract structured data
const data = await client.callTool({
  name: "extract",
  arguments: {
    url: "https://npmjs.com/package/drizzle-orm",
    prompt: "Get package name, latest version, weekly downloads",
  },
});
console.log(data);

Install: npm install @modelcontextprotocol/sdk

cURL— direct HTTP endpoint

web_search via HTTP
bash
# Search the web
curl -X POST https://mcp.webpill.dev/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "web_search",
    "arguments": {
      "query": "MCP protocol specification",
      "num_results": 5
    }
  }'
fetch_page via HTTP
bash
# Fetch and parse a page
curl -X POST https://mcp.webpill.dev/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "fetch_page",
    "arguments": {
      "url": "https://example.com",
      "format": "markdown"
    }
  }'
extract via HTTP
bash
# Extract structured data
curl -X POST https://mcp.webpill.dev/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "extract",
    "arguments": {
      "url": "https://github.com/trending",
      "prompt": "Get top 5 trending repos with name, stars, language"
    }
  }'
4

Why Webpill

Stop fighting with browser automation, CAPTCHAs, and slow headless browsers. Webpill gives you web data as fast as a database query.

Webpill
Browser Agents
Response time
< 50ms
2–5 seconds
Monthly cost
$49 flat
$100–500+
Setup
1 URL
Browser instances
CAPTCHAs
Never
Frequent
Output format
Structured JSON
Raw HTML
Uptime SLA
99.9%
No SLA
MCP native
Yes
DIY integration

40×

faster than browser agents

50ms vs 2-5s

$49

flat monthly price

vs $100-500+ /mo

1

URL to configure

zero infrastructure

vs Browserbase

Browserbase charges per browser session ($0.01–0.05+ per request) and requires managing headless browser infrastructure. Webpill is a flat $49/mo with unlimited calls, no browser sessions to manage, and 40× faster responses.

vs Firecrawl

Firecrawl's Starter plan is $49/mo for 3,000 credits. Webpill gives you unlimited calls at the same price, plus native MCP integration — no SDK wrappers needed. And you get web search + extraction built in, not just crawling.

vs DIY (Puppeteer / Playwright)

Building your own scraping infra means managing browser pools, handling CAPTCHAs, proxy rotation, and HTML parsing. Webpill replaces all of that with a single URL. Spend time building your product, not fighting anti-bot systems.

Ready to get started?

Join the waitlist and get free access during beta. One URL, three tools, under 50ms.

Join Waitlist