{"id":37798234,"url":"https://github.com/poad/aws-mcp-lambda-server","last_synced_at":"2026-01-16T15:23:19.174Z","repository":{"id":293793669,"uuid":"976415587","full_name":"poad/aws-mcp-lambda-server","owner":"poad","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-10T02:26:19.000Z","size":2379,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T00:28:27.967Z","etag":null,"topics":["aws-cdk-typescript","aws-lambda","awscdk","awscdk-app-ts","mcp-server","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-02T04:27:07.000Z","updated_at":"2026-01-10T02:26:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed62794c-fa00-4b19-8b5a-fa333609079d","html_url":"https://github.com/poad/aws-mcp-lambda-server","commit_stats":null,"previous_names":["poad/aws-mcp-lambda-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poad/aws-mcp-lambda-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poad%2Faws-mcp-lambda-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poad%2Faws-mcp-lambda-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poad%2Faws-mcp-lambda-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poad%2Faws-mcp-lambda-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poad","download_url":"https://codeload.github.com/poad/aws-mcp-lambda-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poad%2Faws-mcp-lambda-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-cdk-typescript","aws-lambda","awscdk","awscdk-app-ts","mcp-server","typescript"],"created_at":"2026-01-16T15:23:18.465Z","updated_at":"2026-01-16T15:23:19.162Z","avatar_url":"https://github.com/poad.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS MCP Lambda Server\n\nAWS Lambda上で動作するModel Context Protocol (MCP) サーバーの実装です。このプロジェクトは、MCPサーバーをAWSのサーバーレス環境で実行し、Claude DesktopなどのMCPクライアントと連携できるようにします。\n\n## プロジェクト構成\n\n```text\naws-mcp-lambda-server/\n├── platform/                    # AWS CDKインフラストラクチャとLambda関数\n│   ├── bin/                     # CDKアプリケーションエントリーポイント\n│   ├── lib/                     # CDKスタック定義\n│   ├── lambda/                  # Lambda関数のソースコード\n│   │   ├── mcp-server/         # MCPサーバー実装\n│   │   │   ├── tools/          # MCPツール（WeatherTool等）\n│   │   │   ├── index.ts        # Lambda関数エントリーポイント\n│   │   │   ├── mcp-server.ts   # MCPサーバー設定\n│   │   │   └── server.ts       # 開発用サーバー\n│   │   ├── authorize.ts        # OAuth認証処理\n│   │   ├── token.ts           # トークン管理\n│   │   ├── revoke.ts          # トークン無効化\n│   │   ├── clients.ts         # クライアント管理\n│   │   └── utils.ts           # ユーティリティ関数\n│   └── package.json\n├── example/                     # サンプルクライアントアプリケーション\n│   └── client/                 # Next.jsベースのWebクライアント\n│       ├── src/                # クライアントソースコード\n│       └── package.json\n├── .github/workflows/          # GitHub Actions CI/CD設定\n│   ├── ci.yml                 # ビルド・テスト\n│   ├── deploy.yml             # AWS デプロイ\n│   ├── codeql-analysis.yml    # セキュリティ分析\n│   └── auto-merge.yml         # 自動マージ\n└── package.json               # ルートパッケージ設定\n```\n\n## 主な機能\n\n### MCPサーバー機能\n\n- **天気予報ツール**: 指定した都市の天気情報を取得\n- **HTTP API**: Hono.jsベースのRESTful API\n- **認証**: AWS Cognito OAuth 2.0認証\n- **サーバーレス**: AWS Lambda上で動作\n\n### インフラストラクチャ\n\n- **AWS CDK**: Infrastructure as Code\n- **AWS Lambda**: サーバーレス実行環境\n- **AWS Cognito**: ユーザー認証・認可\n- **AWS DynamoDB**: データストレージ\n- **AWS API Gateway**: HTTPエンドポイント\n\n### 開発・運用\n\n- **TypeScript**: 型安全な開発\n- **ESLint**: コード品質管理\n- **Vitest**: テストフレームワーク\n- **GitHub Actions**: CI/CD パイプライン\n\n## 前提条件\n\n- Node.js 22.x\n- pnpm 10.14.0+\n- AWS CLI設定済み\n- AWS CDK CLI\n\n## セットアップ\n\n### 1. リポジトリのクローン\n\n```bash\ngit clone https://github.com/poad/aws-mcp-lambda-server.git\ncd aws-mcp-lambda-server\n```\n\n### 2. 依存関係のインストール\n\n```bash\npnpm install\n```\n\n### 3. プロジェクトのビルド\n\n```bash\npnpm run build\n```\n\n## デプロイ\n\n### AWS環境へのデプロイ\n\n```bash\ncd platform\nnpx cdk deploy --all\n```\n\n### 設定オプション\n\nCDKコンテキストで以下の設定が可能です：\n\n```bash\n# プロジェクト名の設定\nnpx cdk deploy -c project-name=my-mcp-server\n\n# 認証の有効化\nnpx cdk deploy -c use-auth=true\n\n# ドメインの設定\nnpx cdk deploy -c domain=my-domain\n```\n\n## 開発\n\n### ローカル開発サーバーの起動\n\n```bash\ncd platform\npnpm run dev\n```\n\n### テストの実行\n\n```bash\npnpm run test\n```\n\n### リンティング\n\n```bash\npnpm run lint\npnpm run lint-fix  # 自動修正\n```\n\n## MCPツールの追加\n\n新しいMCPツールを追加するには：\n\n1. `platform/lambda/mcp-server/tools/` に新しいツールファイルを作成\n2. `platform/lambda/mcp-server/mcp-server.ts` でツールを登録\n\n例：\n\n```typescript\n// tools/MyTool.ts\ninterface MyToolInput {\n  message: string;\n}\n\nasync function handler(args: MyToolInput): Promise\u003c{\n  content: { type: 'text', text: string }[]\n}\u003e {\n  return {\n    content: [\n      {\n        type: 'text',\n        text: `処理結果: ${args.message}`,\n      },\n    ],\n  };\n}\n\nexport default handler;\n```\n\n```typescript\n// mcp-server.ts\nimport myTool from './tools/MyTool.js';\n\nserver.tool(\n  'my_tool',\n  'カスタムツールの説明',\n  { message: z.string().describe('メッセージ') },\n  myTool,\n);\n```\n\n## Claude Desktopとの連携\n\n### 設定ファイルの場所\n\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`\n\n### 設定例\n\n```json\n{\n  \"mcpServers\": {\n    \"aws-mcp-lambda-server\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/aws-mcp-lambda-server/platform/lambda/mcp-server/dist/index.js\"]\n    }\n  }\n}\n```\n\n## サンプルクライアント\n\n`example/client/` にNext.jsベースのWebクライアントが含まれています。\n\n### クライアントの起動\n\n```bash\ncd example/client\npnpm install\npnpm run dev\n```\n\n## 認証設定\n\nAWS Cognitoを使用したOAuth 2.0認証をサポートしています。\n\n### 認証フロー\n\n1. クライアントがCognitoの認証エンドポイントにリダイレクト\n2. ユーザーがログイン\n3. 認証コードを取得してアクセストークンと交換\n4. MCPサーバーAPIへのアクセス時にトークンを使用\n\n## CI/CD\n\nGitHub Actionsを使用した自動化：\n\n- **CI**: プルリクエスト時の自動ビルド・テスト\n- **CD**: mainブランチへのマージ時の自動デプロイ\n- **セキュリティ**: CodeQL分析\n- **依存関係**: Dependabot自動更新\n\n## ライセンス\n\nMIT License\n\n## 作者\n\nKenji Saito\n\n## コントリビューション\n\n1. このリポジトリをフォーク\n2. フィーチャーブランチを作成 (`git checkout -b feature/amazing-feature`)\n3. 変更をコミット (`git commit -m 'Add some amazing feature'`)\n4. ブランチにプッシュ (`git push origin feature/amazing-feature`)\n5. プルリクエストを作成\n\n## 参考資料\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [AWS CDK Documentation](https://docs.aws.amazon.com/cdk/)\n- [Hono.js Documentation](https://hono.dev/)\n- [AWS Lambda Documentation](https://docs.aws.amazon.com/lambda/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoad%2Faws-mcp-lambda-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoad%2Faws-mcp-lambda-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoad%2Faws-mcp-lambda-server/lists"}