aws-knowledge-tool

CLI tool for querying AWS Knowledge MCP Server - search, read, and discover AWS documentation
Table of Contents
About
aws-knowledge-tool is a CLI-first tool that provides programmatic access to AWS documentation through the AWS Knowledge MCP Server. It features an agent-friendly design with composable commands, structured output, and pipeline support.
What is AWS Knowledge MCP Server?
The AWS Knowledge MCP Server is a remote MCP (Model Context Protocol) server that provides access to:
- AWS Documentation
- AWS Blogs
- AWS Solutions Library
- AWS Architecture Center
- AWS Prescriptive Guidance
Server: https://knowledge-mcp.global.api.aws
Protocol: MCP (JSON-RPC 2.0 over HTTP)
Authentication: None (public, rate-limited)
Why CLI-First?
- Agent-Friendly: Structured commands and error messages enable AI agents (Claude Code, etc.) to reason and act effectively
- Composable: JSON output and stderr separation allow easy piping and integration
- Reusable: Commands serve as building blocks for skills, automation, and workflows
- Reliable: Type-safe, tested, and predictable behavior
Features
- 🔍 Search - Search AWS documentation with pagination
- 📖 Read - Fetch and convert AWS docs to markdown
- 💡 Recommend - Discover related documentation
- 📊 Multi-Level Verbosity - Progressive logging detail (-v/-vv/-vvv)
- 🐚 Shell Completion - Tab completion for bash, zsh, and fish
- 🔒 Security Scanning - Automated secret detection, code security, and dependency checks
- 🤖 Agent-Friendly - Structured JSON output, clear error messages
- 🔗 Composable - Stdin support for pipeline workflows
- 📋 Multiple Formats - JSON and markdown output
- 🎯 Type-Safe - Strict mypy checks, comprehensive type hints
- ✅ Well-Tested - Pytest suite with quality checks
Installation
Prerequisites
- Python 3.14+
- uv package manager
Install Globally
# Clone and install
git clone https://github.com/dnvriend/aws-knowledge-tool.git
cd aws-knowledge-tool
uv tool install .
# Verify installation
aws-knowledge-tool --version
# Optional: Install shell completion
eval "$(aws-knowledge-tool completion bash)" # For bash
eval "$(aws-knowledge-tool completion zsh)" # For zsh
Quick Start
# Search AWS documentation
aws-knowledge-tool search "Lambda function URLs"
# Read a documentation page
aws-knowledge-tool read "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"
# Get recommendations
aws-knowledge-tool recommend "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html" --type new
# Pipeline composition
aws-knowledge-tool search "Lambda" --json | jq -r '.[0].url' | aws-knowledge-tool read --stdin
Commands
search - Search AWS Documentation
aws-knowledge-tool search QUERY [OPTIONS]
Options:
-l, --limit INTEGER Maximum results (default: 10)
-o, --offset INTEGER Skip first N results (default: 0)
--json Output JSON format
--stdin Read query from stdin
-v, --verbose Enable verbose output (use -v for INFO, -vv for DEBUG, -vvv for TRACE)
-q, --quiet Suppress non-essential output
Examples:
# Basic search
aws-knowledge-tool search "S3 versioning" --limit 5
# With INFO logging (-v)
aws-knowledge-tool search "DynamoDB" -v
# With DEBUG logging and full tracebacks (-vv)
aws-knowledge-tool search "Lambda" -vv
# With TRACE logging (includes library internals) (-vvv)
aws-knowledge-tool search "RDS" -vvv
# JSON output for pipelines
aws-knowledge-tool search "Lambda" --json
# Read from stdin
echo "Lambda" | aws-knowledge-tool search --stdin
read - Read AWS Documentation
aws-knowledge-tool read URL [OPTIONS]