Aws Sample Gen Ai Mcp Server

by jikang-jeong

136 downloads Not rated yet
GitHub

About

sample code using gen-ai(bedrock) with mcp-server

Explore

- PostgreSQL database connection demonstration
- Wikipedia web search integration
- Based on AWS Sample MCP Demos fork
- Uses MCP protocol for AI model context

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Aws Sample Gen Ai Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.13+
- PostgreSQL (via Docker)

1. Set up a virtual environment (recommended):

  python -m venv venv
  source venv/bin/activate  # On Windows: venv\Scripts\activate

2. Install dependencies:

  pip install -r init/requirements.txt
3. Run
  python3 main.py

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "aws sample gen ai mcp server": {
            "aws-sample-gen-ai-mcp-server": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "aws-sample-gen-ai-mcp-server": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            "venv"
        ]
    }
}

move to https://github.com/jikang-jeong/mcp_bedrock_sample

-------

This sample code project is a fork from [https://github.com/aws-samples/Sample-Model-Context-Protocol-Demos]'s repository.

- add postgres db-conn sample
- add web search (wikipedia) sample

✅ Prerequisites

- Python 3.13+ - PostgreSQL (via Docker)
Start PostgreSQL with Docker Compose
  docker-compose -f docker-compose/docker-compose.yml up -d
Initialize the Database

- SQL initialization script: /init/init.sql
(Includes both DDL and DML)

---

⚡ Quick Start

1. Set up a virtual environment (recommended):

  python -m venv venv
  source venv/bin/activate  # On Windows: venv\Scripts\activate

2. Install dependencies:

  pip install -r init/requirements.txt
3. Run
  python3 main.py

---

🐘 PostgreSQL Driver Issue (psycopg)

만약, 아래 오류가 출력된다면

ImportError: no pq wrapper available.
Attempts made:
- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation: libpq library not found

아래 PostgreSQL client libraries 설치하십시오. 또는 postgres 모듈을 변경 사용해도 됩니다.

macOS:
  brew install libpq
  brew link --force libpq
Ubuntu:
  sudo apt-get install libpq-dev
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.