HUB
Sign inSign up

farukcan/zinc-carbon-web-search

By farukcan

•Updated 6 months ago

ZincCarbonWebSearch is an MCP server that allows to websearch by Playwright

Image
0

1.1K

farukcan/zinc-carbon-web-search repository overview

⁠Zinc Carbon Web Search MCP Server

An MCP (Model Context Protocol) server that performs web searches using Playwright. Supports Google and DuckDuckGo; DuckDuckGo is used as the primary engine, with Google as a fallback.

Github: https://github.com/farukcan/ZincCarbonWebSearch⁠

⁠Requirements

  • Node.js 18+
  • Google Chrome (installed system-wide)

If Chrome is not available on the system, Playwright will use its own Chromium. You can install it with npx playwright install chromium.

⁠Installation

npm install
npm run build

⁠Usage

⁠Stdio Mode (Cursor / Claude Desktop)
node dist/index.js
⁠Streamable HTTP Mode
# Default port: 3000
node dist/index.js --http

# Custom port
node dist/index.js --http --port 8080

In HTTP mode, the endpoint is: POST http://localhost:3000/mcp

⁠Cursor Integration

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "web-search": {
      "command": "node",
      "args": ["/full/path/ZincCarbonWebSearch/dist/index.js"]
    }
  }
}
⁠HTTP Mode (Streamable HTTP)

First, start the server:

node dist/index.js --http --port 3000

Then add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "web-search": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

In HTTP mode, the server must always be running. In Stdio mode, Cursor automatically starts and manages the server.

⁠Docker Mode

Start the server with Docker, then connect via HTTP:

docker run -p 3000:3000 farukcan/zinc-carbon-web-search

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "web-search": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

⁠Tools

Performs a web search.

ParameterTypeRequiredDescription
querystring✓Search query
limitnumber—Maximum number of results (default: 5, max: 10)
enginestring—Search engine: auto | duckduckgo | google (default: auto)

Engine behavior:

ValueDescription
autoTries DuckDuckGo first, falls back to Google if 0 results or error
duckduckgoUses only DuckDuckGo
googleUses only Google

Note: Google often blocks headless Chrome with CAPTCHA. The google engine only works reliably in non-headless environments or those with CAPTCHA bypass mechanisms. auto and duckduckgo are recommended.

Example output:

[
  {
    "title": "Playwright - Fast and reliable end-to-end testing",
    "url": "https://playwright.dev",
    "description": "Playwright enables reliable end-to-end testing for modern web apps."
  }
]

⁠Docker

The image is available on Docker Hub and can be used directly:

# Pull and run (HTTP mode on port 3000)
docker run -p 3000:3000 farukcan/zinc-carbon-web-search

# Run with custom port
docker run -p 8080:8080 farukcan/zinc-carbon-web-search node dist/index.js --http --port 8080
⁠Building from Source
# Build
docker build -t zinc-carbon-web-search .

# Run
docker run -p 3000:3000 zinc-carbon-web-search

The Docker image uses a multi-stage build with node:22-slim and installs only the Chromium browser via Playwright. The --http mode is the default entrypoint.

⁠Project Structure

src/
├── index.ts    — Entry point; transport selection (stdio / HTTP), graceful shutdown
├── server.ts   — McpServer creation, search tool registration
└── search.ts   — SearchService; Playwright browser management, Google/DuckDuckGo scraping

⁠NPM Scripts

ScriptDescription
npm run buildCompile TypeScript (to dist/)
npm startStart in stdio mode
npm run start:httpStart in HTTP mode (port 3000)

Tag summary

Content type

Image

Digest

sha256:e0f3433e2…

Size

487.5 MB

Last updated

6 months ago

docker pull farukcan/zinc-carbon-web-search