SI

serply-inc/mcp

Developer tools
0 stars 1 forks Quality 83 Trend 20MIT

Serply MCP server

Overview

A Model Context Protocol (MCP) server that gives any MCP-compatible AI client live web search, news, academic search, job listings, Amazon product lookup, Reddit, and URL scraping — powered by the Serply.io API. This project is not affiliated with, endorsed by, or sponsored by Serply, Inc. Serply.io is a third-party paid service. You need your own Serply API key to use this server. Fourteen tools that give AI assistants real-time access to the web: No Docker or auth token required. The MCP client launches the server as a subprocess. Sign up at serply.io (free tier: 300 requests/month). Detailed descriptions for all 14 tools. Parameters marked * are required. Search Google and return organic results, answer boxes, featured snippets, Google's AI Overview, ads, "People also ask" questions, and related searches. Use this tool for factual lookups, recent events, product research, technical documentation, or anything that benefits from live Google results.

README

serply-mcp

A Model Context Protocol (MCP) server that gives any MCP-compatible AI client live web search, news, academic search, job listings, Amazon product lookup, Reddit, and URL scraping — powered by the Serply.io API.

Disclaimer: This project is not affiliated with, endorsed by, or sponsored by Serply, Inc. Serply.io is a third-party paid service. You need your own Serply API key to use this server.


What this server provides

Fourteen tools that give AI assistants real-time access to the web:

Tool What it does
google_search Google web search — organic results, featured snippets, AI Overview with sources, ads, People also ask, related searches
google_maps_search Google Maps — structured local businesses, websites, ratings, coordinates, phone numbers, and hours
bing_search Bing web search — organic results, ads, and shopping results
google_video_search Google video search — results from YouTube and other video platforms
google_news_search Google News — fresh articles with named-entity extraction
google_jobs_search Google Jobs — job listings aggregated from LinkedIn, Indeed, and company sites
google_scholar_search Google Scholar — peer-reviewed papers, citations, and abstracts
amazon_product_search Amazon product listings — prices, ratings, ASINs, and Prime eligibility
reddit_subreddit_posts Reddit — posts from a subreddit, sortable and paginated
reddit_subreddit_about Reddit — subreddit metadata: subscribers, online count, description
reddit_user_posts Reddit — a user’s submission and comment history
reddit_post Reddit — one post’s full body as markdown, comments optional
reddit_post_comments Reddit — the full comment thread on a post, nested replies included
scrape_url Fetch and convert any public web page to clean Markdown or raw HTML

Quickstart

No Docker or auth token required. The MCP client launches the server as a subprocess.

Step 1 — Install

# Using uv (recommended)
uv sync

# Or pip
pip install -e .

Step 2 — Get a Serply API key

Sign up at serply.io (free tier: 300 requests/month).

Step 3 — Add to your MCP client

For Claude Desktop, edit claude_desktop_config.json:

{
  "mcpServers": {
    "serply": {
      "command": "uv",
      "args": ["run", "python", "-m", "serply_mcp"],
      "cwd": "/path/to/serply-mcp",
      "env": {
        "SERPLY_API_KEY": "your-serply-api-key",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

For Claude Code, run:

claude mcp add serply \
  --command "uv" \
  --args "run,python,-m,serply_mcp" \
  --cwd "/path/to/serply-mcp" \
  --env "SERPLY_API_KEY=your-serply-api-key,MCP_TRANSPORT=stdio"

Tools

Detailed descriptions for all 14 tools. Parameters marked * are required.


google_search

Search Google and return organic results, answer boxes, featured snippets, Google’s AI Overview, ads, “People also ask” questions, and related searches.

Use this tool for factual lookups, recent events, product research, technical documentation, or anything that benefits from live Google results.

Parameter Type Default Description
query * string — Search query (max 2048 chars)
num integer 10 Number of results to return (1–100)
start integer 0 Result offset for pagination (0 = page 1, 10 = page 2, …)
proxy_location string "US" Country for geo-specific results: US EU CA IE GB FR DE SE IN JP KR SG AU BR
device string "desktop" Emulated device type: desktop or mobile

Returns: results[] (title, link, description), total, answer (featured snippet if present), and when the page has them: the AI Overview text with numbered sources (each the real page URL, not a Google redirect), ads (title and advertiser URL), “People also ask” questions, and related searches. Sections the page did not have are left out.


google_maps_search

Search Google Maps using Serply’s direct non-JavaScript structured transport. Use it for local businesses, services, venues, addresses, ratings, phone numbers, opening hours, and direct business websites. It is independent of the browser and requests-proxy fleets, so it intentionally has no device or proxy-location option.

Parameter Type Default Description
query * string — Place, business, category, or location (max 2048 chars)
num integer 20 Number of places requested (1–200)
hl string "en" Google interface language code
gl string "us" Two-letter country code

Returns: places[], result_count, parsed_at, and metadata. Place records include available IDs, Maps URL, website, address, coordinates, rating/review count, categories, phone, timezone, thumbnail, and opening hours.

Location is expressed in the natural-language query:

Location form Example query
ZIP code coffee shops in 60601
City coffee shops in Chicago, IL
Coordinates coffee shops near 41.8781,-87.6298

Example MCP arguments:

{
  "query": "coffee shops in Chicago, IL",
  "num": 20,
  "hl": "en",
  "gl": "us"
}

gl must be exactly two letters (us, not u). Coordinates are query context; the current tool does not expose separate latitude, longitude, radius, pagination, device, or proxy-location parameters. Google may return fewer than num places when local inventory is exhausted.

The equivalent direct HTTP request is:

curl --fail-with-body \
  -H "x-api-key: $SERPLY_API_KEY" \
  "https://api.serply.io/v1/maps/search/coffee%20shops%20in%20Chicago%2C%20IL?num=20&hl=en&gl=us"

Keep API keys in environment variables; never place them in a URL, MCP config committed to source control, or issue/chat text.


bing_search

Search Bing and return organic results, ads, and shopping results.

Use as a complement to google_search for a second opinion, shopping results, or Bing-specific freshness signals.

Parameter Type Default Description
query * string — Search query (max 2048 chars)
proxy_location string "US" Country context (see google_search for values)
device string "desktop" desktop or mobile

Returns: results[], ads[], shopping_ads[], location


google_video_search

Search Google Videos and return results from YouTube and other video platforms.

Use when the user is looking for tutorials, product demos, news clips, or any query where video content is more useful than web pages.

Parameter Type Default Description
query * string — Video search query (max 2048 chars)
num integer 10 Number of results (1–100)
proxy_location string "US" Country context
device string "desktop" desktop or mobile

Returns: results[] (title, link, description), total


google_news_search

Search Google News and return fresh articles with named-entity extraction.

Use for breaking news, company announcements, political events, sports, or anything time-sensitive. Results are typically hours to days old — much fresher than standard web search.

Parameter Type Default Description
query * string — News search query (max 2048 chars)
ceid string null Country/language edition, e.g. US:en, GB:en, FR:fr
proxy_location string "US" Country context
device string "desktop" desktop or mobile

Returns: feed.entries[] (title, link, published date, source), entities[] (named people, orgs, places)


google_jobs_search

Search Google Jobs and return listings aggregated from LinkedIn, Indeed, and company career pages.

Note: Serply’s Jobs API returns North American results regardless of proxy_location.

Parameter Type Default Description
query * string — Job title, role, or keyword (max 2048 chars)
proxy_location string "US" Country context
device string "desktop" desktop or mobile

Returns: jobs[] (position, description, salary, remote/hybrid flags, perks, link, logo, posted date)


google_scholar_search

Search Google Scholar and return academic papers, citations, and abstracts.

Use for research tasks: finding peer-reviewed papers, locating citations, understanding academic consensus, or retrieving publication metadata.

Parameter Type Default Description
query * string — Paper title, author, topic, or DOI fragment (max 2048 chars)
num integer 10 Number of results (1–100)
proxy_location string "US" Country context
device string "desktop" desktop or mobile

Returns: articles[] (title, link, abstract snippet, author byline with venue and year, Cited by N)


amazon_product_search

Search Amazon products and return listings with prices, ratings, and ASINs.

Use to find product prices and availability, compare by rating and review count, look up ASINs, or identify bestsellers and Prime-eligible items.

Parameter Type Default Description
query * string — Product name, brand, or keyword (max 2048 chars)
proxy_location string "US" Country storefront context
device string "desktop" desktop or mobile

Returns: products[] (title, price, asin, rating_stars, review_count, link, img_url, prime, bestseller, is_sponsor), ads[]


reddit_subreddit_posts

List posts from a subreddit.

Use to see what a community is discussing right now, pull the top posts of a week or month, or gather sentiment on a product or topic. Each post carries its id, which you can hand to reddit_post for the full body, or reddit_post_comments for the discussion.

Parameter Type Default Description
subreddit * string — Subreddit name, with or without the r/ prefix (python, r/AskReddit)
limit integer 25 Number of posts (1–100)
sort string "hot" hot new top rising controversial
t string null Time window for top/controversial: hour day week month year all
after string null Pagination cursor — the Next page value from a previous call

Returns: numbered posts with subreddit, author, score, comment count, timestamp, flair, permalink, post id, outbound link, and a body snippet, plus the next-page cursor.


reddit_subreddit_about

Get a subreddit’s own metadata rather than its posts.

Use to size up a community: subscriber count, users online, creation date, whether it is public/restricted/private, and its self-description.

Parameter Type Default Description
subreddit * string — Subreddit name, with or without the r/ prefix

Returns: display name, title, subscribers, active users, creation date, type, language, NSFW/quarantine flags, URL, public description, and sidebar text.

The Serply endpoint takes no query parameters, so this tool exposes none.


reddit_user_posts

Fetch a Reddit account’s submission and comment history.

Use to understand who someone is on Reddit — what they post about, which communities they are active in, and what they recently said. Submissions and comments come back in one timeline; comments show the thread they were left on.

Parameter Type Default Description
username * string — Account name, with or without the u/ prefix (spez, u/spez)
limit integer 25 Number of items (1–100)
sort string "new" hot new top controversial
t string null Time window for top/controversial
after string null Pagination cursor

Returns: a numbered timeline of posts (t3) and comments (t1) with scores, timestamps, subreddits, permalinks, and body snippets, plus the next-page cursor.


reddit_post

Read one post’s full content.

Use when you have a post id or Reddit URL and want what the post actually says. The listing tools truncate bodies to a ~400 character snippet; this returns the complete self-text in Reddit’s own markdown — headings, lists, links, code blocks intact.

Parameter Type Default Description
post_id * string — Post id from the URL — 1vfemi1 in reddit.com/r/Python/comments/1vfemi1/…. A t3_ prefix is accepted
with_comments boolean false Also render the comment tree under the post
sort string "confidence" Comment ordering, when with_comments is true
max_depth integer 3 Levels of nested replies to render (0–10)

Returns: markdown — an # title, an italic metadata line (subreddit, author, score, comment count, timestamp), a bullet list with the permalink and id, then the body.

Link posts have an empty body by design; their content is the links to URL, which you can pass to scrape_url.

An id that does not exist comes back as a plain No post found for id … answer rather than a tool error, so a client will not retry it.


reddit_post_comments

Read the comment thread on a Reddit post.

Use after reddit_subreddit_posts, reddit_user_posts, or a web search surfaces a thread worth reading. Returns the post plus its comment tree, so you see what people actually said instead of just the title.

Parameter Type Default Description
post_id * string — Post id from the URL — 1vfemi1 in reddit.com/r/Python/comments/1vfemi1/…. A t3_ prefix is accepted
sort string "confidence" confidence (Reddit’s “best”) top new controversial old qa
max_depth integer 3 Levels of nested replies to render (0–10)

Returns: the post (title, author, score, timestamp, link, full body) followed by the comment tree, indented by depth. Branches Reddit did not inline are marked … N more replies not loaded.

Note: this endpoint returns Reddit’s two-element array ([post, comments]) rather than a single object; the client normalizes that before the tool renders it.

Reddit responses are cached by Serply for 10 minutes, and cached responses do not consume credits.


scrape_url

Fetch and return the content of any public web page.

Use when you have a specific URL and need to read its full content — for example, after a search returns a link you want to summarize, or when the user shares a URL and asks for analysis.

Prefer response_type="markdown" for LLM tasks — it strips navigation, ads, and boilerplate, leaving clean readable text. Use response_type="full" only when you need the raw HTML structure.

Security: Private/internal IP ranges and non-http(s) schemes are blocked by default to prevent SSRF attacks.

Parameter Type Default Description
url * string — Full URL to scrape (http:// or https:// only)
response_type string "markdown" Output format: markdown (clean text) or full (raw HTML)

Returns: content, content_hash (SHA-256), content_length, url (final URL after redirects), response_type


Configuration

All configuration is via environment variables. No config file is required.

Variable Required Default Description
SERPLY_API_KEY Yes — Your Serply.io API key
MCP_TRANSPORT No stdio stdio (local) or http (Docker/remote)
MCP_API_KEY For HTTP — Bearer token clients must send. Min 32 chars. Generate: openssl rand -hex 32
MCP_HTTP_HOST No 0.0.0.0 HTTP bind host
MCP_HTTP_PORT No 8000 HTTP bind port
MCP_HTTP_PATH No /mcp HTTP mount path
MCP_RATE_LIMIT_PER_HOUR No 5000 Per-API-key request rate limit, sliding one-hour window
SERPLY_BASE_URL No https://api.serply.io Override the Serply API base URL
SERPLY_TIMEOUT_SECONDS No 30 Per-request timeout in seconds
SERPLY_MAX_RETRIES No 3 Retry attempts on 429/5xx (exponential backoff)
BLOCK_INTERNAL_URLS No true Block private/loopback IPs in scrape_url (SSRF protection)
LOG_LEVEL No INFO DEBUG / INFO / WARNING / ERROR

Running locally

stdio transport

The simplest way to run the server. Your MCP client starts the process automatically using the config shown in Quickstart.

To run manually:

SERPLY_API_KEY=your-key MCP_TRANSPORT=stdio python -m serply_mcp

HTTP transport (Docker)

Suitable for running as a persistent service accessible over a network.

# 1. Set required environment variables
export SERPLY_API_KEY=your-serply-api-key
export MCP_API_KEY=$(openssl rand -hex 32)

# 2. Build and start
docker compose up --build

# 3. Verify the server is healthy
curl http://localhost:8000/healthz
# → {"status":"ok"}

The server listens on http://127.0.0.1:8000/mcp. Put a TLS-terminating reverse proxy (Caddy, nginx, Traefik) in front before exposing beyond localhost.


Client setup

Claude Desktop — stdio

~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
%APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "serply": {
      "command": "uv",
      "args": ["run", "python", "-m", "serply_mcp"],
      "cwd": "/path/to/serply-mcp",
      "env": {
        "SERPLY_API_KEY": "your-serply-api-key",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Claude Desktop — HTTP (remote server)

{
  "mcpServers": {
    "serply": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.serply.io/mcp",
        "--header",
        "Authorization: Bearer your-mcp-api-key"
      ]
    }
  }
}

Claude Code — stdio

claude mcp add serply \
  --command "uv" \
  --args "run,python,-m,serply_mcp" \
  --cwd "/path/to/serply-mcp" \
  --env "SERPLY_API_KEY=your-serply-api-key,MCP_TRANSPORT=stdio"

Cursor / other MCP clients — stdio

{
  "mcpServers": {
    "serply": {
      "command": "uv",
      "args": ["run", "python", "-m", "serply_mcp"],
      "cwd": "/path/to/serply-mcp",
      "env": {
        "SERPLY_API_KEY": "your-serply-api-key",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Security

  • Bearer auth — MCP_API_KEY is required for HTTP transport. Tokens under 32 characters are rejected at startup. Comparison uses secrets.compare_digest (timing-safe).
  • SSRF protection — scrape_url resolves hostnames before each request and rejects RFC 1918 private ranges, loopback, link-local (169.254.x.x), and CGNAT addresses. Controlled by BLOCK_INTERNAL_URLS.
  • Rate limiting — Per-token sliding-window limiter (in-memory). Default: 60 requests/minute.
  • Secret handling — SERPLY_API_KEY and MCP_API_KEY are read from env only. Neither appears in any log line.
  • Container hardening — Runs as uid 10001, read-only root filesystem, all Linux capabilities dropped, no-new-privileges.
  • TLS — The server serves plain HTTP. Always terminate TLS at a reverse proxy when exposing beyond localhost.

Development

# Install all dependencies including dev tools
uv sync --all-extras

uv run pytest -q                        # run tests with coverage
uv run ruff check src tests             # lint
uv run mypy --strict src                # type check
uv run ruff format src tests            # format
docker compose build                    # build image
docker compose up                       # start server

Coverage target: 90% (currently ~98%).


License

MIT

This project is not affiliated with Serply, Inc. Serply.io is a third-party service — see serply.io for pricing and terms.

View the full README on GitHub

Install

npx -y mcp-remote https://mcp.serply.io/mcp --header Authorization: Bearer your-mcp-api-key
New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "serply": { "command": "uv", "args": ["run", "python", "-m", "serply_mcp"], "cwd": "/path/to/serply-mcp", "env": { "SERPLY_API_KEY": "your-serply-api-key", "MCP_TRANSPORT": "stdio" } } } }