Skip to main content

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, fastmcp v2, 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/page are invalid → invalid arguments.
  • The upstream returns 429 → rate limit exceeded; honors Retry-After when present.
  • The upstream returns 5xx or the network call fails → SCOUTS-AI temporarily unavailable.
  • The upstream returns a structured 4xx error 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.5 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/kecven/scouts-ai-mcp.git
cd scouts-ai-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

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

scouts_ai_mcp-0.1.5.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scouts_ai_mcp-0.1.5-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file scouts_ai_mcp-0.1.5.tar.gz.

File metadata

  • Download URL: scouts_ai_mcp-0.1.5.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for scouts_ai_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d143f8260f3d062c4e81ac3c79756feace0bb573228a0966bf328fe0c1e120c5
MD5 7d7a78a1825e2251c4d78686641736c3
BLAKE2b-256 e7542e81159a16ee890878d85955803a43f9967cefdae9235fb348960b9ef823

See more details on using hashes here.

File details

Details for the file scouts_ai_mcp-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: scouts_ai_mcp-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for scouts_ai_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6d93bfde895bd770923e0aa90d28d2ae2113ce20bb1a82f08e29500b897dea
MD5 b5eb9193490986e984f8770f40323bcf
BLAKE2b-256 5053e5adfcdc7349de2342e5143f6b8c359118ae6243686814b8e180c71cb9d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page