MCP ExplorerExplorer

Langgraph Mcp On Aws Bedrock

@davidshtianon a year ago
2 Apache-2.0
FreeCommunity
AI Systems
Integrate LangGraph with AWS Bedrock for building agents with MCP capabilities.

Overview

What is Langgraph Mcp On Aws Bedrock

LangGraph-MCP-on-AWS-Bedrock is a project that integrates LangGraph with AWS Bedrock to build conversational agents with Model Context Protocol (MCP) capabilities.

Use cases

Use cases include building chatbots for customer service, creating interactive educational tools, and developing agents for data retrieval and processing.

How to use

To use LangGraph-MCP-on-AWS-Bedrock, clone the repository, set up a virtual environment, install dependencies, and run the script with default or customized options.

Key features

Key features include integration with AWS Bedrock LLM models, tool usage through MCP, structured conversation workflows using LangGraph, and flexible configuration options.

Where to use

LangGraph-MCP-on-AWS-Bedrock can be used in various fields such as customer support, virtual assistants, and any application requiring conversational AI capabilities.

Content

LangGraph MCP on AWS Bedrock

Integrate LangGraph with AWS Bedrock (Converse API) for building agents with MCP capabilities.

Description

This repo implements a sample conversational agent built with LangGraph that uses AWS Bedrock and integrates with MCP for tool usage.

image

Mermaid transformed on https://excalidraw.com/ website.

Features

  • Integration with AWS Bedrock LLM models
  • Tool usage through Model Context Protocol (MCP)
  • Structured conversation workflow using LangGraph
  • Flexible configuration options

Requirements

  • Python 3.12+
  • uv tool
  • AWS credentials configured
  • LangChain and LangGraph libraries
  • Access to AWS Bedrock models

Installation

# Clone the repository
git clone https://github.com/yourusername/LangGraph-MCP-on-AWS-Bedrock.git
cd LangGraph-MCP-on-AWS-Bedrock

# Set up a virtual environment
uv venv myvenv --python 3.12
source myvenv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
uv pip install -r requirements.txt

Usage

Run the script with default options:

python langgraph_mcp_bedrock.py

# or using uv run
image

Or customize execution:

python langgraph_mcp_bedrock.py --question "tell me what is aws sagemaker lakehouse"
image

Command Line Options

  • --question: Input question (default: “Hi there!”)
  • --model: Bedrock model ID (default: “us.anthropic.claude-3-7-sonnet-20250219-v1:0”)
  • --graph: Display the graph structure
  • --mcp-config: Path to custom MCP config JSON file

Configuration

The application will look for MCP configuration in the following order:

  1. Custom path specified with --mcp-config
  2. ~/mcp.json
  3. ~/.aws/amazonq/mcp.json
  4. Default sample configuration (AWS Documentation MCP server)

Architecture

The system follows a three-node workflow:

  1. Agent Node: Processes the input and decides whether to use tools or provide a final response
  2. Tool Node: Executes requested tools via MCP
  3. Final Node: Formats and returns the final answer

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers