サンプル S3 モデル コンテキスト プロトコル サーバー
概要
Sample MCP Server S3とは?
Sample MCP Server S3は、GitHub上の組織### aws-samplesがホストする公開リポジトリです。このプロジェクトは、Amazon S3(Simple Storage Service)と対話するサーバーを実装する方法を示すデモンストレーションとして機能し、ベストプラクティスを紹介し、S3をアプリケーションに統合しようとする開発者向けのサンプルコードを提供します。リポジトリには、コードスニペット、ドキュメント、S3をストレージソリューションとして効果的に使用する方法を理解するのに役立つ例など、さまざまなリソースが含まれています。
Sample MCP Server S3の特徴
- Amazon S3との統合:このプロジェクトは、S3とシームレスに接続し、ファイルのアップロード、ダウンロード、管理を簡単に行える方法を提供します。
- 公開アクセス:公開リポジトリであるため、開発者はコードにアクセスし、貢献し、提供された例から学ぶことができます。
- ドキュメント:サーバーのセットアップと使用方法をガイドする包括的なドキュメントが含まれています。
- コミュニティサポート:AWSサンプルの一部として、コミュニティの貢献やフィードバックを受けて機能性と使いやすさが向上しています。
- オープンソース:このプロジェクトはオープンソースであり、開発者は特定のニーズに合わせてコードを修正・適応することができます。
Sample MCP Server S3の使用方法
-
リポジトリをクローンする:次のコマンドを使用して、リポジトリをローカルマシンにクローンします。
git clone https://github.com/aws-samples/sample-mcp-server-s3.git
-
AWS資格情報を設定する:AWS資格情報が設定されていることを確認します。これは、AWS CLIを設定するか、アプリケーションの設定で資格情報を提供することで行えます。
-
依存関係をインストールする:プロジェクトディレクトリに移動し、必要な依存関係をインストールします。通常、次のコマンドを実行します。
npm install
-
サーバーを実行する:次のコマンドを使用してサーバーを起動します。
npm start
-
アプリケーションにアクセスする:サーバーが実行されているとき、ウェブブラウザまたはAPIクライアントを通じてアプリケーションにアクセスし、S3と対話できます。
-
コードを探る:提供された例やドキュメントを確認して、さまざまな機能や機能を実装する方法を理解します。
よくある質問
Amazon S3とは?
Amazon S3(Simple Storage Service)は、AWSが提供するスケーラブルなオブジェクトストレージサービスで、ユーザーがウェブ上のどこからでも任意の量のデータを保存および取得できるようにします。バックアップ、アーカイブ、ウェブアプリケーションのデータストレージに広く使用されています。
Sample MCP Server S3は無料で使用できますか?
はい、Sample MCP Server S3はオープンソースプロジェクトであり、無料で使用できます。ただし、使用状況に応じてS3などのAWSサービスを利用する際にコストが発生する可能性があります。
Sample MCP Server S3に貢献できますか?
もちろんです!貢献は歓迎されます。リポジトリをフォークし、変更を加え、レビューのためにプルリクエストを提出できます。
AWS S3に関する詳細情報はどこで見つけられますか?
AWS S3に関する詳細情報は、公式AWSドキュメントで見つけることができます。これには、S3を効果的に使用するための詳細なガイド、APIリファレンス、およびベストプラクティスが含まれています。
詳細
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
- Obtain AWS access key ID, secret access key, and region from the AWS Management Console and configure credentials files using Default profile as shown here
- Ensure these credentials have appropriate permission READ/WRITE permissions for 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
{
"mcpServers": {
"s3-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/Users/user/generative_ai/model_context_protocol/s3-mcp-server",
"run",
"s3-mcp-server"
]
}
}
}
</details>
<details>
<summary>Published Servers Configuration</summary>
{
"mcpServers": {
"s3-mcp-server": {
"command": "uvx",
"args": [
"s3-mcp-server"
]
}
}
}
</details>
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/
directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--token
orUV_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
See CONTRIBUTING for more information.
License
This library is licensed under the MIT-0 License. See the LICENSE file.
サーバー設定
{
"mcpServers": {
"sample-mcp-server-s-3": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--aws-samples--sample-mcp-server-s3--sample-mcp-server-s-3",
"s3-mcp-server"
],
"env": {}
}
}
}