Skip to content

Deployment: Dockerfile and Smithery config #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Stage 1: Build the TypeScript source
FROM node:lts-alpine AS builder
WORKDIR /app
# Install dependencies without running build scripts
COPY package.json package-lock.json tsconfig.json ./
RUN npm ci --ignore-scripts
# Copy all source files
COPY . .
# Build the project
RUN npm run build

# Stage 2: Create minimal runtime image
FROM node:lts-alpine
WORKDIR /app
# Install only production dependencies without running scripts
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts
# Copy built files
COPY --from=builder /app/build ./build
# Default entrypoint
ENTRYPOINT ["node", "build/index.js"]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# AWS Cognito MCP Server
[![smithery badge](https://smithery.ai/badge/@gitCarrot/mcp-server-aws-cognito)](https://smithery.ai/server/@gitCarrot/mcp-server-aws-cognito)

A Model Context Protocol (MCP) server implementation that connects to AWS Cognito for authentication and user management. This server provides a set of tools for user authentication flows including sign-up, sign-in, password management, and more.

## Prerequisites
Expand All @@ -8,6 +10,15 @@ A Model Context Protocol (MCP) server implementation that connects to AWS Cognit

## Installation

### Installing via Smithery

To install AWS Cognito MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@gitCarrot/mcp-server-aws-cognito):

```bash
npx -y @smithery/cli install @gitCarrot/mcp-server-aws-cognito --client claude
```

### Manual Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/mcp-server-aws-cognito.git
Expand Down Expand Up @@ -109,4 +120,3 @@ npm run inspector
```

Now you can use the AWS Cognito authentication tools with Claude!

31 changes: 31 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- awsCognitoUserPoolId
- awsCognitoUserPoolClientId
properties:
awsCognitoUserPoolId:
type: string
description: Cognito User Pool ID
awsCognitoUserPoolClientId:
type: string
description: Cognito App Client ID
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => ({
command: 'node',
args: ['build/index.js'],
env: {
AWS_COGNITO_USER_POOL_ID: config.awsCognitoUserPoolId,
AWS_COGNITO_USER_POOL_CLIENT_ID: config.awsCognitoUserPoolClientId
}
})
exampleConfig:
awsCognitoUserPoolId: us-east-1_ABCDefghi
awsCognitoUserPoolClientId: 1h2g3f4e5d6c7b8a9