
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
이 프로젝트는 Chainlit 및 MCP (모델 Context Protocol) 서버를 사용하여 Amazon Bedrock에 기반 모델을 통합하는 방법을 설명합니다. 툴 enhanced과 대화 인터페이스를 만들려면 ...
개요
이 프로젝트는 Chainlit 및 MCP (모델 Context Protocol) 서버를 사용하여 Amazon Bedrock에 기반 모델을 통합하는 방법을 설명합니다. 툴 enhanced 기능과 대화 인터페이스를 만듭니다. - Anthropic Claude 3.7를 사용하여 Amazon Bedrock과 통합 Sonnet - 대화 형 AI 상호 작용을위한 Chainlit 웹 인터페이스 - 기본 수학 작업을 수행하는 사용자 정의 모델 Context Protocol (MCP) 서버 - 부드러운 사용자 경험을위한 스트리밍 응답 - MCP 어댑터와 LangChain 통합 외부 도구를 연결하는 - 랭그라프 (Reasoning and Acting) 오케스트라트 도구 사용 에이전트 시작하기 전에, 당신은 가지고: - : AWS 계정이 Bedrock 액세스가 필요합니다. : AWS 계정이 Anthropic Claude 3.7 Sonnet 모델에 액세스해야 합니다. : 적절한 자격 증명 및 권한으로 구성 - : 이 프로젝트는 Python 3.13 또는 newer가 필요합니다. : 의존성 관리 및 건물 (ip install uv) 2. 명세.
개요(AI 번역)
이 프로젝트는 Chainlit 및 MCP (모델 Context Protocol) 서버를 사용하여 Amazon Bedrock에 기반 모델을 통합하는 방법을 설명합니다. 툴 enhanced 기능과 대화 인터페이스를 만듭니다.
프로젝트 개요
이 표본 신청 진열장:
- Anthropic Claude 3.7 Sonnet을 사용하여 Amazon Bedrock과 통합
- 대화 형 AI 상호 작용을위한 Chainlit 웹 인터페이스
- 기본 수학 작업을 수행하는 사용자 정의 모델 Context Protocol (MCP) 서버
- 원활한 사용자 경험을 위한 스트리밍 응답
- MCP 어댑터와 LangChain 통합은 외부 도구를 연결
- ReAct (Reasoning and Acting) 를 생성하기 위한 LangGraph
필수품
시작하기 전에, 당신은 가지고:
- AWS 계정: AWS 계정이 필요합니다. Bedrock 액세스
- Bedrock Access: AWS 계정이 Anthropic Claude 3.7 Sonnet 모델에 접근할 수 있도록 합니다.
- AWS CLI: 적절한 자격 및 권한으로 구성 -Python 3.13+: 이 프로젝트는 Python 3.13 또는 newer를 요구합니다.
- **UV **: 의존성 관리 및 건물 ([T0]로 설치)
설치
-
저장소를 복제:
-
명세.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Amazon Bedrock and MCP Server integration, the easy way
This project demonstrates how to integrate foundation models on Amazon Bedrock with Chainlit and MCP (Model Context Protocol) servers to create an interactive chat interface with tool-enhanced capabilities.
Project Overview
This sample application showcases:
- Integration with Amazon Bedrock using Anthropic Claude 3.7 Sonnet
- A Chainlit web interface for conversational AI interactions
- A custom Model Context Protocol (MCP) server that performs basic math operations
- Streaming responses for a smooth user experience
- LangChain integration with MCP adapters to connect external tools
- LangGraph for creating a ReAct (Reasoning and Acting) agent that orchestrates tool use
Prerequisites
Before getting started, ensure you have:
- AWS Account: You’ll need an AWS account with Bedrock access
- Bedrock Access: Ensure your AWS account has access to the Anthropic Claude 3.7 Sonnet model
- AWS CLI: Configured with appropriate credentials and permissions
- Python 3.13+: This project requires Python 3.13 or newer
- UV: For dependency management and building (install with
pip install uv)
Installation
-
Clone the repository:
git clone https://github.com/aws-samples/sample-bedrock-mcp.git cd sample-bedrock-chainlit-mcp -
Create a virtual environment and install dependencies using UV:
uv sync --all-groups -
Configure AWS credentials (if not already done):
aws configure
Building from Source
To build the project from source using UV:
-
Build the package:
uv build
This will create distribution files in the dist/ directory, including the wheel file dist/sample_bedrock_chainlit_mcp-0.1.0-py3-none-any.whl that can be installed or used directly as the MCP server.
Usage Guide
Starting the Chainlit Application
To start the Chainlit application:
chainlit run src/ui/app.py
This will launch a web server (typically at ) with the chat interface.
Setting up the MCP Server
The Math MCP server needs to be connected to provide calculation capabilities:
- In the Chainlit web interface, look for the small plug icon under the chat text input element
- Click on it to open the MCP connection dialog
- Enter the following details:
- Name:
math - Command:
uvx dist/sample_bedrock_chainlit_mcp-0.1.0-py3-none-any.whl - Type: default (stdio)
- Name:
- Click “Confirm”
A successful connection will be indicated in the interface, and the math tools will become available to the Claude model.
Example Usage
Once the Chainlit application is running and the MCP server is connected, you can ask mathematical questions like:
- “What’s (3 + 5) x 12?”
- “Can you calculate 144 divided by 12?”
- “If I have 7 apples and get 9 more, then give 4 away, how many do I have left?”
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →