AWSWSA-MCP
Allows agents to run web searches through Amazon Bedrock AgentCore's InvokeWebSearch API, returning ranked results with title, URL, publication date, and text extract; supports query, result count, domain filters, date range, and country.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π What is AWSWSA-MCP?
A small MCP server with one tool, aws_web_search, that wraps the Amazon Bedrock AgentCore Web Search API (InvokeWebSearch). Your agent gets ranked web results with a text extract, the source URL and the publication date, and the query is served from an Amazon-operated web index inside AWS.
It is meant as a complement to a basic web search such as Tavily, not a replacement. It only searches. It does not fetch whole pages, map or crawl a site, or run multi-step research. Keep Tavily (or any fetch tool) for that and add this server as a second, independent source.
Related MCP server: Web Search MCP Server
π§ How it works?
1. Listen
An MCP client (Claude, pi, MCPHub, LiteLLM, any streamable-HTTP client) connects to
/mcp. Optional bearer authentication protects the endpoint;/healthis always open.
2. Think
The tool validates the request (query 1-200 characters, 1-25 results, optional domain include/exclude lists, optional date range, optional country) before anything is sent to AWS.
3. Search
InvokeWebSearchis called with the default boto3 credential chain, so the server needs no API key of its own: an EC2 instance profile is enough.
4. Show
The result is a numbered markdown list with title, URL, publication date and a text extract, ending with a reminder to cite the sources (required by the AWS acceptable-use terms).
β¨ Features
One tool,
aws_web_search: query,max_results,include_domains,exclude_domains,published_after,published_before,countryNo third-party search key: IAM only, queries stay inside AWS
Works with an EC2 instance profile, environment keys, session tokens,
*_FILEsecrets or a shared profileOptional bearer token, constant-time comparison,
/healthfor container checksSmall multi-arch Docker image, runs as a non-root user
Fast: about 0.5 s per search in our tests, results carry a publication date
π οΈ Technology Stack
Layer | Technology |
Language | Python 3.13 |
MCP | official |
AWS |
|
Server |
|
Container | Docker, |
ποΈ Architecture
flowchart LR
A[Agent / MCP client] -->|POST /mcp, Bearer| B[awswsa-mcp]
B -->|InvokeWebSearch, SigV4| C[AgentCore Web Search]
C --> D[(Amazon web index)]
E[Instance profile / keys] -.credentials.-> Bclient --MCP--> awswsa-mcp --boto3--> bedrock-agentcore: InvokeWebSearchπ¦ Get the image
docker pull ghcr.io/mirecekd/awswsa-mcp:latestOr build it yourself:
docker build -t awswsa-mcp .βοΈ Setup
1. Allow the call in IAM
The caller needs one action on one resource, nothing else:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "bedrock-agentcore:InvokeWebSearch",
"Resource": "arn:aws:bedrock-agentcore:*:aws:tool/web-search.v1"
}]
}Attach it to the EC2 instance role, or to the IAM user whose keys you pass in.
2. Run it
On EC2 with the policy above, no keys are needed:
docker run -d --name awswsa-mcp -p 127.0.0.1:8080:8080 \
-e AWS_REGION=eu-west-1 \
-e AWSWSA_BEARER_TOKEN="$(openssl rand -hex 24)" \
ghcr.io/mirecekd/awswsa-mcp:latestWith keys instead (any of these, in this order of precedence):
# environment, including temporary session credentials
docker run ... -e AWS_ACCESS_KEY_ID=... -e AWS_SECRET_ACCESS_KEY=... -e AWS_SESSION_TOKEN=... ...
# files (Docker or Compose secrets), nothing visible in `docker inspect`
docker run ... -v ./secrets:/run/secrets:ro \
-e AWS_ACCESS_KEY_ID_FILE=/run/secrets/access_key \
-e AWS_SECRET_ACCESS_KEY_FILE=/run/secrets/secret_key ...
# a shared profile
docker run ... -v ./aws-config:/app/aws:ro -e AWS_CONFIG_FILE=/app/aws/config -e AWS_SHARED_CREDENTIALS_FILE=/app/aws/credentials -e AWS_PROFILE=my-profile ...When none of them is set, boto3 falls back to the EC2 instance profile. On a plain Docker host the instance metadata endpoint must be reachable from the container (IMDSv2 hop limit of 2).
3. Connect a client
The MCP endpoint is http://<host>:8080/mcp with the header Authorization: Bearer <token>. In MCPHub add a streamable-http server with that URL and header.
π§ Configuration
Variable | Default | Meaning |
|
| Listen address |
|
| Listen port |
| empty | When set, |
| empty | Comma list of accepted |
|
| Region of the Web Search API |
| unset | Static or temporary credentials |
| unset | Read the value from a file when the plain variable is not set |
| unset | Shared credentials profile |
π§ͺ When to use it, and when not
We ran the same nine queries (English, Czech, news; five results each) through this server and through Tavily Search (default settings, no topic or date options) on 2026-12-01. It is a small, informal comparison, not a benchmark.
AWS Web Search | Tavily | |
Latency | about 0.5 s | about 1.6 s |
Publication date in the result | 41 of 45 | 0 of 45 in the default (general) mode |
English queries | good | good |
News | good, recent sources | usable, age unknown |
Czech queries | weak | good |
Tools | search only | search, extract, map, crawl, research |
Use it for English queries and news, when you want the publication date, when queries must not leave AWS, or as a second source (the two returned almost completely different domains: 4 shared of about 44).
Do not use it for Czech or other small-language queries. It returned German, French and Dutch pages for Czech questions, with or without diacritics and with
countryset. Tavily returned Czech sources.Do not expect page extraction, site mapping or crawling. Pair it with a fetch tool.
π Security
No default credentials in the image. The server uses what you give it, or the instance profile.
Least privilege: one IAM action on one resource (see Setup).
Secrets are never logged. The
*_FILEvariables keep keys out ofdocker inspect.Set
AWSWSA_BEARER_TOKENand do not publish the port. Without a token anyone who can reach the port can spend your search quota.The container runs as a non-root user.
π° Cost and limits
The first 5,000 queries per month are free, then about 7 USD per 1,000 queries. Check the AgentCore pricing for current numbers.
Default quota: 10 requests per second per Region.
Available Regions: us-east-1, us-east-2, us-west-2, eu-west-1, ap-southeast-2, ap-northeast-1.
Acceptable use: keep and show the source citation for every result you surface, and do not bulk-extract content or build a competing index.
π§ Versioning and releases
Versions are YYYYMMDD.X, the build day and the counter of that day. A push to main runs the tests, computes the next version with scripts/release.py, tags it, creates a GitHub release and publishes ghcr.io/mirecekd/awswsa-mcp:<version> and :latest for linux/amd64 and linux/arm64. See CHANGELOG.md.
π§ͺ Development
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
ruff check .
pytest -q tests scripts
python3 scripts/privacy_scan.py --tree
bash scripts/install-hooks.sh # refuses private files and key-like strings on commitThe tests need no network and no AWS account.
β Support
![]()
π License
MIT License - see the LICENSE file for details.
π€ Author
Miroslav Dvorak - mirecekd@gmail.com
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Web data for agents. Extract web pages, crawl websites, discover URLs, and search the web.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Web knowledge fetching tools for your agent.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides access to LangSearch's Web Search and Semantic Rerank APIs for AI assistants. It enables web searching with advanced filtering and reranking of documents based on semantic relevance.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform web searches, extract webpage content, and conduct end-to-end search-and-extract operations using multiple search providers and content extraction methods.-
- FlicenseAqualityDmaintenanceEnables MCP-compatible agents to perform web searches via the agent-web-search engine, returning ranked results with sources.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search the live web and extract readable page content as MCP tools, with ranked results, domain filters, and news support.39 npmMIT