A high-performance, asynchronous MCP server for Serper Google Search, featuring connection pooling, request retries, and intelligent input parsing.
Project description
Serper MCP Toolkit
A rebuilt Serper MCP server based on the firecrawl-toolkit architecture.
Highlights
- Unified async request layer (
httpx+ connection pooling + retries) - Compact JSON responses (single-line) for lower token usage
- Stable mapped response schemas (no upstream raw passthrough)
- Multi-page aggregation for non-image search endpoints (10 results/page granularity)
- Image search
search_numnormalization to10or100 - Multi-transport startup (
STDIO/HTTP/SSE, mutually exclusive) - Process lock to prevent duplicate server instances
Tools
serper-aggregated-searchserper-general-searchserper-image-searchserper-video-searchserper-place-searchserper-maps-searchserper-reviews-searchserper-news-searchserper-lens-searchserper-scholar-searchserper-shopping-searchserper-patents-searchserper-scrape
Core Parameter Rules
- Search tools do not expose
page; internal pagination is automatic. - Non-image endpoints:
search_numis clamped to1..100- then rounded up to nearest multiple of 10 (
25 -> 30)
- Image endpoint:
1..10 -> 10,11..100 -> 100
- Maps endpoint:
- when aggregation requires page > 1 and query mode is used,
llis required.
- when aggregation requires page > 1 and query mode is used,
Environment Variables
API and network
SERPER_API_KEYSERPER_HTTP2(0/1)SERPER_MAX_CONNECTIONSSERPER_KEEPALIVESERPER_MAX_CONCURRENT_REQUESTSSERPER_MAX_WORKERSSERPER_RETRY_COUNTSERPER_RETRY_BASE_DELAYSERPER_ENDPOINT_CONCURRENCY(JSON, e.g.{"search":10,"scrape":2})SERPER_ENDPOINT_RETRYABLE(JSON, e.g.{"scrape":false})
Transport selection (exactly one must be enabled)
SERPER_MCP_ENABLE_STDIOSERPER_MCP_ENABLE_HTTPSERPER_MCP_ENABLE_SSE
Transport host/port
SERPER_MCP_HTTP_HOSTSERPER_MCP_HTTP_PORTSERPER_MCP_SSE_HOSTSERPER_MCP_SSE_PORTSERPER_MCP_HOST(fallback)SERPER_MCP_PORT(fallback)
Lock file
SERPER_MCP_LOCK_FILE(default/tmp/serper_mcp.lockon Unix)
MCP Client Example
{
"mcpServers": {
"serper-toolkit": {
"command": "uvx",
"args": ["serper-toolkit"],
"env": {
"SERPER_API_KEY": "<your-serper-api-key>",
"SERPER_MCP_ENABLE_STDIO": "1"
}
}
}
}
CI/CD
Two GitHub Actions workflows are included:
-
CI(.github/workflows/ci.yml)- Trigger: push/PR on
main - Python matrix:
3.12,3.13 - Steps: alias validation, unit tests, build, twine check
- Trigger: push/PR on
-
Publish to PyPI(.github/workflows/publish-pypi.yml)- Trigger: push on
main(automatic), plus manualworkflow_dispatch - Preflight: alias validation, tests, build, twine check, version-not-on-PyPI check
- Publish: trusted publishing via OIDC to PyPI
- Trigger: push on
Required repository settings
- Create GitHub Environment:
pypi - Configure PyPI Trusted Publisher for this repo/workflow/branch:
- Workflow file:
.github/workflows/publish-pypi.yml - Branch:
main
- Workflow file:
- Ensure Actions permissions allow OIDC (
id-token: writein workflow is already set)
Development Validation
python3 scripts/validate_country_aliases.py
python3 -m unittest discover -s tests -p "test_*.py"
python3 -m build
python3 -m twine check dist/*
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file serper_toolkit-0.0.13.tar.gz.
File metadata
- Download URL: serper_toolkit-0.0.13.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d14645187dc750bafcb1635ddc1349470873d4a93af64946459b020ec87a0d9
|
|
| MD5 |
99d316419976002b5e86499826257a44
|
|
| BLAKE2b-256 |
f3e944ab1ccc49e007e355e140c1995579acff43ee5d2232d9d98fb5f12bc04f
|
Provenance
The following attestation bundles were made for serper_toolkit-0.0.13.tar.gz:
Publisher:
publish-pypi.yml on Joey-Kot/serper-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
serper_toolkit-0.0.13.tar.gz -
Subject digest:
0d14645187dc750bafcb1635ddc1349470873d4a93af64946459b020ec87a0d9 - Sigstore transparency entry: 1294006808
- Sigstore integration time:
-
Permalink:
Joey-Kot/serper-toolkit@95e8c8ab5e2462a3b527e20d26856fa70efc842b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Joey-Kot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@95e8c8ab5e2462a3b527e20d26856fa70efc842b -
Trigger Event:
push
-
Statement type:
File details
Details for the file serper_toolkit-0.0.13-py3-none-any.whl.
File metadata
- Download URL: serper_toolkit-0.0.13-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8bc779bd5e9bb8bacac0b23a3286360e0ee0e9db8208ac2cb4daf4704044e6
|
|
| MD5 |
41f109812240d249d0233b0f5bc608c9
|
|
| BLAKE2b-256 |
09cef6b3992e65b0264b6e0bf8029f21ffe21ef51f26fdbff32e32b2fb45dc76
|
Provenance
The following attestation bundles were made for serper_toolkit-0.0.13-py3-none-any.whl:
Publisher:
publish-pypi.yml on Joey-Kot/serper-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
serper_toolkit-0.0.13-py3-none-any.whl -
Subject digest:
bd8bc779bd5e9bb8bacac0b23a3286360e0ee0e9db8208ac2cb4daf4704044e6 - Sigstore transparency entry: 1294006926
- Sigstore integration time:
-
Permalink:
Joey-Kot/serper-toolkit@95e8c8ab5e2462a3b527e20d26856fa70efc842b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Joey-Kot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@95e8c8ab5e2462a3b527e20d26856fa70efc842b -
Trigger Event:
push
-
Statement type: