Skip to main content
Glama
Serpex MCP (Web search API)

Serpex MCP (Web search API)

Serpex MCP

npm version License: MIT

A Model Context Protocol (MCP) server for Serpex, a web search engine built for AI agents. Search returns ranked web results, optionally with each page's content as Markdown; Extract turns known URLs into clean Markdown. Agents use it for research, data enrichment, and work in legal, hiring, sales, finance and other industries.

Features

✅ Web Search: Ranked web results as JSON, nothing to configure
✅ Page Content: Optionally the full content of the top 5 or 10 pages as Markdown, in the same call
✅ Extract: Up to 10 known URLs to clean Markdown or HTML
✅ Easy Integration: Works with Claude Desktop, Jan AI, and any MCP-compatible client

Related MCP server: SerpApi MCP Server

Use cases

  • Ground agent answers in live web sources, with page content in one call

  • Enrich company and lead records (websites, pricing pages, news)

  • Research legal and regulatory topics, hiring and job markets, finance, products and news in any industry

Installation

No installation needed! Use npx to run directly:

npx serpex-mcp

Global Installation

npm install -g serpex-mcp

Local Installation

npm install serpex-mcp

Usage

With Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "serpex": {
      "command": "npx",
      "args": ["-y", "serpex-mcp"],
      "env": {
        "SERPEX_API_KEY": "your-api-key-here"
      }
    }
  }
}

With Other MCP Clients

Any MCP-compatible client can use this server. Configure it with:

  • Command: npx

  • Arguments: -y serpex-mcp

  • Environment: SERPEX_API_KEY=your-key

Standalone

export SERPEX_API_KEY="your-api-key-here"
serpex-mcp

Environment

Variable

Required

Meaning

SERPEX_API_KEY

yes, for tool calls

Your Serpex API key. Without it the server still starts and lists its tools; every tool call then returns an error asking for the key (not charged)

SERPEX_BASE_URL

no

API base URL. Default https://api.serpex.dev

The server calls the API through the official serpex SDK (^2.12.0), so request parameters, timeouts and error parsing follow the SDK.

Available Tools

Search the web with Serpex. Optionally fetches full page content (markdown) for the top results inline with the search — best-effort, so check each result for content vs content_error.

Parameters:

  • q (required): Search query string (max 500 characters). Operators such as site:, -site:, after:YYYY-MM-DD and before:YYYY-MM-DD go inside the query.

  • include_content (optional, boolean): Also fetch full page content (markdown) for the top results. Best-effort — pages that can't be extracted return content_error instead. Default: false.

  • content_results (optional, 5 | 10): Number of top results to fetch content for, when include_content is true. Must be exactly 5 or 10. Default: 5.

Example:

{
  "q": "EU AI Act obligations for employers after:2026-01-01",
  "include_content": true,
  "content_results": 5
}

Response (JSON, as tool output text) includes status (success or no_results), total_results, credits_used, a message when nothing was found, content_requested / content_delivered counts and, per result, content on success or content_error on failure — both keys are omitted when content wasn't requested.

Credits: 1 per search; with include_content, 1 when no page came back, 3 for 1-5 pages, 6 for 6-10 pages. An empty result is charged only when it was confirmed as genuinely empty.

serpex_extract

Extract the content of known web pages as clean markdown (or HTML).

Parameters:

  • urls (required): 1 to 10 absolute http(s) URLs.

  • format (optional, markdown | html): Output format. Default: markdown.

Example:

{
  "urls": ["https://example.com/pricing"],
  "format": "markdown"
}

Response (JSON, as tool output text) includes successful, failed, credits_used and, per URL, success plus markdown / html, or error and error_type (for example http, robots_disallowed, timeout, unsupported_content_type) when the page could not be extracted. Failed URLs are not charged. Extract calls can take up to about a minute, so the server waits up to 100 s.

Errors

A failed call returns isError: true with one sentence the agent can act on: what happened, whether it was charged and whether to retry. By status: 400 (fix the arguments), 401 (check SERPEX_API_KEY), 402 (out of credits, with the balance), 429 (rate limit — 5, 25 or 50 requests per second by plan — with the wait in ms), 5xx (temporary, not charged, retry). Invalid arguments (empty q, content_results other than 5 or 10, more than 10 URLs) are rejected before any request is sent.

Getting Your API Key

  1. Visit Serpex

  2. Sign up for a free account

  3. Get your API key from the dashboard

  4. Use it in the SERPEX_API_KEY environment variable

API Information

Development

Build from Source

git clone https://github.com/divyeshradadiya/serpex-mcp.git
cd serpex-mcp
pnpm install
pnpm build

Run Tests

Offline, no API key or network. Build first: npm test runs the built server. It starts a local mock of the Serpex API serving the recorded responses in test/fixtures/ and checks every tool output and error message.

npm run build
npm test

License

MIT

Available Tools

2 tools
serpex_extractA

Extract the content of known web pages with Serpex. Returns each page as clean markdown (or HTML). Up to 10 URLs per call; pages that cannot be extracted return success: false with an error and an error_type, and are not charged.

Inputs: urls (required), format.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation4/5

    serpex_search is for discovery of unknown pages while serpex_extract is for known URLs, and the descriptions make that framing clear. There is partial overlap because search can also return inline markdown content, but the best-effort vs. guaranteed/charged semantics differentiate them enough.

    Naming Consistency5/5

    Both tools follow the same serpex_<verb> snake_case convention, giving a predictable, scannable pattern. No mixing of styles or vague verbs.

    Tool Count4/5

    Two tools is on the lean side, but for a focused search/extract API each tool earns its place and there is no redundant surface. A third tool (e.g. crawl or map) could round it out, but the current scope is defensible.

    Completeness4/5

    Search plus extraction covers the core discovery-to-retrieval lifecycle, including batched extraction of up to 10 URLs. Minor gaps exist around site crawling/sitemap traversal and multi-query batching, but agents can work around these with repeated calls.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables advanced web search across multiple search engines (Brave, DuckDuckGo, Google, Bing, Yandex) with intelligent backend selection, full content extraction, and advanced filtering by time, language, geography, and content type.
      3
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables searching across multiple search engines (Google, Bing, YouTube, DuckDuckGo, etc.) and retrieving parsed search results via SerpApi integration.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables web searches across multiple engines (DuckDuckGo, Bing, Google, SerpAPI, Google CSE, Tavily) with no API key required for the free engines, plus automatic fallback, caching, and webpage content fetching.
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables querying multiple search engines such as Google, Bing, Yahoo, DuckDuckGo, YouTube, and eBay to retrieve real-time results, including answer boxes, organic results, news, images, shopping, weather, and stock data. Responses can be returned as structured JSON or token-efficient Markdown, with optional interactive table and dashboard views.
      -