AS

aws-samples/sample-mcp-server-s3

Productivity workflow公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

79 stars 19 forks 品質 72 トレンド 0MIT-0

aws-samples/sample-mcp-server-s3 は [https://github.com/aws-samples/sample-mcp-server-s3. からインポートされた MCP サーバーの候補です

概要

aws-samples/sample-mcp-server-s3 は [https://github.com/aws-samples/sample-mcp-server-s3. からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

S3 から PDF などのデータを取得するための MCP サーバーの実装。

##特徴

リソース

Resources で AWS S3 データを公開します。(GET エンドポイントのようなデータを考えると、LM のコンテキストに情報を読み込みます)。 現在、PDF ドキュメントがサポートされ、1000 オブジェクトに限定されています。

ツール

  • ListBuckets
  • 要求の認証された送信者が所有するすべてのバケットのリストを返します
  • ListObjectsV2
  • リクエストごとに Bucket 内のオブジェクトの一部または全部(1,000 まで)を返します。
  • GetObject
  • Amazon S3からオブジェクトを取得します。 GetObject リクエストでは、オブジェクトのフルキー名を指定します。 汎用バケット - バーチャルホスト型リクエストとパススタイルのリクエストの両方がサポートされています

設定

##AWS 認証情報の設定 1。 AWS管理コンソールからAWSアクセスキーID、シークレットアクセスキー、および領域を取得します。 2。 これらの資格情報はAWS S3の適切な権限を持っていることを確認してください。

##Claudeデスクトップでの使用

####Claudeデスクトップ

MacOSの場合: [~/Library/Application\ Support/Claude/claude_desktop_config.json Windowsの場合: [[T1]

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Sample S3 Model Context Protocol Server

An MCP server implementation for retrieving data such as PDF’s from S3.

Features

Resources

Expose AWS S3 Data through Resources. (think of these sort of like GET endpoints; they are used to load information into the LLM’s context). Currently only PDF documents supported and limited to 1000 objects.

Tools

  • ListBuckets
    • Returns a list of all buckets owned by the authenticated sender of the request
  • ListObjectsV2
    • Returns some or all (up to 1,000) of the objects in a bucket with each request
  • GetObject
    • Retrieves an object from Amazon S3. In the GetObject request, specify the full key name for the object. General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported

Configuration

Setting up AWS Credentials

  1. Obtain AWS access key ID, secret access key, and region from the AWS Management Console.
  2. Ensure these credentials have appropriate permissions for AWS S3.

Usage with Claude Desktop

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You’ll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/user/generative_ai/model_context_protocol/s3-mcp-server run s3-mcp-server

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Security

GitHub で README 全文を見る

インストール

uvx s3-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "s3-mcp-server": { "command": "uv", "args": [ "--directory", "/Users/user/generative_ai/model_context_protocol/s3-mcp-server", "run", "s3-mcp-server" ] } } }