- Explore MCP Servers
- strands-mcp-agent
Strands Mcp Agent
What is Strands Mcp Agent
Strands MCP Agent is a Streamlit application that integrates AWS Bedrock with MCP (Model Context Protocol) servers, allowing interaction with various MCP servers through a web interface using the Claude model from AWS Bedrock.
Use cases
Use cases include querying data from MCP servers, processing information using Bedrock models, real-time interaction for tool execution visualization, and developing AI agents for various applications.
How to use
To use Strands MCP Agent, clone the repository, install dependencies, configure AWS credentials, and run the application locally with Streamlit. Input the Bedrock model ID and the MCP server package name, then submit your queries to interact with the agent.
Key features
Key features include integration with Strands agents for AI development, support for any MCP server via stdio protocol, a user-friendly Streamlit web interface, real-time streaming of agent responses, AWS Bedrock integration for intelligent responses, and detailed tracing with Langfuse.
Where to use
Strands MCP Agent can be used in fields such as AI development, data analysis, and any domain requiring interaction with specialized tools and data sources through an MCP server.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Strands Mcp Agent
Strands MCP Agent is a Streamlit application that integrates AWS Bedrock with MCP (Model Context Protocol) servers, allowing interaction with various MCP servers through a web interface using the Claude model from AWS Bedrock.
Use cases
Use cases include querying data from MCP servers, processing information using Bedrock models, real-time interaction for tool execution visualization, and developing AI agents for various applications.
How to use
To use Strands MCP Agent, clone the repository, install dependencies, configure AWS credentials, and run the application locally with Streamlit. Input the Bedrock model ID and the MCP server package name, then submit your queries to interact with the agent.
Key features
Key features include integration with Strands agents for AI development, support for any MCP server via stdio protocol, a user-friendly Streamlit web interface, real-time streaming of agent responses, AWS Bedrock integration for intelligent responses, and detailed tracing with Langfuse.
Where to use
Strands MCP Agent can be used in fields such as AI development, data analysis, and any domain requiring interaction with specialized tools and data sources through an MCP server.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Strands MCP エージェント
あなたの好きなMCPサーバーを設定できる! AWS発のOSS「Strands Agents SDK」で作ったAIエージェントWebアプリです。
概要
このアプリケーションは、AWS BedrockのClaudeモデルを使用して、様々なMCPサーバーとWebインターフェース経由で対話できるようにします。stdioプロトコルをサポートする任意のMCPサーバーに接続し、専門的なツールやデータソースにアクセスできます。
機能
- 🤖 Strandsエージェント統合: AIエージェント構築のためのStrandsフレームワークを活用
- 🔌 MCPサーバーサポート: stdioプロトコル経由で任意のMCPサーバーに接続
- 🌐 Streamlit Webインターフェース: エージェントと対話するための使いやすいWebインターフェース
- ⚡ リアルタイムストリーミング: ツール実行の可視化とともにエージェントの応答をライブストリーミング
- 🛠️ AWS Bedrock統合: AWS BedrockのClaudeモデルを活用してインテリジェントな応答を生成
- 📊 Langfuseトレース: Langfuseによる詳細なトレースと観測機能
前提条件
- Python 3.10以上
- Bedrockアクセス権限を持つAWSアカウント
- 設定済みのAWS認証情報
- 使用したいMCPサーバーへのアクセス
インストール
- リポジトリをクローン:
git clone https://github.com/yourusername/strands-mcp-agent.git
cd strands-mcp-agent
- 依存関係をインストール:
pip install -r requirements.txt
設定
AWS認証情報
ローカル開発の場合、以下のいずれかの方法でAWS認証情報を設定します:
- AWS CLI設定:
aws configure
- 環境変数:
export AWS_ACCESS_KEY_ID="your-access-key-id"
export AWS_SECRET_ACCESS_KEY="your-secret-access-key"
export AWS_DEFAULT_REGION="us-west-2"
Streamlit Community Cloudへのデプロイ
Streamlit Community Cloudにデプロイする場合:
- Streamlit Community Cloudでアプリの設定に移動
- 「Secrets」セクションに移動
- 以下のシークレットを追加:
[aws]
AWS_ACCESS_KEY_ID = "your-access-key-id"
AWS_SECRET_ACCESS_KEY = "your-secret-access-key"
AWS_DEFAULT_REGION = "us-west-2"
[langfuse]
LANGFUSE_PUBLIC_KEY = "your-langfuse-public-key"
LANGFUSE_SECRET_KEY = "your-langfuse-secret-key"
LANGFUSE_HOST = "https://us.cloud.langfuse.com"
使い方
ローカル開発
アプリケーションをローカルで実行:
streamlit run main.py
アプリケーションの使用
- モデルID: BedrockモデルIDを入力(デフォルト:
us.anthropic.claude-3-7-sonnet-20250219-v1:0) - パッケージマネージャー: uvxまたはnpxを選択
- MCPサーバー: 選択したパッケージマネージャー用のMCPサーバーパッケージ名を指定(例:
awslabs.aws-documentation-mcp-server@latest) - 質問: クエリを入力
- 「質問する」をクリックして送信
エージェントは以下を実行します:
- 指定されたMCPサーバーに接続
- 選択したBedrockモデルを使用してクエリを処理
- リアルタイムで応答をストリーミング
- ツールの実行を発生時に表示
サポートされているMCPサーバー
このアプリケーションは、stdioプロトコルをサポートする任意のMCPサーバーに接続できます。
uvxパッケージの例:
awslabs.aws-documentation-mcp-server@latest- AWSドキュメント検索
npxパッケージの例:
@modelcontextprotocol/server-filesystem- ファイルシステムアクセス@modelcontextprotocol/server-github- GitHub統合
Streamlit Community Cloudへのデプロイ
- コードをGitHubにプッシュ
- share.streamlit.ioにアクセス
- 「New app」をクリック
- GitHubリポジトリを接続
- デプロイ設定:
- リポジトリ:
yourusername/strands-mcp-agent - ブランチ:
main - メインファイルパス:
main.py
- リポジトリ:
- アプリ設定でAWSシークレットを追加(設定セクションを参照)
- 「Deploy」をクリック
観測性とトレース
このアプリケーションはLangfuseと統合されており、すべてのエージェントの動作をトレースできます。Langfuseダッシュボードで以下の情報を確認できます:
- エージェントの実行トレース
- モデルの入出力
- ツールの実行履歴
- レイテンシとパフォーマンスメトリクス
- コストの追跡
Langfuseの設定
- Langfuseでアカウントを作成
- プロジェクトを作成してAPIキーを取得
- Streamlit secretsにLangfuse認証情報を追加(上記の設定セクションを参照)
セキュリティに関する考慮事項
- AWS認証情報をリポジトリにコミットしない
- 機密情報にはStreamlitシークレットを使用
- AWS IAMユーザーにはBedrockに必要な権限のみを付与
- デプロイ前にMCPサーバーの権限を確認
- Langfuseの認証情報も同様に保護
トラブルシューティング
よくある問題
- AWS認証情報エラー: AWS認証情報が正しく設定されているか確認
- Bedrockアクセス拒否: AWSアカウントが指定されたBedrockモデルにアクセスできるか確認
- MCPサーバー接続失敗: MCPサーバーパッケージ名が正しく、アクセス可能か確認
デバッグモード
デバッグのために、追加のログを有効にしてStreamlitを実行:
streamlit run main.py --logger.level=debug
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
このプロジェクトはMITライセンスの下でライセンスされています - 詳細はLICENSEファイルを参照してください。
謝辞
- Strands - エージェントフレームワーク
- MCP - Model Context Protocol
- AWS Bedrock - マネージドAIサービス
- Streamlit - Webアプリフレームワーク
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










