npm package: @schuettc/aws-logs-mcp
Description: Model Context Protocol (MCP) server for AWS Logs and CloudTrail Events
Author: schuettc
Latest version: 0.0.2

# AWS Logs MCP

A Model Context Protocol (MCP) server that enables AI assistants to securely access and query AWS CloudWatch Logs and CloudTrail Events. Simplify troubleshooting and monitoring by giving your AI assistants direct, secure access to your AWS logs and events in near real-time.

## Quick Installation

Get started in seconds with one-click installation in VS Code:

[![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=aws-logs&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_credentials_method%22%2C%22description%22%3A%22AWS%20Authentication%20Method%22%2C%22options%22%3A%5B%22IAM%20Credentials%22%2C%22AWS%20Profile%22%5D%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_profile%22%2C%22description%22%3A%22AWS%20Profile%20Name%22%2C%22default%22%3A%22default%22%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'AWS%20Profile'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_access_key_id%22%2C%22description%22%3A%22AWS%20Access%20Key%20ID%22%2C%22password%22%3Atrue%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'IAM%20Credentials'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_secret_access_key%22%2C%22description%22%3A%22AWS%20Secret%20Access%20Key%22%2C%22password%22%3Atrue%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'IAM%20Credentials'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_region%22%2C%22description%22%3A%22AWS%20Region%22%2C%22default%22%3A%22us-east-1%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40schuettc%2Faws-logs-mcp%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22%24%7Binput%3Aaws_profile%7D%22%2C%22AWS_ACCESS_KEY_ID%22%3A%22%24%7Binput%3Aaws_access_key_id%7D%22%2C%22AWS_SECRET_ACCESS_KEY%22%3A%22%24%7Binput%3Aaws_secret_access_key%7D%22%2C%22AWS_REGION%22%3A%22%24%7Binput%3Aaws_region%7D%22%7D%7D) [![Install with Docker in VS Code](https://img.shields.io/badge/VS_Code-Docker-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=aws-logs&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_credentials_method%22%2C%22description%22%3A%22AWS%20Authentication%20Method%22%2C%22options%22%3A%5B%22IAM%20Credentials%22%2C%22AWS%20Profile%22%5D%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_profile%22%2C%22description%22%3A%22AWS%20Profile%20Name%22%2C%22default%22%3A%22default%22%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'AWS%20Profile'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_access_key_id%22%2C%22description%22%3A%22AWS%20Access%20Key%20ID%22%2C%22password%22%3Atrue%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'IAM%20Credentials'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_secret_access_key%22%2C%22description%22%3A%22AWS%20Secret%20Access%20Key%22%2C%22password%22%3Atrue%2C%22when%22%3A%22%24%7Binput%3Aaws_credentials_method%7D%20%3D%3D%20'IAM%20Credentials'%22%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22aws_region%22%2C%22description%22%3A%22AWS%20Region%22%2C%22default%22%3A%22us-east-1%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22schuettc%2Faws-logs-mcp%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22%24%7Binput%3Aaws_profile%7D%22%2C%22AWS_ACCESS_KEY_ID%22%3A%22%24%7Binput%3Aaws_access_key_id%7D%22%2C%22AWS_SECRET_ACCESS_KEY%22%3A%22%24%7Binput%3Aaws_secret_access_key%7D%22%2C%22AWS_REGION%22%3A%22%24%7Binput%3Aaws_region%7D%22%7D%7D)

## What You Can Do

AWS Logs MCP connects your AI assistants to your AWS environment, allowing them to:

- Query CloudWatch Logs to troubleshoot application issues
- Examine CloudTrail events to understand recent AWS operations
- Analyze log patterns for error investigation
- Monitor real-time log streams during deployments

Your AWS credentials remain on your local machine and are only used for accessing AWS services.

## Deployment Options

This MCP server supports two deployment modes:

### 1. Direct stdio Integration (Recommended for Claude CLI)

Use this method for direct integration with Claude in the terminal:

```bash
# Register the MCP server with Claude
claude mcp add aws-logs -s user -- npx @schuettc/aws-logs-mcp --stdio
```

This approach is seamless - it runs the server in stdio mode without any separate process.

### 2. HTTP Server Mode (For Apps & Desktop Clients)

Run the server on a port accessible to your LLM application:

```bash
# Start the HTTP server
npx @schuettc/aws-logs-mcp

# Then register with Claude's desktop app
claude mcp add aws-logs --url http://localhost:3010/mcp
```

## AWS Authentication

During installation, you can choose your preferred authentication method:

- **AWS Profile** (recommended): Use your existing AWS CLI profiles
- **IAM Credentials**: Provide access key and secret directly
- **IAM Role**: Automatically use instance roles when running on AWS services

## Manual Installation

If you prefer to install manually:

```bash
# Clone the repository
git clone https://github.com/schuettc/aws-logs-mcp.git
cd aws-logs-mcp

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env
# Edit .env to configure your AWS credentials

# Build and start the server (HTTP mode)
pnpm build
pnpm start

# Or in stdio mode
pnpm start:stdio
```

## Development

```bash
# HTTP server mode
pnpm dev

# stdio mode
pnpm dev:stdio
```

## Documentation

For complete documentation including available tools, AWS permissions, and advanced configuration, visit our [GitHub Pages Documentation Site](https://aws-logs-mcp.subaud.io/).

## License

MIT-0