Installation¶
This guide covers how to install and set up AWS Logs MCP for both one-click installation in VS Code and manual installation.
Installation Options¶
Choose your preferred AI assistant and installation method:
VSCode¶
One-click installation¶
Direct terminal command¶
# With AWS profile (recommended)
AWS_PROFILE=your-profile-name npx -y aws-logs-mcp --stdio
VS Code extension MCP configuration¶
{
"name": "aws-logs",
"displayName": "AWS Logs MCP",
"command": "npx",
"args": ["-y", "aws-logs-mcp", "--stdio"],
"env": {
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1"
}
}
Claude Code¶
# Install the aws-logs MCP tool in Claude Code
claude mcp add aws-logs -s user -- npx -y aws-logs-mcp --stdio
GitHub Copilot and other MCP-compatible assistants¶
# Run with stdio mode (recommended for AI assistants)
npx aws-logs-mcp --stdio
Claude Desktop¶
For Claude Desktop, follow the MCP Quickstart for Users and add AWS Logs MCP as a custom tool.
{
"name": "aws-logs",
"displayName": "AWS Logs MCP",
"command": "npx",
"args": ["-y", "aws-logs-mcp", "--stdio"],
"env": {
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1"
}
}
Manual Installation¶
If you need more control or want to customize your installation, you can choose one of the manual installation methods below. These methods provide the same functionality as the one-click installation but allow for more advanced configuration options.
The one-click installation above takes care of the AWS authentication automatically based on your input. For manual installation, you'll configure these options in your .env
file as described in the Configuration guide.
Prerequisites for Manual Installation¶
If you prefer to install manually, ensure you have the following installed:
- Node.js 18+ and pnpm
- AWS credentials with appropriate permissions
- Docker (optional, for containerization)
Direct Usage¶
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
.env
file with your AWS credentials. Build and start the server:¶
For HTTP mode (default):
pnpm build
pnpm start
For STDIO mode (recommended for AI assistants):
pnpm build
pnpm start:stdio
For development with hot-reloading:
# HTTP mode
pnpm dev
# STDIO mode
pnpm dev:stdio
Docker Usage¶
Build and run using Dockerfile¶
For HTTP mode:
docker build -t aws-logs-mcp .
docker run -p 3000:3000 --env-file .env aws-logs-mcp
For STDIO mode (for AI assistants):
docker build -t aws-logs-mcp .
docker run -i --env-file .env aws-logs-mcp --stdio
Build and run using Docker compose¶
For HTTP mode:
docker-compose up -d --build
docker-compose run -T --build aws-logs-mcp --stdio