npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

synthetic-web-search-mcp

v0.1.5

Published

MCP server for Synthetic Web Search API

Downloads

48

Readme

Synthetic Web Search MCP Server

A Model Context Protocol (MCP) server that exposes the Synthetic web search API as a tool for use with Claude and other MCP-compatible applications.

npm version

Overview

This server provides a search_web tool that allows MCP clients to perform web searches using the Synthetic API. Search results are returned as formatted JSON containing URL, title, text, and published date fields.

Quick Start with Claude Code

Add the MCP server to Claude Code with a single command:

claude mcp add synthetic-web-search -e SYNTHETIC_API_KEY=your_api_key_here -- npx -y synthetic-web-search-mcp@latest

Replace your_api_key_here with your actual Synthetic API key.

Usage with Claude Desktop

To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "synthetic-web-search": {
      "command": "npx",
      "args": ["-y", "synthetic-web-search-mcp@latest"],
      "env": {
        "SYNTHETIC_API_KEY": "your_actual_api_key_here"
      }
    }
  }
}

After adding the configuration, restart Claude Desktop. You can then use the web search tool in your conversations.

Usage with opencode

To use this MCP server with opencode, add the following to your opencode configuration:

{
  "mcp": {
    "synthetic-web-search": {
      "type": "local",
      "command": ["npx", "-y", "synthetic-web-search-mcp@latest"],
      "environment": {
        "SYNTHETIC_API_KEY": "your_actual_api_key_here"
      },
      "enabled": true
    }
  }
}

Replace your_actual_api_key_here with your actual Synthetic API key. Restart opencode after adding the configuration.

Local Development & Testing

1. Prerequisites

2. Install & build

npm install
npm run build

3. Test with MCP Inspector

The fastest way to verify the server interactively without any client configuration:

SYNTHETIC_API_KEY=your_key_here \
  npx @modelcontextprotocol/inspector node dist/index.js

This opens a browser UI where you can invoke search_web directly. Try:

  • query only → text is capped at the default 1000 characters.
  • query + max_text_length: 200 → tighter truncation to quickly scan results.
  • query + max_text_length: 5000 → more content when you need full detail.

4. Test with Claude Code (local build)

claude mcp add synthetic-web-search \
  -e SYNTHETIC_API_KEY=your_key_here \
  -- node /absolute/path/to/synthetic-web-search-mcp/dist/index.js

5. Test with Claude Desktop (local build)

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

{
  "mcpServers": {
    "synthetic-web-search": {
      "command": "node",
      "args": ["/absolute/path/to/synthetic-web-search-mcp/dist/index.js"],
      "env": {
        "SYNTHETIC_API_KEY": "your_key_here"
      }
    }
  }
}

Restart Claude Desktop after saving the file.

Available Tools

search_web

Search the web using the Synthetic API.

Arguments:

  • query (string, required): The search query string
  • max_text_length (number, optional, default: 1000): Maximum number of characters to include in the text field of each result. Useful for preventing large snippets from flooding the context window. Results exceeding this length are truncated with .... Pass a larger value when you need the full content of a result.

Example:

Search for " TypeScript documentation"

Returns: A JSON array of search results, each containing:

  • url: The link to the search result
  • title: The title of the page
  • text: A snippet or content from the page
  • published: Publication date (if available)

API Details

  • Endpoint: https://api.synthetic.new/v2/search
  • Method: POST
  • Authentication: Bearer token via Authorization header
  • Request Body: JSON with query field

Project Structure

synthetic-web-search-mcp/
├── package.json
├── tsconfig.json
├── .env.example
├── README.md
├── src/
│   └── index.ts
└── dist/          (generated after build)
    ├── index.js
    └── index.d.ts

License

MIT