MCP server exposing the SCOUTS-AI web search API as a single web_search tool for AI agents.
Project description
scouts-ai-mcp
Model Context Protocol (MCP) server that exposes the SCOUTS-AI web search API as a single web_search tool for AI agents, LLM apps, answer engines and GEO workflows.
- One tool, no API key. Backed by
GET https://scouts-ai.com/api/search. - Drop-in for Claude Desktop, Cursor, Open WebUI, Continue, Cline and any MCP host.
- Python ≥ 3.10,
fastmcpv2,httpx. - MIT licensed.
Install
pip install scouts-ai-mcp
Run (stdio)
scouts-ai-mcp
That's it. Wire it into your MCP host of choice — for example, Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"scouts-ai": {
"command": "scouts-ai-mcp"
}
}
}
Run (HTTP)
For remote MCP hosts and self-hosted bridges:
scouts-ai-mcp --transport http --host 127.0.0.1 --port 8765
Tool: web_search
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | — | Search query, 1–512 chars. |
lang |
string | en |
BCP-47 language code (e.g. en, en-US). |
page |
int | 1 |
1-based page number, 1–10. |
Returns a compact JSON object mirroring the SCOUTS-AI response shape:
{
"query": "rust async runtime",
"lang": "en",
"page": 1,
"pageSize": 10,
"cached": false,
"tookMs": 412,
"results": [
{
"title": "Tokio - An asynchronous runtime for Rust",
"url": "https://tokio.rs/",
"content": "Tokio is an asynchronous runtime for the Rust programming language...",
"publishedAt": "2025-11-14T00:00:00Z",
"engine": "duckduckgo"
}
]
}
Error handling
The tool raises ToolError (rendered as an MCP tool error) when:
- The query is empty/too long or
lang/pageare invalid → invalid arguments. - The upstream returns
429→ rate limit exceeded; honorsRetry-Afterwhen present. - The upstream returns
5xxor the network call fails → SCOUTS-AI temporarily unavailable. - The upstream returns a structured
4xxerror envelope → forwards the code and message.
Configuration
All settings are environment variables. Defaults match the public SCOUTS-AI deployment.
| Variable | Default | Description |
|---|---|---|
SCOUTS_AI_BASE_URL |
https://scouts-ai.com |
Base URL of the SCOUTS-AI API. |
SCOUTS_AI_TIMEOUT_S |
5.0 |
HTTP timeout in seconds (0.1–60). |
SCOUTS_AI_USER_AGENT |
scouts-ai-mcp/0.1.0 |
User-Agent header. |
SCOUTS_AI_DEFAULT_LANG |
en |
Default lang when the tool omits it. |
SCOUTS_AI_MAX_QUERY_LENGTH |
512 |
Reject queries longer than this. |
SCOUTS_AI_MAX_PAGE |
10 |
Reject page numbers above this. |
Development
git clone https://github.com/scouts-ai/scouts-ai-mcp.git
cd scouts-ai-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
Publishing to PyPI
One-time setup, then publish in three commands.
1. Create a PyPI account
- Register at pypi.org/account/register.
- Account settings → Add 2FA (required for uploads; TOTP authenticator or WebAuthn).
- Account settings → API tokens → Add API token.
- Name:
scouts-ai-mcp - Scope:
Entire account(or limit to the project after first upload) - Copy the token (
pypi-...) — shown only once.
- Name:
Verify the project name is free: open https://pypi.org/project/scouts-ai-mcp/
(404 = available).
2. Install publishing tools
pip install build twine
3. Build and upload
python -m build
python -m twine upload dist/*
- Username:
__token__ - Password: your
pypi-...API token
For subsequent releases: bump version in pyproject.toml, then repeat step 3.
Optional: automate via GitHub Actions (Trusted Publishing)
Recommended for long-term maintenance — no API token in CI.
- PyPI → Project → Publishing → Add a new pending publisher:
- Owner:
scouts-ai - Repository:
scouts-ai-mcp - Workflow filename:
release.yml - Environment name:
pypi
- Owner:
- Add
.github/workflows/release.ymlthat runspython -m build && python -m twine publish-diston tag push (v*). - Cut a release:
git tag v0.1.0 && git push --tags.
License
MIT — see LICENSE.
Project details
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 scouts_ai_mcp-0.1.1.tar.gz.
File metadata
- Download URL: scouts_ai_mcp-0.1.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8017110087128362174edd82d3f19f174b79a85a382cc4bf1d89e6a2049f6dc7
|
|
| MD5 |
392ac75924f68c20822b493568beb26c
|
|
| BLAKE2b-256 |
b2691766109e888a393dd2ca9ce83bceb834060018e8e3d1b6212938692ffa27
|
File details
Details for the file scouts_ai_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scouts_ai_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf8dd9f623d62b974d4a0d7d5ee7a495fd85c0d0cac829b69fc5a15655212003
|
|
| MD5 |
9a30dc55277cb051db238422229123d7
|
|
| BLAKE2b-256 |
e6bf60dcfd2c33f704b19a79a907df8c02f25d8e0d5469b0529fe5e6b8060247
|